react-native-fcm icon indicating copy to clipboard operation
react-native-fcm copied to clipboard

get notification data when user click into notification => app opened ( when app killed)

Open fukemy opened this issue 3 years ago • 0 comments

Hi. I tested with android when app totally closed. I got this function triggered when received notification:


messaging().onNotificationOpenedApp(remoteMessage => {
  console.log('Notification caused app to open from background state:', remoteMessage)
})

messaging()
  .getInitialNotification()
  .then(remoteMessage => {
    console.log('Notification caused app to open from quit state:', remoteMessage)
})

But when user click into notification, app opened without any callback, then i can not get message data. Can someone help?

fukemy avatar Sep 26 '22 13:09 fukemy