Why do AlarmManager broadcasts get cancelled when app gets killed?

Posted by skooter on Stack Overflow See other posts from Stack Overflow or by skooter
Published on 2010-05-15T16:00:43Z Indexed on 2010/05/15 16:04 UTC
Read the original article Hit count: 325

Ok so I have two BroadcastReceiver registered. When the app is closed they both fire at the appropriate times and do the appropriate things.

If the app is closed then killed (say with an AppKiller), the receivers never receive their broadcasts, and nothing happens.

Presumably the same thing happens if the parent app is killed due to low memory, so how do I ensure those broadcasts are fired/received. The API states that even if the app is killed it should fire, does anyone else have experience with this situation?

If it helps my manifest is:

<!-- receivers for AlarmManager --> 
<receiver 
android:exported="true" 
android:label="Shift roster updating calendar." 
android:name="com.skooter.shiftroster.backend.service.UpdateCalendar" 
> 
</receiver> 
<receiver 
android:exported="true" 
android:label="Shift roster checking alarm." 
android:name="com.skooter.shiftroster.backend.service.SetWakeup" 
> 
</receiver> 

and nothing esoteric is going on in the AlarmManager/BroadcastReceivers

© Stack Overflow or respective owner

Related posts about android

Related posts about alarmmanager