Hi, I'm using this library to test out the local notification on ios.
But it doesn't work, I already follow all the instructions.
Does it doesn't work on simulator ?
I had the same problem but I later realized, the notifications were not showing because the application was in the foreground, this caused the 'notificationReceivedForeground' event to get fired.
You might want to put your call to 'NotificationsIOS.localNotification' in a setTimeout. This way you can switch to the home screen before the notification is sent.
I was able to get iOS local notifications by setting the fireDate to be a future time and minimizing the app, but Android does not have a fireDate. I tried setTimeout, but that does not work because I believe the JS is frozen while the app is in the background. The NotificationsAndroid.setNotificationReceivedListener does not fire when I send a local notification. I see a log from my emulator console D/ReactNativeNotifs: Native method invocation: postLocalNotification which shows I did hit postLocalNotification in RNNotificationsModule.java, but the listener does not fire.
same issue here...
Any fix?
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.
fireDate not working in android
Most helpful comment
I was able to get iOS local notifications by setting the
fireDateto be a future time and minimizing the app, but Android does not have afireDate. I tried setTimeout, but that does not work because I believe the JS is frozen while the app is in the background. TheNotificationsAndroid.setNotificationReceivedListenerdoes not fire when I send a local notification. I see a log from my emulator consoleD/ReactNativeNotifs: Native method invocation: postLocalNotificationwhich shows I did hitpostLocalNotificationinRNNotificationsModule.java, but the listener does not fire.