Commit 1ab567cf authored by Libin Lu's avatar Libin Lu

update example

parent 41091ebb
...@@ -12,15 +12,7 @@ class FirebaseClient { ...@@ -12,15 +12,7 @@ class FirebaseClient {
} }
sendNotification(token) { sendNotification(token) {
let body = { let body;
"to": token,
"notification":{
"title": "Simple FCM Client",
"body": "This is a notification with only NOTIFICATION.",
"sound": "default"
},
"priority": 10
}
if(Platform.OS === 'android'){ if(Platform.OS === 'android'){
body = { body = {
...@@ -30,11 +22,22 @@ class FirebaseClient { ...@@ -30,11 +22,22 @@ class FirebaseClient {
"title": "Simple FCM Client", "title": "Simple FCM Client",
"body": "This is a notification with only NOTIFICATION.", "body": "This is a notification with only NOTIFICATION.",
"sound": "default", "sound": "default",
"priority": "high" "priority": "high",
"show_in_foreground": true
} }
}, },
"priority": 10 "priority": 10
} }
} else {
body = {
"to": token,
"notification":{
"title": "Simple FCM Client",
"body": "This is a notification with only NOTIFICATION.",
"sound": "default"
},
"priority": 10
}
} }
this._send(JSON.stringify(body), "notification"); this._send(JSON.stringify(body), "notification");
......
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