Threading , Handler and Activity Destruction

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Threading , Handler and Activity Destruction

Postby yacirhussain » Wed Feb 17, 2010 1:13 pm

Hi All!
I am not really an advanced android developer.. I am making an app which performs some image processing and that may take up to 5 minutes.. So I am using a handler and a thread in my activity.. during the processing, I show a Progress Dialogue..
I am posting messages through handler to update my UI. and upon completion, the progress Dialogue is hidden and some more options are visible on screen. Till here, Every thing is fine.. But when ever there is some event which leads to current Activity destruction, I loose the thread.. in fact the thread runs in background, and does fine without any problem.. but it don't update current activity object (after orientation change).

I wonder how to do get rid of that.. there are some blurred solutions in my mind but there must be a nice way to do it.

Using a service is an option.. but I wonder wont that create similar problem.?
Once Poster
Once Poster
Posts: 1
Joined: Wed Feb 17, 2010 12:58 pm


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests