feat(messaging, android): add priority + originalPriority to RemoteMessage #8069
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.
Description
messages may be sent as high priority but downgraded to normal priority on
delivery and it is very important for applications to know this
if a priority is downgraded from high to normal, the application may not
start foreground services and the app will crash if a foreground start is
attempted
These are android-specific types not present on web, so I followed the pattern of other non-web typescript types by making them optional / warned they could be undefined
The two properties:
https://firebase.google.com/docs/reference/android/com/google/firebase/messaging/RemoteMessage#getPriority()
https://firebase.google.com/docs/reference/android/com/google/firebase/messaging/RemoteMessage#getOriginalPriority()
The java IntDef that drives the typescript enum definition:
https://github.com/firebase/firebase-android-sdk/blob/b6d01070d246b74f02c42da5691f99f52763e48b/firebase-messaging/src/main/java/com/google/firebase/messaging/RemoteMessage.java#L57-L64
Related issues
Related:
Release Summary
Two conventional commits that should trigger semantic release correctly if this PR is rebase-merged
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter