-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Channel name updated when sending local notification #1649
Comments
Hi @piotrponikowski |
I have same issue |
Happening to me, and it triggers 2 notifications with the RNPushNotification.presentLocalNotification |
Hi, PushNotification.createChannel(
{
channelId: 'myid',
channelName: 'Channel Name',
channelDescription: 'Channel Description',
},
created => console.log(create)
); In order to simplify the library and also avoid some complex edges cases, the following behaviour will be removed:
This means the creation of the channel must be made before you trigger a notification. And this will solve this issue. |
You can test changes on Please refer to the CHANGELOG for update instructions: To install this version:
OR
Make sure your build cache is cleaned. |
I tested with Thank you for help! |
Thanks for your feedback ! |
It works great for me as well- do you know when you'll be releasing ths update? |
I will do it at this Friday, don't have enough time this week in case of issues. |
Just released 😉 |
I have created custom channel:
and then somewhere in my code I created new local notification:
After this my channel name has been updated back to default value: 'rn-push-notification-channel'
Looks like this is caused by this check:
https://github.com/zo0r/react-native-push-notification/blob/master/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationHelper.java#L946
Is it intentional behavior?
Based on source code I was able to find workaround by providing channelName and channelDescription when sending notification, however these attributes are not documented.
The text was updated successfully, but these errors were encountered: