i have developed a web services for a messaging API in php for android app, what response I need to send for the app? POST data is not working on the UI. I am a new developer, Thanks In advance.
Asked
Active
Viewed 61 times
2 Answers
1
You can try this way:
echo json_encode($response);
and for validating the Json check http://jsonviewer.stack.hu/

Maveňツ
- 1
- 12
- 50
- 89
0
Its best you use a json object for the reply. If you have your data in an array you can use json_encode. Just echo the json on the php, that's what the android app will see.
*Edit
To parse the json on tha android side see here

Community
- 1
- 1

Evripidis Drakos
- 872
- 1
- 7
- 15