From e8d28c45e484be6c5178c26a82b4b8db93085dad Mon Sep 17 00:00:00 2001 From: Libin Lu Date: Tue, 10 Oct 2017 09:25:30 -0400 Subject: [PATCH] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7ae43d3..77c2112 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() { -- 2.26.2