diff --git a/README.md b/README.md index 7ae43d35a90fa21243d34321e3153ece24152984..77c2112df9b3dbf8c92c48592b2593dfcfcbc6b6 100644 --- a/README.md +++ b/README.md @@ -339,7 +339,10 @@ class App extends Component { // initial notification contains the notification that launchs the app. If user launchs app by clicking banner, the banner notification info will be here rather than through FCM.on event // sometimes Android kills activity when app goes to background, and when resume it broadcasts notification before JS is run. You can use FCM.getInitialNotification() to capture those missed events. - FCM.getInitialNotification().then(notif=>console.log(notif)); + // initial notification will be triggered all the time even when open app by icon so send some action identifier when you send notification + FCM.getInitialNotification().then(notif=>{ + console.log(notif) + }); } componentWillUnmount() {