views:

60

answers:

2

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?

A: 

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.

Damien MATHIEU
+2  A: 

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.

Henry