简体   繁体   English

将推送通知从一台Android设备发送到其他使用GCM

[英]Send push notification from one Android device to other Using GCM

I am been using Parse for sending push notifications earlier and that does not seem to work well. 我一直在使用Parse来发送推送通知,这似乎不太好用。 I heard from the internet that we can send push notifications from one android device to another using GCM and I followed this official documentation . 我从互联网上听说我们可以使用GCM从一个Android设备向另一个设备发送推送通知,我按照这个官方文档 Before I get to implement it, I just need to know whether, we can send push notification from an Android device to another using this service. 在我实现它之前,我只需要知道是否可以使用此服务从Android设备向另一个设备发送推送通知。

I have the following doubts 我有以下疑惑

  1. How do I send the push notification to a specific device using another device with the help of GCM ? 如何在GCM的帮助下使用其他设备将推送通知发送到特定设备?
  2. What is the unique identifier that I must be using if the above question is possible ? 如果可能出现上述问题,我必须使用的唯一标识符是什么?
  3. Should I implement my own backend to save the unique identifiers about which the above question states ? 我应该实现自己的后端来保存上述问题所述的唯一标识符吗? Or is there a way that GCM can handle for me ? 或者GCM可以为我处理一种方式吗?

The answers to all your questions are in the documentation itself. 您所有问题的答案都在文档中。

1) Send Upstream message from Device A to the server and send Downstream message from server to Device B. 1)从设备A向服务器发送上游消息,并从服务器向设备B发送下游消息。
2) Instance ID API will provide a token which is the unique identifier. 2) 实例ID API将提供作为唯一标识符的令牌。
3) Yes you have to implement you server that will communicate with GCM connection server. 3)是的,您必须实现与GCM连接服务器通信的服务器。

All of which is explained on the overview page itself. 所有这些都在概述页面上进行解释。

I hope this answers your question. 我希望这回答了你的问题。 There is also a sample you can refer to. 您还可以参考一个示例

Also, a tutorial here . 另外, 这里有一个教程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android使用GCM和PHP将通知从设备发送到其他设备 - Android send notification from device to other device using GCM and PHP 如何将简单的“推送通知”从一台设备发送到另一台设备? - How to send simple "push notification" from one device to other device? 将GCM推送通知发送到设备 - Send GCM Push Notification to device 如何使用解析从一个Android设备向另一个Android设备发送推送通知? - How to send push notification from one android device to another android device using parse? 如何触发gcm向Android设备发送推送通知(使用Java服务器) - how to trigger a gcm to send a push notification to android device(using java server) 使用GCM在PHP中发送到Android设备的最大推送通知数 - Maximum number of push notification sent to Android device in PHP using GCM 使用gcm的android推送通知 - android push notification using gcm 如何使用GCM在Android中发送大小图像作为推送通知 - How to send small and large image as a push notification in android using GCM 是否可以直接从Android应用程序向GCM发送推送通知? - Is it possible to send Push Notification to GCM directly from android app? 将android中的推送通知从设备发送到另一个 - send push notification in android from device to another
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM