You cannot just use a reference(be it explicit or implicit to an inner 
class definition) to an Activity in the doInBackground of an AsyncTask (or 
in any method that is executed on a background thread). You'll get the 
problem you see right now.

First, i would suggest trying not to use an Activity reference in your 
doInBackground at all. Maybe you can just use a Context 
(activity.getApplicationContext()) instead.
If you really need the activity in your doInBackground, you'll need to find 
a way to synchronize your code in doInBackground to always have the correct 
activity or wait if activity is null.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to