user4627848
user4627848

Reputation:

Web Services android app

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

Answers (2)

Evripidis Drakos
Evripidis Drakos

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

Maveňツ
Maveňツ

Reputation: 1

You can try this way:

echo json_encode($response);

and for validating the Json check http://jsonviewer.stack.hu/

enter image description here

Upvotes: 1

Related Questions