Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. this.messaging = rnFirebase.messaging().onMessage((notification) => {
  2. const { data } = notification
  3. const {title, body} = data
  4. const notificacao = new rnFirebase.notifications.Notification()
  5. .setNotificationId(notification.messageId)
  6. .setTitle(title)
  7. .setBody(body)
  8.  
  9. notificacao.ios.setBadge(1)
  10. console.log(data)
  11. if(title != '')
  12. rnFirebase.notifications().displayNotification(notificacao)
  13.  
  14. })
  15.  
  16. insira o cรณdigo aqui
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement