I am developing a application in which the device scans QR code. The qrcode contains id and some textual information. Based upon some specific information some button gets highlighted. When user clicks on that button the qrcode id is stored in json and and then the connection is made to the server. The server decodes this information and then put some information into jason and send back to the device……and device again decode that information. The server application is to be written in struts 2 .
Now my question is how should i write the connection establishment between the device and server.
I am developing a application in which the device scans QR code. The qrcode
Share
You can use built-in Apache HTTP client. As the format is JSON and server will be in Struts, it will be a matter of simple HTTP POST. See this example: http://www.androidsnippets.com/executing-a-http-post-request-with-httpclient