Android Notifications triggered by Alarm Manager not Firing when App is in Doze Mode

前端 未结 5 1032
無奈伤痛
無奈伤痛 2021-02-01 09:14

I have the following requirements. A user needs to be able to schedule a recurring reminder in my app that will trigger a push notification at an exact time ev

5条回答
  •  盖世英雄少女心
    2021-02-01 09:47

    You would not be able to run background services long running in Oreo as there are behaviour changes, now Oreo to optimise system memory, battery etc, it kills background service, to solve your issue you should use foreground service.

    Have a look at Background execution limits https://developer.android.com/about/versions/oreo/android-8.0-changes

    A suggestion from me, if you can use FCM then go for it, becasue apps like WeChat, Facebook uses it, to deliver notifications and they don't face any problem...

    Hope this helps in understanding the issue....

提交回复
热议问题