I am looking for the easiest to way to make an Android App communicate with a PHP file. I’d prefer not to use any socket in the server. Is there a way to send POST or GET messages to the PHP using Android SDK.
Edit: I would also like to know other alternatives to HTTP requests(including the ones using Sockets).
Thanks.
You can use both DefaultHttpClient from apache-httpclient or HttpURLConnection:
http://android-developers.blogspot.com/2011/09/androids-http-clients.html
My preference is the DefaultHttpClient from apache, for example:
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/httpagent.html