-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
"popInitialNotification" always return "undefined" #2057
Comments
Take time to search in issue history |
@Dallas62 Note: Iam on IOS and my app is not in background app is closed/killed. |
For Android you can look at: https://github.com/zo0r/react-native-push-notification/issues?q=is%3Aissue+splashscreen
@Override
public void onNewIntent(Intent intent) {
...
super.onNewIntent(intent);
...
} For iOS: |
@Dallas62 , Does this “popInitialNotification” method works for local notifications as well or just for remote notification?? |
It's working only from killed state, but yes for all kind of notifications |
@Dallas62 I've searched through lot of history and still struggling to handle, on iOS, notifications from a killed state. I've seen a couple random things saying to disabled remote debugging and to build the product in release mode, strange that those would interfere with notifications but I did that. Given my understanding of So, I see I've tried some other things and started messing around with PNIOS.getInitialNotification with no luck. I don't want to use an iOS only handler anyway though. From the history of this problem, where would you advise that I look to get notification handling from killed state working on iOS/Android? |
Hey @Dallas62, I am new to this package. what i understood is popInitialNotification method is for a situation when your app is killed and you tap on notification. I impleted the logic but the current behaviour is sometimes i am getting notification as an object in a callback but sometime undefined. Now when I am gettting an object, My app is open and i get the notification then killing the app and tapping on notification redirects to desired screen. Second case when app is already killed and notification came, in this case tapping on notification getting undefined and hence no redirection. Could you please help I've been stuck on this for like 5 days. |
Bug
popInitialNotification method always return 'undefined' for local notification. I have tried in both scenarios while the app in background and while the app is closed . Tried both localNotificationSchedule, localNotification methods.
Environment info
react-native info
output:Library version: x.x.x
Steps To Reproduce
...
Describe what you expected to happen:
1.PushNotification.popInitialNotification event should return with local notification details which user clicked.
2.
Reproducible sample code
The text was updated successfully, but these errors were encountered: