推送通知无法使用网络

时间:2016-02-12 13:14:07

标签: android ios web-services push-notification token

我想发送推送到Android手机(使用GCM)和iOS手机(使用APNS)。我想通过我的backoffice发送它,所以我测试了我的网络服务通过海报插件,它工作,我收到了通知。

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

我是否必须使用其他图书馆才能将我的通知发送到手机????

1 个答案:

答案 0 :(得分:1)

您可以在Android中使用PostManClient本身发送PushNotification。只需按照以下程序操作即可。

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"

}

您将收到GCMIntentService中的通知。

相关问题