I\'m using an AsyncTask in my activity. Looks like:
public class MyActivity {
private AsyncTask mTask;
private void doSomethingCool() {
mTas
Before diving into the fun that is AsyncTask and orientation changes, let me first ask this - do you need to hold onto the AsyncTask in a variable? There are not many reasons that you need to do this, because AsyncTask has callbacks built-in, so you don't actually need to hold onto your AsyncTask (don't call him, he'll call you). Also, your AsyncTask should continue running even during an orientation change - it's in another thread, after all.
The only time I've had to hold onto AsyncTask was to fix a bug that occurs when you try to show a Dialog while the AsyncTask is running. There's a fix, but it's pretty nasty. There's a lot of discussion of that here, if that's the specific problem you're running into.