[android-developers] Concern on AsyncTask in an Activity

2010-12-13 Thread umakantpatil
I'm just confused about the lifecycle of activity and AsyncTask. I have an activity which opens new AsyncTask. Now if finish() that activity, will be background task also get closed ? Or will it be still going ? If going on then how long it will be going, till my code exceute or till the app

Re: [android-developers] Concern on AsyncTask in an Activity

2010-12-13 Thread Mark Murphy
On Mon, Dec 13, 2010 at 7:13 AM, umakantpatil umakantpat...@gmail.com wrote: I'm just confused about the lifecycle of activity and AsyncTask. I have an activity which opens new AsyncTask. Now if finish() that activity, will be background task also get closed ? No. Or will it be still going ?

Re: [android-developers] Concern on AsyncTask in an Activity

2010-12-13 Thread Prakash Iyer
All what Mark said + be very careful on how the UI gets updated. If you, like most others, are using an inner class for AsyncTask then the outer instance is no longer the visible instance when your app goes away or even an orientation changes. My 2c., AsyncTask has a noble intention but a very