问题
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