Doze mode on Oreo

473 Views Asked by At

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

There are 1 best solutions below

2
On

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