1. Are you ready for the Galaxy S20? Here is everything we know so far!

Spurious Characters coming back from MySQL PHP

Discussion in 'Android Development' started by ac4android, Jun 26, 2017.

  1. ac4android

    ac4android Well-Known Member
    Thread Starter

    My PHP script returns a dataset from an SQL query in mySQL.

    In Android, I instantiate a HttpURLConnection and do a GET.

    The BufferedReader returns the dataset to my Android with a lot of spurious characters.

    I don't quite know where to debug this, can some of the gurus here point me in the right direction please:

    GoobiddyGook.JPG

    Maybe I should just put in some work to create a nice XML layout for it in onPostExecute(String result) ???

     


  2. Best Answer:
    Post #4 by Deleted User, Jun 26, 2017 (3 points)

    1. Download the Forums for Android™ app!


      Download

       
  3. Deleted User

    Deleted User Guest

    What do you mean by 'spurious characters'? The JSON fragment you show looks ok.
     
    ac4android likes this.
  4. ac4android

    ac4android Well-Known Member
    Thread Starter

    The {"db_response", and the many square and round brackets etc
    I wasn't expecting those.
    I hope I don't have to strip them before I can display them in XML layout...
     
  5. Deleted User

    Deleted User Guest

  6. ac4android

    ac4android Well-Known Member
    Thread Starter

    Got it and parsed it. Thanks :D

    Pushing my luck here, can you point me to tute-point or discussion for long-lasting, bi-directional traffic with a transactional-db , say 30-60 seconds. Upload a parameter to query a database and get a response e.g. upload license plate and get last long/latitude of vehicle.

    Thanks again.
     
Loading...
Similar Threads - Spurious Characters coming
  1. Lazi
    Replies:
    6
    Views:
    759
  2. Punbas
    Replies:
    0
    Views:
    651
  3. Cataster
    Replies:
    0
    Views:
    582
  4. John9870
    Replies:
    6
    Views:
    1,324
  5. Wesley Whitaker
    Replies:
    5
    Views:
    1,722
  6. SinghFam
    Replies:
    1
    Views:
    1,468
  7. juk24
    Replies:
    3
    Views:
    1,271
  8. FlipperTime
    Replies:
    0
    Views:
    1,365
  9. caltroon
    Replies:
    0
    Views:
    1,922
  10. dacks8989
    Replies:
    0
    Views:
    1,810

Share This Page

Loading...