Android >= 8.0 is not receiving notifications
See original GitHub issueYesterday I notice that devices that are using an Android version greater than 8.0 were not receiving push notifications. When I was debugging it, I notice that it’s caused by the null value returned by this.config.getChannelName()
on the RNPushNotificationHelper.java
file.
A workaround that I found was to make a ternary there in order to set a default value to it if it returns null.
NotificationChannel channel = new NotificationChannel(NOTIFICATION_CHANNEL_ID, this.config.getChannelName() != null ? this.config.getChannelName() : "rn-push-notification-channel", importance);
It’s working but I know that it’s not the best solution for it. Can we improve it? Is there any drawback related to this workaround?
The fork that I’m using with the workaround: https://github.com/rafaelcamaram/react-native-push-notification
Cheers
Issue Analytics
- State:
- Created 5 years ago
- Reactions:22
- Comments:12 (3 by maintainers)
Top GitHub Comments
@ebaynaud I’m happy to contribute somehow 😃
I just opened a PR: Pull Request
@rafaelcamaram What stops you from updating the manifest file?