Simple demo GitHub project: https://github.com/Try4W/AlarmManagerDemo
On emulators(Android 4.1.1, Android 6):
PendingIntent with AlarmManager
adb shell dumpsys alarm
Intent
adb shell dumpsys alarm
IntentOn my device(LeTv One/Android 6):
PendingIntent with AlarmManage
adb shell dumpsys alarm
Intent
adb shell dumpsys alarm
IntentIf I add my app to 'protected apps' Intent not removed after removing app from recent apps.
BUT! On my device AliExpress's app post notification without adding to 'protected apps'.
Note: alarm scheduled without problem on BOOT_COMPLETED
How did they achieve that?
What I already tried:
alarmManager.setAlarmClock(...)
setExactAndAllowWhileIdle(...)
BroadcastReciever
Service running in separated processOn some (most) Android devices, swiping an app from the recents apps list is the same as force-closing it from the Apps settings screen.
Android assumes this means the user doesn't want any activity from this app until further notice, which means manually launching on the app by the user.
See this: AlarmManager does not work when app is force closed
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With