Sunday, July 31, 2011

Re: [android-developers] How to make an alarm live even when the application which set it is killed?

On Sun, Jul 31, 2011 at 9:02 AM, Ali Chousein <ali.chousein@gmail.com> wrote:
> Next I manually kill my application through
>
> Settings - Applications - Manage applications - <MyApp> - Force stop
>
> When I re-issue the command "adb shell dumpsys alarm" I see that my
> alarm is gone.

Correct. Force-stop removes alarms, as do task killers (at least
pre-2.2). The application is in a semi-disabled state until the user
launches an activity again.

> This makes me think that when my application goes into
> the background and the framework kills it to free resources, my alarm
> will also be killed.

I don't think so. More accurately, AFAIK, a force-stop does not
reproduce what the OS does when it stops a service to free up RAM or
due to old age.

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate