AlarmManager not working in several devices

后端 未结 14 2051
走了就别回头了
走了就别回头了 2020-11-30 18:34

My app uses AlarmManager and it has been working since 4 years ago. But I noticed it started failing in some devices.

I\'m pretty sure code is right (I\'m using Wak

14条回答
  •  自闭症患者
    2020-11-30 18:52

    Most of modern Android devices come with an app or mechanism, which automagically tries to figure out how to save battery and as a result might kill certain 3rd party apps. This might result in removing scheduled tasks and jobs, (e.g. alarms not going off, push notification not working, etc.). In many cases this happens completely independent from battery saving mechanisms of Android, in my case i couldn't make more battery optimization when i detect some devices model, i redirect user to the start up manager to whitelist my application

    You found in this link for every model the intent that you should invoke https://android-arsenal.com/details/1/6771

提交回复
热议问题