Answer the question
In order to leave comments, you need to log in
Why doesn't AsyncTask slow down?
Hello everyone, there is an AsyncTask with a cycle ...
After a certain user action, AsyncTask needs to be stopped and restarted ..
I do it like this:
Останавливаю цикл который в doInBackground()
Далее делаю в методе stop (создал его в AT)
this.cancel(true)
Answer the question
In order to leave comments, you need to log in
as if AysncTask has 1 problem, it can be used only 1 time, that is, after you stop it, you need to create a new instance of your AsyncTask and start it again, you can override the onForceStop method in my opinion, and pass it to another class all the elements that are needed, and then create a new instance of the class and pass data to the new asynctask and run it again
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question