react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

Expose Android RemoteMessage.getPriority() and RemoteMessage.getOriginalPriority()

Open mikehardy opened this issue 1 year ago • 8 comments

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

mikehardy avatar Jul 18 '22 17:07 mikehardy

@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

mikehardy avatar Jul 18 '22 17:07 mikehardy

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.

gdogaru avatar Aug 03 '22 08:08 gdogaru

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.

github-actions[bot] avatar Dec 05 '22 19:12 github-actions[bot]

This has good information - appears like it would be a good + not-too-hard PR?

mikehardy avatar Dec 05 '22 20:12 mikehardy

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.

github-actions[bot] avatar Jan 02 '23 21:01 github-actions[bot]

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 avatar Dec 06 '23 06:12 kiwavi

@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

mikehardy avatar Dec 06 '23 11:12 mikehardy

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.

github-actions[bot] avatar Jan 03 '24 12:01 github-actions[bot]

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.

github-actions[bot] avatar Feb 21 '24 13:02 github-actions[bot]