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

update example

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