Push notification does not wake up android device when it is in doze mode
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 :)
Do you have any link to any google/firebase documentation where that values are specified? Thanks.
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.