Get response of MySql query
I have an algorithm about chat program in android, but I have a problem in server-side section.
I can store my data like username, password and e-mail through json into my database from my app but I do not know that How can I check them into my app! (e.g Get the response of username checking query into my app.)
Thanks in advance.
Basically when you run httpClient.execute it will return a response, you need to use that response.
HttpResponse resp = httpClient.execute( post ); DataInputStream is = new DataInputStream( resp.getEntity().getContent() );
Server side depends on what programming language you use. For example using python:
self.response.headers['Content-Type'] = 'text/vnd.aexp.json.resp' self.response.set_status( 200,"OK" ) self.response.out.write( json.dumps( responseList ) )
See this example for full source code and details:
EDIT Check this for php server side: