evollu / evollu/react-native-fcm
Two different payloads for sending notification for both Android and IOS
- Dominant language
- Java
- Stars
- 1.7k
- Forks
- 661
- PR merge metrics
- No merged PRs in 30d
Description
Hi, great library! I have a problem and i've been reading the issues and the readme for a solution, but i haven't been able to find one.
The thing is i need to send notifications to my users (ios AND android) and i need the app to execute some code when the notification arrives even if the app is in the background.
I've read that the only solution for this to work both in android and ios is having to create two different payloads (custom_notification for android and content_available for ios). The thing is, if i send both payloads i get two notifications in android, is there a way i can ignore (prevent it from showing) the second notification in android? In Ios it will ignore by default the one with the custom_notification and witout notification.
I have this payload (that is showing and executing in android perfectly, and not in IOS)
{to: "/topics/asd", data: {custom_notification: {…}, ...someOtherData}
I have the payload that does show in IOS and execute the code, but also shows in android, and i want to not show it in android.
{to: "/topics/asd", content_available: true, notification: {…}, data: {…}}
Thanks!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.