On Fri, Feb 18, 2011 at 9:11 AM, Apoorva Moghey
<[email protected]> wrote:
> I m developing an application where when service start it mark flag
> true in shared preferences.And when it finishes its work it change
> flag to false. But suppose when someone kill whole process tree of
> application using android task manager. Service onDestroy () is not
> called where i were change the flag to false. So i m not able get
> state of service when application start.

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().

> I want know is there any way
> to know when service is killed from task manager so that i can perform
> some action based on that.

No, sorry.

-- 
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

Reply via email to