0

Displaying a notification is easy

function spawnNotification(theBody,theIcon,theTitle) {
  var options = {
    body: theBody,
    icon: theIcon
  }
  var n = new Notification(theTitle,options);
}

How do I send it to a particular device(token received via firebase-messaging). Is there a to parameter and if there is, where do I place it?

AL.
  • 36,815
  • 10
  • 142
  • 281
Tevin Thuku
  • 437
  • 1
  • 8
  • 19

1 Answers1

1

There is a to parameter. You place it in your message payload.

Additional related docs:

AL.
  • 36,815
  • 10
  • 142
  • 281