From 8f200351bc37f0ee984aadb3a22ef53234302176 Mon Sep 17 00:00:00 2001 From: Libin Lu Date: Sat, 4 Jun 2016 14:05:30 -0400 Subject: [PATCH] update readme for initial data feature --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 000837e..8712db2 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,18 @@ this.fcmTokenLsnr.remove(); } ``` +### Pass `click_action` and `data` when sending notification +When app is not running when user clicks notification, notification data will be passed into +- `FCM.initialAction`(contains `click_action` in notification payload +- `FCM.initialData` (contains `data` payload if you send together with notification) + +When app is running in background +- IOS will receive notificaton from `FCMNotificationReceived` event +- Android will reload the whole react app (I'm looking for suggestions to fix that) + +When app is running in foreground +- Both will receive notificaton from `FCMNotificationReceived` event + ## Q & A ### My android build is failing Try update your SDK and google play service -- 2.26.2