I have run the example, notificationReceivedForeground and notificationOpened work fine.But notificationReceivedBackground didn't fire, is there any possible reason cause this?
Having similar issues.
+1
You're on Android/iOS?
on android
Android API is slightly different (for example, no distinction between foreground and background). Please have a look at: https://github.com/wix/react-native-notifications#android-3
@d4vidi notificationReceivedBackground never fired for ios. Any luck?
@srijan02420 Are you sure? I just received a remote notification by sending a push notification when the app was in background.
@lidanh I am receiving the notification but onBackgroundNotificationRecevied is not
getting called.
On Jan 17, 2017 3:32 AM, "Lidan" notifications@github.com wrote:
@srijan02420 https://github.com/srijan02420 Are you sure? I just
received a remote notification by sending a push notification when the app
was in background.โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wix/react-native-notifications/issues/16#issuecomment-272972002,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABL4E-ZKR9zEySoVRNTnJZT5M1T045fNks5rS-j1gaJpZM4LQT2c
.
Hello, this is related:
In both the example project and my own, onNotificationReceived() is not fired for Android.
To my understanding, this function should be called when the notification is received, even if the user has not interacted with it. As soon as it shows up in the notification center.
I am using local notifications and haven't changed any code in the example I am running.
@lidanh @srijan02420 same here, notificationReceivedForeground is fired but not notificationReceivedBackground, on iOS ๐
@tristanbbq @lidanh any luck?
@srijan02420 nope ๐
@srijan02420 what about you? any luck with this? still not getting notificationReceivedBackground event to get called when receiving the push notification for iOS
I ended up using VoIP rather than APNS.
Via VoIP you can receive silent notifications, and it wakes up app even if
it's in a killed state. @tristanbbq
On Feb 18, 2017 2:44 AM, "Tristan Tran" notifications@github.com wrote:
@srijan02420 https://github.com/srijan02420 what about you? any luck
with this? still not getting notificationReceivedBackground event to get
called when receiving the push notification for iOSโ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wix/react-native-notifications/issues/16#issuecomment-280768231,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABL4Ex3tjH1Y0n0DD_2wXolqv_EAMPnJks5rdg3HgaJpZM4LQT2c
.
@srijan02420, what did you use for sending out VOIP notifications? I saw one signal and urban airship not supporting PUSHKIT.
@guns2410 I am using Django. I used https://github.com/jleclanche/django-push-notifications for implementing VoIP. It works same as APNS as far as backend is concerned. You just need to generate VoIP certificate from apple developer console.
As explained in a comment I made a while ago regarding this issue, please refer to: https://github.com/wix/react-native-notifications#android-3.
On Android, there's no distinction between foreground and background. If you wish to query for the trigger-notification that potentially caused the app to launch, apply a query to getInitialNotification(). Thanks!
@d4vidi thanks for the details. Just to be clear, there are two different issues here. Previous comments were about iOS
Having similar issues but for ios
I'm having the same issues in iOS, handler for notification received background is never triggered.
I have the same issue on iOS. Sending a pushKit notification using a .p8 key - the appdelegate.m function "didReceiveIncomingPushWithPayload" does in fact get called, even if the app is closed. This is excellent, however, no react native handlers are run on this event.
Sending APN notifications does fire the react native handlers as long as the app is in foreground or background. So APN is successful.
What is the expected behavior for pushKit? I intend to open the app for an incoming voip call. Is that beyond the scope of this project? Should I be adding my own code to didReceiveIncomingPushWithPayload in objC to bring the app into the foreground?
'notificationReceivedBackground' is not called on IOS, any solution would be helpful ...
Any progress so far?
I was thinking about this problem in an Android sort of way. For iOS the right choice for my situation was to use CallKit.
I realize this doesn't solve the issue above, but for voip I didn't need to solve it. Hope this helps someone.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
The issue has been closed for inactivity.
Most helpful comment
'notificationReceivedBackground' is not called on IOS, any solution would be helpful ...