[FIX] Push notifications with lower priority for Android devices #19061
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to https://www.npmjs.com/package/node-gcm#usage and recommendation in https://developer.android.com/training/monitoring-device-state/doze-standby
Continuation of #15803 (comment)
Proposed changes
According to node-gcm, it should be like this:
Compared to what
gcm.js
does as of v3.6.3:Issue(s)
Fixes #15803 (comment)
Improves upon #17357, #17907, and RocketChat/Rocket.Chat.ReactNative#2507.
How to test or reproduce
From @xtilyn:
Right now when phone enters doze mode, android app is not able to receive notifs.
You can test this by forcing doze mode using adb
adb shell dumpsys deviceidle force-idle
Then, if you send a message, the android client does not receive it until you disable doze mode with
adb shell dumpsys deviceidle unforce
Screenshots
Types of changes
Checklist
Changelog
fix(push): Set push notification priority to 'high' for FCM
Further comments
cc @sampaiodiego