How to place a kill safe alarm fired on daily basis?
I know how to setup an alarm to fire repeatedly, but the alarm stops firing after my application is killed.
How do I make sure the alarm continues to fire as it was setup?
You can automatically restart your closed app Activity after a few seconds using the OneShotAlarm approach described at
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/OneShotAlarm.html
using a scheduled app (re)launch.
If you try to kill the integrated clock application, you'll see the alarm doesn't ring anymore (I had the problem with my HTC Desire).
That's because you can't keep any observer when the application is killed.
So you can't place any kill safe alarm.
精彩评论