1

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.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Sohail Ahmad Khan
  • 344
  • 1
  • 3
  • 18

1 Answers1

0

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

Henge
  • 256
  • 1
  • 3
  • you talk about FCM but OP doesn't mention anything about it – Tim Nov 30 '18 at 15:15
  • Actually I am receiving "HIGH PRIORITY" data fcm in doze mode but when I build the notification depending on the data in fcm. It doesn't not show.. I have used NotificationChannel ... Notification build perfectly fine when not in doze mode. – Sohail Ahmad Khan Dec 03 '18 at 06:30