Javascript 向特定设备发送通知

Javascript 向特定设备发送通知,javascript,firebase,polymer,firebase-cloud-messaging,polymerfire,Javascript,Firebase,Polymer,Firebase Cloud Messaging,Polymerfire,显示通知很容易 function spawnNotification(theBody,theIcon,theTitle) { var options = { body: theBody, icon: theIcon } var n = new Notification(theTitle,options); } 如何将其发送到特定设备(通过firebase消息接收令牌)。是否有to参数,如果有,我应该将其放置在哪里?有一个参数。您可以将其放置在消息负载中 其他相关文件

显示通知很容易

function spawnNotification(theBody,theIcon,theTitle) {
  var options = {
    body: theBody,
    icon: theIcon
  }
  var n = new Notification(theTitle,options);
}
如何将其发送到特定设备(通过firebase消息接收令牌)。是否有
to
参数,如果有,我应该将其放置在哪里?

有一个参数。您可以将其放置在消息负载中

其他相关文件: