Call a PHP Webservice from android by post method

package com.example.root.myapplication; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.os.AsyncTask; import android.widget.TextView; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.apache.http.util.EntityUtils; import org.json.JSONObject; import java.util.ArrayList; import java.util.List; public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState)…

Android with node.js server

package com.github.nkzawa.socketio.androidchat; import android.content.Intent; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.Toast; import com.github.nkzawa.emitter.Emitter; import com.github.nkzawa.socketio.client.IO; import com.github.nkzawa.socketio.client.Socket; import org.json.JSONException; import org.json.JSONObject; import java.net.URISyntaxException; public class GameActivity extends ActionBarActivity{ private Socket mSocket; { try { mSocket = IO.socket(“http://6trix.com:8598/”); } catch (URISyntaxException e) { throw new RuntimeException(e); }…