Can FCM normal priority message wake up device from doze mode?

721 Views Asked by At

I understand FCM normal priority message is not supposed to wake up device from doze mode, but is there any way to force it? E.g. using tasker events? Some system level parameters? I've been googling around but found no solution.

I really want some apps' push notifications to be received immediately, but I cannot control the priority of these messages from the sender. Right now I work around it by disabling Doze mode altogether, which is having impact on battery (although not too much).

1

There are 1 best solutions below

1
On

If you are using cloud functions to send push notifications, Go to your .js file and update the priority to high. Or if you are using any other service to send notifications make sure priority should be high in notification data . I faced the same issue screen was not getting wake for my app notifications when device was in doze mode .

 return {
    data: data,
  "android":{
  "priority":"high"
},
    apns: {
        headers: {
          "apns-priority":"5"
        },
        payload: {
            aps: {
                alert: {
                    title: title,
                    body: body
                },
                badge: 1,
                sound: sound,
                priority: "high",
                category: clickAction,
            }
        },
    },
    topic: recipientId,
};

}