Using AsyncTask multiple times

How can i use AsyncTask class multiple times. For example : like in countdown timer assignment, i use pause button to cancel the thread but now i want to resume from where i left. i tried but app crashes with warning that it can be used only once.

AsyncTask instances can only be used one time.
Instead, just call your task like new MyAsyncTask().execute("");

1 Like