[android-developers] Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread sasq
I have an AsyncTask that scans the file system and publishes progress through Notifications. To do this I need a reference to the current Activity in the AsyncTask. I also don't want to kill the task when the activity is destroyed. How do I avoid leaking the activity and everything it references

Re: [android-developers] Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread Agus
you can use the application context On Sat, Jul 24, 2010 at 5:28 AM, sasq jonas.minnb...@gmail.com wrote: I have an AsyncTask that scans the file system and publishes progress through Notifications. To do this I need a reference to the current Activity in the AsyncTask. I also don't want to