[android-developers] AsyncTask and screen rotation - a manifesto

2010-09-13 Thread Bret Foreman
It's pretty clear from all the activity around this issue in this forum in multiple threads over the past several months that there's a painful design flaw regarding AsyncTasks and screen rotation. The basic issue that people want to address is how to handle the onDestroy when an AsyncTask is

[android-developers] AsyncTask and screen rotation

2010-09-10 Thread Bret Foreman
Is there a standard pattern for handling a running AsyncTask with screen rotation? My AsyncTask runs for about 10 seconds. I could call AsyncTask.cancel in the Activity's onDestroy method and restart the task in onCreate but that would waste cycles, bandwidth, and user time. I'm guessing there is

Re: [android-developers] AsyncTask and screen rotation

2010-09-10 Thread Mark Murphy
On Fri, Sep 10, 2010 at 11:13 AM, Bret Foreman bret.fore...@gmail.com wrote: Is there a standard pattern for handling a running AsyncTask with screen rotation? My AsyncTask runs for about 10 seconds. I could call AsyncTask.cancel in the Activity's onDestroy method and restart the task in