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.Answer1:
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:<ol><li>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.</li> <li>Set priority to high. </li> <li>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. </li> </ol>
Hard to give you more direct advice when I do not know where you are sending the notification from.
<a href="https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages" rel="nofollow">https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages</a>