Reputation:
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.
Upvotes: 0
Views: 67
Reputation: 870
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
Upvotes: 0
Reputation: 1
You can try this way:
echo json_encode($response);
and for validating the Json check http://jsonviewer.stack.hu/
Upvotes: 1