From 0e4aca82647fe9db8e652e06a07fb5fcf3524660 Mon Sep 17 00:00:00 2001 From: Libin Lu Date: Tue, 6 Mar 2018 16:39:14 -0500 Subject: [PATCH] update example --- Examples/simple-fcm-client/app/App.js | 2 +- Examples/simple-fcm-client/app/Listeners.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Examples/simple-fcm-client/app/App.js b/Examples/simple-fcm-client/app/App.js index c1e3754..fbcc2e8 100644 --- a/Examples/simple-fcm-client/app/App.js +++ b/Examples/simple-fcm-client/app/App.js @@ -66,7 +66,7 @@ class MainPage extends Component { showLocalNotification() { FCM.presentLocalNotification({ - id: "UNIQ_ID_STRING", // (optional for instant notification) + id: new Date().valueOf().toString(), // (optional for instant notification) title: "Test Notification with action", // as FCM payload body: "Force touch to reply", // as FCM payload (required) sound: "bell.mp3", // "default" or filename diff --git a/Examples/simple-fcm-client/app/Listeners.js b/Examples/simple-fcm-client/app/Listeners.js index e76186c..942e9f2 100644 --- a/Examples/simple-fcm-client/app/Listeners.js +++ b/Examples/simple-fcm-client/app/Listeners.js @@ -61,6 +61,9 @@ export function registerAppListener(navigation){ navigation.navigate('Detail') }, 500) } + setTimeout(()=>{ + alert(`User tapped notification\n${JSON.stringify(notif)}`) + }, 500) } if(Platform.OS ==='ios'){ -- 2.26.2