pigeon icon indicating copy to clipboard operation
pigeon copied to clipboard

Push notification does not wake up android device when it is in doze mode

Open stefanzvkvc opened this issue 4 years ago • 2 comments

Hello,

Recently platform on which I'm working on was faced with push notification delivery issue. Problem was that push notification does not wake up android device when it is in doze mode.

After a lot of research and debugging with a colleague who is an Android programmer, we came to the conclusion that the structure of push notification requires a small change. This change is related to priority parameters and guarantees push notification delivery when device is in doze mode.

%{ to: "FCM_TOKEN ...", priority: 10, data: %{ message: "BLA_001" }, android: %{ priority: "high" } }

I've changed value for priority field from string normal or high to integer 5 or 10 and I've added android map which also contains priority field and values are normal or high.

So again, as stated by my colleague, these parameters are a must otherwise Google won't guarantee delivery. I've made this fork which fixes this issue for my platform.

Can you consider adding this change to one of your upcoming versions?

Thank you :)

stefanzvkvc avatar May 19 '21 11:05 stefanzvkvc

Do you have any link to any google/firebase documentation where that values are specified? Thanks.

marc0s avatar May 19 '21 12:05 marc0s

Hi @marc0s,

When I was fixing issue I was guided with this discussion. Also my colleague confirmed this combination of params works best based on his research and experience.

stefanzvkvc avatar May 20 '21 07:05 stefanzvkvc