Я пытаюсь отправить push-уведомление fcm-node на устройство.Я получил успех, но уведомление не было получено.Вот мой код:
const FCM = require('fcm-node');
let sendNotification = function(regToken) {
var serverKey = 'MY_SERVER_KEY';
var fcm = new FCM(serverKey);
var message = {
to: regToken,
notification: {
title: 'Title of push notification',
body: 'Body of push notification',
priority: "high",
time_to_live : 20
}
};
fcm.send(message, function(err, response){
if (err) {
console.log("Something has gone wrong!", err);
} else {
console.log("Successfully sent with response: ", response);
}
});
}
и я получаю:
Successfully sent with response: {"multicast_id":8758415454661889533,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1543920988555705%03634db303634db3"}]}