[React-native] Push notification issue
I want using push notification in react-native.
And i follow https://support.count.ly/hc/en-us/articles/360037813231-React-Native-Bridge-#general-setup
And when using Countly.askForNotificationPermission(); I have issue
And more issue. In dashboard -> messaging, I can see I have 6 user can receive notification but when i create one-time notification i can't send it, it error Sorry, there are no push-enabled users for specified options.
thanks.
Comments
Hi José, Thanks for reporting this issue!
So, this issue happens If firebase-messaging is resolved to v22 due to any reason.
These could be the multiple reasons that your project is using firebase-messaging v22; some of them are:
— You or some plugin you have added is using firebase-bom with V28+
— Some plugin is directly using firebase-messaging v22
— You have manually edit the firebase-messaging to v22
Our engineering team is are already working on it and we will release a proper fix in the next release.
For now, as a workaround, you can add the 'com.google.firebase:firebase-iid' to your Android/app/build.gradle. It should work as expected.
Additionally,
If you go to your Dashboard and open your Messaging page, you'll see that the MESSAGING-ENABLED USERS is showing the count of both production and test users for both platforms (iOS/Android).
For e.g.: You have selected Platform “Android” and “Production Users”, if no user is available with these options, then you will get this message “Sorry, there are no push-enabled users for specified options.
Try to change platforms or production-test switch."
Please let me know if you have any questions about this.
Hi @Kenvin Alves
I've try with suggestion of you, and I can run my app, but when I push notification from dashboard Countly, I receive error Background messages only work if the message priority is set to 'high' (Android)
Currently, My app is still receiving notifications from fcm.
You can add field "priority": "high" when send notification?.
thanks.
Hello, what device are you testing this on?
Hi Arturs Kadikis
I'm testing on Xiaomi redmi note 7.
Hi Jose,
Would you please share some more details about how and which dependencies/plugins are you importing for push notifications?
If you can share your package.json file that would be more helpful.
Hi Muhammad Junaid Akram
This is my file package.json
And I can receive notification from my server. but when push notification from Countly dashboard, I see error Background messages only work if the message priority is set to 'high'.
Thanks.
Hi Jose,
You are using some other plugins/libraries for push notifications that could cause conflicts with Countly SDK push notifications. We recommended not use any additional FCM libraries with Countly SDK for push notifications.
Could you remove those additional libraries and see if that fixes your issue?
Thanks,
Hi Muhammad Junaid Akram
I think I can't do it. Because, in my app, I've some difference service push notification, And currently, it work well, And when I add more countly sdk, I just have issue in android, iOS work well.
You can check again data when send notification for android and add priority = high?.
Thanks.
Hello, previously you said that "I can receive notification from my server", could you expand on that? What specifically do you use and how are you sending them? With what kind of priority are you sending those push messages?
Could you for the sake of the experiment try receiving a countly push message only with the required permissions for it? Maybe even a new app which doesn't include any additional push services or libraries. Our current testing indicates that in that case the error message wouldn't show up.
Please sign in to leave a comment.