[android-developers] problem while updating UI from non-ui thread?

2011-11-08 Thread Hitendrasinh Gohil
Hi, I am updating my UI from background thread. If i go to other activity while the request has already been sent to server then it creates problem for me. Activity1 and Activity2 are there. I am on activity1 and it refreshes every 10sec.now suppose the request has been sent to server but

Re: [android-developers] problem while updating UI from non-ui thread?

2011-11-08 Thread Hitendrasinh Gohil
is there anyone? On Tue, Nov 8, 2011 at 2:52 PM, Hitendrasinh Gohil hitendrasin...@gmail.com wrote: Hi, I am updating my UI from background thread. If i go to other activity while the request has already been sent to server then it creates problem for me. Activity1 and Activity2 are

Re: [android-developers] problem while updating UI from non-ui thread?

2011-11-08 Thread TreKing
On Tue, Nov 8, 2011 at 3:22 AM, Hitendrasinh Gohil hitendrasin...@gmail.com wrote: I can set boolean flag for it.But apart from this patch is there any good idea to prevent this. Stop the background thread or preferably cancel the AsyncTask that's running.

Re: [android-developers] problem while updating UI from non-ui thread?

2011-11-08 Thread Hitendrasinh Gohil
Hey Treking, please read my question carefully. I am cancelling asynctask. It happens rarely. Scenario:- Request has been sent to server but the response has not came yet. In between this time if i do something that finishes my activity (i am also cancelling my asynctask.) then the method is

Re: [android-developers] problem while updating UI from non-ui thread?

2011-11-08 Thread TreKing
On Tue, Nov 8, 2011 at 8:25 AM, Hitendrasinh Gohil hitendrasin...@gmail.com wrote: Hey Treking, please read my question carefully. I am cancelling asynctask. I read your question. Unless I'm blind or illiterate (very possible!), your original post has no mention of either AsyncTask or