Search code examples
androidbroadcastreceiveralarmmanagerintentservice

AlarmManager doesn't work at api lvl < 11


Here is link of the guide of how to use AlarmManager with BroadcastReceiver and IntentService. It works pretty good on >= API 11, but it doesn't work at lower API (was tested on API10). I have been read a lot of documentations at the dev.android but have no result. Receiver doesn't call onReceive method and doesn't create new process. Please, help me.


Solution

  • It works pretty good on >= API 11

    No, it does not, because whoever wrote that explanation has not been paying attention since 2009.

    it doesn't works at lower API (was tested on API10)

    It should work as well on API Level 10 as it does on API Level 11+. If the device is asleep at the time of the alarm, your Service may or may not run.

    To use _WAKEUP-style alarms, use WakefulBroadcastReceiver or my WakefulIntentService. Also, remove the android:process attribute suggested by that "guide", as that will interfere with the use of either WakefulBroadcastReceiver or WakefulIntentService.