向特定设备发送通知
Sending notification to a particular device
显示通知很简单
function spawnNotification(theBody,theIcon,theTitle) {
var options = {
body: theBody,
icon: theIcon
}
var n = new Notification(theTitle,options);
}
如何将它发送到特定设备(通过 firebase-messaging 收到的令牌)。是否有 to
参数,如果有,我应该把它放在哪里?
显示通知很简单
function spawnNotification(theBody,theIcon,theTitle) {
var options = {
body: theBody,
icon: theIcon
}
var n = new Notification(theTitle,options);
}
如何将它发送到特定设备(通过 firebase-messaging 收到的令牌)。是否有 to
参数,如果有,我应该把它放在哪里?