android-asynctask
How to check if Async Task is already running
Use getStatus() to get the status of your AsyncTask. If status is AsyncTask.Status.RUNNING then your task is running. EDIT: you should reconsider your implementation and hold the AsyncTask probably in a Service or IntentService to fetch your data from the web.
AsyncTask doInBackground does not run [duplicate]
Removing the AsyncTask and using a traditional Thread instead of combining it with runOnUiThread seems to work. But I still have not found the reason why the AsyncTask is so “unstable”. Here is the code that works for me: public class ImageActivity extends Activity { private Thread worker; public void onCreate(Bundle bundle) { super.onCreate(bundle); setContentView(R.layout.main); … Read more