FCM - 推送通知仅适用于控制台而不适用于邮递员

Mut*_*amy 4 firebase nativescript firebase-cloud-messaging

我的应用程序是用 NativeScript 开发的。对于 FCM,我使用nativescript-plugin-firebase.

每当我从 FCM 控制台尝试时,我都会收到推送通知。但是,当我从邮递员那里尝试时,我从未收到推送通知,如下所示。

URL : POST : https://fcm.googleapis.com/fcm/send
Headers : Authorization = key="******", Content-Type=application/json
Run Code Online (Sandbox Code Playgroud)

数据 :

{
    "data": {
        "title": "RAJA RAJA",
        "message": "another test",
        "name": "Muthukumar ME"
    },
    "to" : "**************************************"
}
Run Code Online (Sandbox Code Playgroud)

回复 :

{
    "multicast_id": 5806593945960213086,
    "success": 1,
    "failure": 0,
    "canonical_ids": 0,
    "results": [
        {
            "message_id": "0:1521623661699559%161a06bff9fd7ecd"
        }
    ]
}
Run Code Online (Sandbox Code Playgroud)

任何人都知道我错过了什么,即使我收到了成功的回复,当我尝试使用邮递员时,推送通知也不会到来。

Mut*_*amy 5

{ 
    "to" : "********",
    "priority": "high",
    "notification": {
        "title": "Title",
        "body" : "First Notification",
        "text": "Text"
    }
}
Run Code Online (Sandbox Code Playgroud)