This is my application: 1 Activity, 2 AsyncTask (once to send request, once to wait the responses).
1) onCreate()
AsyncTask1.execute()
- AsyncTask1.doInBackground() wait for incomng connection. Works!
2) onClick()
AsyncTask2.execute()
- AsyncTask2.doInBackground() never executed.
How can solve this? Why the AsyncTask2.doInBackground() doesn’t work?
There is a better pattern to create a C/S application?
The solution is this:
instead of
Android SDK Link – Executor