Reputation: 3578
My app uses an AlarmManager
to run a Service
at a specific interval. Something is causing the AlarmManager
to stop running, but I'm having a hard time debugging what it could be. I've heard if an exception is thrown in the Service
this could cause the AlarmManager
to stop, but I'm not seeing any exception in LogCat
.
Any advice on how to debug an AlarmManager
that auto-stops or what could cause it to stop?
Upvotes: 0
Views: 340
Reputation: 1006539
I've heard if an exception is thrown in the Service this could cause the AlarmManager to stop, but I'm not seeing any exception in LogCat.
I am not aware that this is the case.
Any advice on how to debug an AlarmManager that auto-stops
I'd use adb shell dumpsys alarm
to confirm that the alarm really is gone.
or what could cause it to stop?
The only three things that I know of that will unschedule the alarm are:
cancel()
Of course, a full uninstall will unschedule your alarms too.
Upvotes: 1