【问题标题】:push notification does not work using the web推送通知无法使用网络
【发布时间】:2016-02-12 13:14:06
【问题描述】:

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

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

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

【问题讨论】:

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


    【解决方案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 中收到通知。

    【讨论】:

    • 不,没关系,在使用postermanClient,但使用我的后台使用此功能时不起作用
    猜你喜欢
    • 2019-05-13
    • 1970-01-01
    • 1970-01-01
    • 2019-10-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多