Is it possible to interrupt AsyncTask in its onPreExecute() (depending on some condition) and, if so, how justified is this in practical use?
|
1 answer
What's the point? Do not run AsyncTask depending on some condition.
To close in onPreExecute () is bad. It turns out that an extra object was created.
If you can not do without it, use the solution: https://stackoverflow.com/questions/2735102/ideal-way-to-cancel-an-executing-asynctask
|
cancel(true);. - post_zeew