推送通知在网络上不起作用

push notification does not work using the web

我想向 Android phone(使用 GCM)和 iOS phone(使用 APNS)发送推送.我想通过我的 backoffice 发送它,所以我通过海报插件测试了我的网络服务并且它有效,我收到了该通知。

但是当我使用我的 backoffice 发送它时,它不起作用。

我是否必须使用其他网络库才能将我的通知发送到手机 phone ???

您可以在 Android 中使用 PostMan 客户端本身发送推送通知。只需按照以下步骤操作即可。

1)Use the Post method for the below URL.

 https://android.googleapis.com/gcm/send

2) Just add Header as below

'Authorization: key=' Your Google API Key,
 'Content-Type: application/json'

3)Add the parameter as
{
 "registration_ids" : "Your GCM registration Key",
 "data" : "Your Messager"

}

您将在 GCP IntentService 中收到通知。