react-native-firebase
react-native-firebase copied to clipboard
Expose Android RemoteMessage.getPriority() and RemoteMessage.getOriginalPriority()
Discussed in https://github.com/invertase/react-native-firebase/discussions/6400
Originally posted by gdogaru July 18, 2022
The Android priority
and originalPriority
are important, since high priority messages allow the app to do extra operations, like start a foreground service. If Android decides to demote your message from high
to normal
, you are not allowed to start the service, and the app will fail with an exception.
I saw there is a message.notification?.android?.priority
but I could not get that to populate for data only messages.
Info about Android message priority. the https://firebase.google.com/docs/cloud-messaging/android/message-priority
@gdogaru I agree this is important - no dispute at all from me there - but will not have time to implement it for quite a while unfortunately. If you proposed a PR for this I could probably integrate it + release it quickly though, as a different option.
Did you already try that, and did not have success, as a possible meaning for "I could not get that to populate for data only messages" or did you mean simply that the object shape matches that but it never showed up during testing of existing code?
If I were you I'd go into the java code in node_modules/@react-native-firebase/messaging
and give it a try, if it works you can use patch-package to make it stick, and you can propose a PR here
I have not tried to patch it, I tried to send high priority messages using different firebase admin methods, and that field was not populated.
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
This has good information - appears like it would be a good + not-too-hard PR?
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
Hello. Did you get to solve this?
@kiwavi this is an open source repository and thus all work is visible. If you do not see any comments indicating someone solved something, no one solved it.
If this is important to you my latest comment was the most recent update and is still valid:
This has good information - appears like it would be a good + not-too-hard PR?
I would happily merge a PR that worked on this
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.