AlarmManager with Notification Android

前端 未结 4 1132
故里飘歌
故里飘歌 2021-01-07 02:37

I\'m trying to give the user a notification each day on a certain time so I use an AlarmManager with a notification. I have this:

public void check_products(         


        
4条回答
  •  既然无缘
    2021-01-07 03:06

    It could be helpful to mention here. Optimize your app with Doze and app stand by article from android developers blog help you out.

    If you need to set alarms that fire while in Doze, use setAndAllowWhileIdle() 
     or setExactAndAllowWhileIdle().
    

    you can find source here

提交回复
热议问题