简体   繁体   English

Google Cloud Messaging单个请求

[英]Google Cloud Messaging single request

I've been searching over the web but I can't seem to find some straight answer. 我一直在网上搜索,但似乎找不到直接的答案。 I've got an application developed and now I need to add it notifications. 我已经开发了一个应用程序,现在需要添加通知。 My issue is that I need each device to be unique and send each one of them a different notification. 我的问题是,我需要每个设备都是唯一的,并向每个设备发送不同的通知。 (I don't mean ONE UNIQUE notification) but I mean to send some users a notification and others don't. (我不是说一个唯一的通知),而是要向一些用户发送通知,而其他人则不会。 How can this be done? 如何才能做到这一点?

As a part of the GCM infrastructure, you will need to have your own web application that will allow individual instances of your app to register. 作为GCM基础结构的一部分,您将需要拥有自己的Web应用程序,以允许您的应用程序的各个实例进行注册。 When this happens, your Android application will pass to the web application a registration ID along with any additional information that you can use to identify the device. 发生这种情况时,您的Android应用程序会将注册ID以及可用于识别设备的所有其他信息传递给Web应用程序。 Once you have this information stored, you can pick and choose which device should receive your notification. 存储此信息后,您可以选择要接收通知的设备。

See: Architectural Overview section in the http://developer.android.com/google/gcm/gcm.html 请参阅: http://developer.android.com/google/gcm/gcm.html中的“架构概述”部分

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM