When the user hits retry, you should create a new AsyncTask instance, giving it the same parameters/input as the original one (essentially clone it) and execute it.
If you don't know the original AsyncTask's parameters/input, you should change your asynctask-baseclass and add some public methods to be able to get hold of this info. On Feb 6, 10:35 pm, Dimitris <[email protected]> wrote: > Hey guys, > > I have a base abstract class that all my asynctasks extend from. I have > built in error handling for network errors where I display a dialog to the > user telling them they can retry their request (after all it was a network > error...). > > I am having a bit of a problem "retrying" my asynctask since once it is > executed, you cannot execute it again. How could I go by do that ? Should I > use reflection to instantiate the same class and retry? > > Has anyone dealt with this problem before? > > Thanks! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

