I have a class which extends AsyncTask
public class SendJSONArray2Server extends AsyncTask<String, Void, HttpResponse>
the class send a JSONArray to the server and receives response as JSONArray. I have instantiated the class as follows
private SendJSONArray2Server sendJSON;
String[] params = { "http://10.0.2.2:8084/xyz/abc",jsonArray.toString() };
sendJSON.execute(params);
In onPostExecute I process the user response
@Override
protected void onPostExecute(HttpResponse response)
AsyncTask is executed first time like charm and I am receiving the response from the Server but when I try to send JSONArray to server for the second time AsyncTask does not execute.
I am not getting any exceptions or errors in logcat.
Create a seperate instance of your async task and try to execute like this..
because The Asynctask can be executed only once (an exception will be thrown if a second execution is attempted)