I recommend you display a great big message saying "do not disturb!" while the restore occurs. You can't actually block the user, for example, from the home key, or the power key...
So I'd suggest transactionalizing things as much as possible. Read a set of related files (e.g. for one app) all at once to temporary names, then quickly rename the old ones, rename the temporary ones with their permanent names, and delete the old. Then, if you receive a Pause event, delete your temporary files. If you ever encounter renamed old files, you have a partial update. That should be very rare, but you can roll back by restoring the old files to their original names, deleting any new files in their place -- or renaming them to a recovery name inn case the application has done something with the partial update in the meantime. You can minimize the chances of that by checking for the restore progress on reboot, and verifying consistency at that point. On Aug 9, 1:25 pm, Kim Damevin <[email protected]> wrote: > Well, I saw several posts saying that the activity app should "not be > blocked" while the async task is running in background. But definitely I do > not see other choices :) > > > > On Mon, Aug 9, 2010 at 10:12 PM, TreKing <[email protected]> wrote: > > On Mon, Aug 9, 2010 at 3:00 PM, Kim D. <[email protected]> wrote: > > >> I understand that having the user blocked while restoring (or maybe with a > >> progress bar) is not a best pratice but I do not see any other possibility > >> in this context. > > > Who said that's not best "pratice"? Showing a dialog while you do this is > > pretty much exactly what I would expect. > > > --------------------------------------------------------------------------- > > ---------------------- > > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > > transit tracking app for Android-powered devices > > > -- > > 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]<android-developers%2Bunsubs > > [email protected]> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- 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

