zo0r / react-native-push-notification

React Native Local and Remote Notifications
MIT License
6.73k stars 2.05k forks source link

Pushnotification.popInitialNotification() is returning undefined when notification is received in kill state. #2413

Open vr1Ravi opened 3 weeks ago

vr1Ravi commented 3 weeks ago

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 app opens and redirects you to specific screen. 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 anyone please help I've been stuck on this for like 5 days.