Sending push notification from Angular and Firebase server

别说谁变了你拦得住时间么 提交于 2020-04-30 06:33:06

问题


I am able to send Push Notification using Postman. I don't want to use a separate server and send Push Notifications using PHP.

Current using POST method - https://fcm.googleapis.com/fcm/send

As I am using Firestore as database and Firebase as hosting to host my app

How can I send notifications using Firebase server. Below is what I am using via Postman to send a notification at the moment.

{
 "to": "my token id",
 "data": {
  "title": "Push Message",
  "message": "This is notification will change tab",
  "sound": "default",
  "badge": 2,
  "page": "offline-storage",
  "taskid":156
 },
 "notification":{
    "title": "Push Message",
  "message": "This is notification will change tab",
  "sound": "default",
  "badge": 2,
  "page": "offline-storage",
  "taskid":156
 }
}

Screenshot attached

来源:https://stackoverflow.com/questions/61488555/sending-push-notification-from-angular-and-firebase-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!