Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stefanzvkvc opened this issue May 19, 2021 · 2 comments

Comments

@stefanzvkvc
Copy link

stefanzvkvc commented May 19, 2021

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 :)

@marc0s
Copy link

marc0s commented May 19, 2021

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

@stefanzvkvc
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants