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 called and trying to update the UI. I have implemeted one interface to parse the json stuff.so every time i make request the method is called.(No matter activity is running or not) so please suggest me better way. On Tue, Nov 8, 2011 at 7:30 PM, TreKing <treking...@gmail.com> wrote: > 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. > > > ------------------------------------------------------------------------------------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices > > > -- > 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 > -- regards, Hitendrasinh Gohil -- 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