0

Alright, i had enough. I have seen more than 50 question and answers about JSON and i still cant understand. Please solve this for me with all the codes, without any errors please.

Lets say i have a php script with a variable "$tablename" and another variable "$feedback". According to the above variables tell me how to use JSON in my android app, to put string data to "tablename" and get the string data "feedback" from php. Make the codes understandable and please don't make any errors.!

Ishak
  • 37
  • 1
  • 7
  • check this [link](http://stackoverflow.com/questions/23007890/how-to-get-a-variable-from-php-to-android) The Question is my problem. please solve :( – Ishak Apr 16 '14 at 11:33

1 Answers1

1

Duplicated: How to send a JSON object over Request with Android?

Consider using Gson to parse the request and the response: http://kylewbanks.com/blog/Tutorial-Android-Parsing-JSON-with-GSON

Community
  • 1
  • 1
pianista
  • 108
  • 8
  • I got an idea how to do it. But its not working for me when i test it. Please Show me a detailed code from scratch how to do this. really confusing. Don't be lazy please! Its a favor! – Ishak Apr 16 '14 at 11:08
  • Please, post your code to review what is going wrong – pianista Apr 16 '14 at 11:09
  • This is what i want [link](http://stackoverflow.com/questions/23007890/how-to-get-a-variable-from-php-to-android) – Ishak Apr 16 '14 at 11:14
  • i tested the answer given in that link! But still there is problem! – Ishak Apr 16 '14 at 11:15
  • First of all, the script you are talking contains SQLInjection (fix it). In the other side, have you test that the Post is working correctly outside the Android App? Post your code, or we cannot help you – pianista Apr 16 '14 at 11:19
  • Thats the code up there in that link. both php and Android code is given. Check [here](http://stackoverflow.com/questions/23007890/how-to-get-a-variable-from-php-to-android) the question is my codes! – Ishak Apr 16 '14 at 11:23