简体   繁体   中英

SetExactAndAllowWhileIdle does not wake up device

So I have alarm that when triggers it shows notification and sets up the same alarm with setExactAndAllowWhileIdle for next hour, but during night, like after successfully firing alarm 1 am, 2 am, then on 3 am alarm doesn't trigger, and of course of that it doesnt shows for next hourse, because it didnt set up new ones. When i wake my device at 8:15 am, it triggers this alarm.

Android 7.0, tested on Huawei P9

Huawei has something called Protected Apps, that can be accessed from the phone settings (Battery Manager > Protected Apps). Try adding your app to this list to keep it running after the screen is turned off.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM