-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Make local notifications on android notify the application too #574
Make local notifications on android notify the application too #574
Conversation
Please @zo0r accept this PR :) |
@zo0r Have you had time to try it? Looks good! |
My team has been using this fork for the last three weeks and so far no problems. |
…which seem to be different for local notifications
Could it be merged? It's really important to get this one working. |
I have tested local notifications when app is in the foreground with this PR and it works just like with Thanks @ErikMikkelson! |
Merge plz |
Will be happy to see that as an official solution to the problem, and not using other libraries like react-native-fcm |
Added this PR to the CE clone |
This pull request saved my butt. Please merge |
a PR with plenty of positive comments - that has no conflicts, adds long-awaited functionality (which makes local notifications finally usable) and works like a charm.. Please merge! |
This seemed to fix the issue, but now it's old enough that Android 8 notification requirements are missing. This requirement regarding the mandatory notification channel has been resolved in enhancements already added to the package. Update your repo @ErikMikkelson and keep me up to date. I hope @zo0r @npomfret approves this PR, it solved my recent issues with foreground notifications. |
It's 2020 and the changes listed above still aren't in. @zo0r @npomfret @bgerhards I just pulled from master and compared old changes with new files and they appear the same. I'm not sure what changes are necessary for Android 8? Most of my changes were around getting RNPushNotificationPublisher to work the same as RNPushNotificationListenerService while getting the application context a different way. |
This PR has been implemented on |
Hi, I merged this PR, but it seems Apple has deprecated this feature: And alternative isn't handling background notification when there is no user actions... I'm not sure allowing this on Android is a good idea anymore, since there is no way to do this on iOS. What do you think ? |
RNPushNotificationPublisher receives the local notifications, but it doesn't route them to the application if it's in the foreground like the ListenerService does. This makes it work the same for both, and thus duplicates the behavior that we see on iOS.
Also, I missed it when I first set up the code, but it appeared that userInteraction was overridden to false in the code, but I removed that so we can know if we were clicked from the notification center.
Hey, for people trying to handle background notifications on Android, the intent filter trick listed in 122 worked for me.
I can now receive local notifications in the foreground and background, warm and cold start on iOS and Android and onNotification is called.