Commit 0e4aca82 authored by Libin Lu's avatar Libin Lu

update example

parent d78529a5
...@@ -66,7 +66,7 @@ class MainPage extends Component { ...@@ -66,7 +66,7 @@ class MainPage extends Component {
showLocalNotification() { showLocalNotification() {
FCM.presentLocalNotification({ 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 title: "Test Notification with action", // as FCM payload
body: "Force touch to reply", // as FCM payload (required) body: "Force touch to reply", // as FCM payload (required)
sound: "bell.mp3", // "default" or filename sound: "bell.mp3", // "default" or filename
......
...@@ -61,6 +61,9 @@ export function registerAppListener(navigation){ ...@@ -61,6 +61,9 @@ export function registerAppListener(navigation){
navigation.navigate('Detail') navigation.navigate('Detail')
}, 500) }, 500)
} }
setTimeout(()=>{
alert(`User tapped notification\n${JSON.stringify(notif)}`)
}, 500)
} }
if(Platform.OS ==='ios'){ if(Platform.OS ==='ios'){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment