Doze mode on Oreo

谁都会走 提交于 2020-01-03 03:56:09

问题


I am facing issue in my app regarding doze mode. I am making a chat application and when app is in backgroud during doze mode and receive any message . Device does not show notification in orea.

I have followed the proper procedure for OREO notification by building channel for it.

I need to find if there is a way to whiteList my app from doze mode so that I can have notifications. Or any other process to optimize notification building.


回答1:


I do not need to whitelist my application to get notifications in doze mode. I recommend to look at your notification to see if you can find the issue there.

Some tips:

  1. Send a notification, use the notification field. If theres no notification field it will be handled as a data notification. Data notifications are delivered when the app starts again.
  2. Set priority to high.
  3. Maybe use time to live = 0. That will make firebase to try harder to get it delivered. But it will be lost if it fails.

Hard to give you more direct advice when I do not know where you are sending the notification from.

https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages



来源:https://stackoverflow.com/questions/52664059/doze-mode-on-oreo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!