> "So i m not able get state of service when application start." Right... My take on the original question was that the dev asked how to detect if the service was stopped before the work was done when the main application is launched...
My point was that simply moving the location of where the flag is set doesn't always accommodate that... On Tue, Feb 22, 2011 at 1:11 PM, Mark Murphy <[email protected]>wrote: > On Tue, Feb 22, 2011 at 2:19 PM, Justin Anderson <[email protected]> > wrote: > >> Don't wait until onDestroy() to update your flag. Update your flag > >> "when it finishes its work", which by definition will be sooner than > >> -- and hopefully on a different thread than -- onDestroy(). > > > > That is a better place to put the flag but that would only work in some > > cases... If the service is killed before the work is done then the same > > problem exists. > > Yes, but then the work isn't done. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://github.com/commonsguy > http://commonsware.com/blog | http://twitter.com/commonsguy > > _The Busy Coder's Guide to Android Development_ Version 3.4 Available! > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

