You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the BetterAsyncTask with a progress dialog, and when the user presses the back button on the device the progress dialog is dismissed but the task continues running. I've managed to override this implementing the onCreateDialog() method on my activity and attaching there an OnCancelListener, but still it doesn't look too god, because I'm using globals to communicate with the task.
It would be better if the cancel listener flagged the task as cancelled and the task itself could check for this with the isCancelled() method.
The text was updated successfully, but these errors were encountered:
For example, If that long running task is a network activity, wouldn't aborting that long running task save the network bandwidth, which is perhaps actually what the user might have wished when he/she pressed back button to cancel the "progress" ?
The problem I have is that the OnCancelListener doesn't have access to the BetterAsyncTask, so I can't call it's cancel method. I would, but other than using a global for it I don't know how to do it.
I'm using the BetterAsyncTask with a progress dialog, and when the user presses the back button on the device the progress dialog is dismissed but the task continues running. I've managed to override this implementing the onCreateDialog() method on my activity and attaching there an OnCancelListener, but still it doesn't look too god, because I'm using globals to communicate with the task.
It would be better if the cancel listener flagged the task as cancelled and the task itself could check for this with the isCancelled() method.
The text was updated successfully, but these errors were encountered: