简体   繁体   English

关于自动推送通知

[英]Regarding automatic Push Notification

I am using the Google-GCM service for pushing notifications to a mobile device & building this application in Java EE.我正在使用 Google-GCM 服务将通知推送到移动设备并在 Java EE 中构建此应用程序。

I'm perfectly able to push notifications to the mobile device.我完全能够将通知推送到移动设备。 And from the client-end (mobile) I'm able to receive input(string).从客户端(移动)我能够接收输入(字符串)。

Henceforth my conceptual question starts: When I'm receiving input from a mobile (let's say: "Hello, Server"), I'm trying to build an automated process on the server-side and in reply it will push a notification (let's say: "Hi client, I'm fine; How are you?") automatically.

I want to grab some idea to push the notification automatically whenever the mobile device is registered.我想抓住一些想法,每当注册移动设备时自动推送通知。 How do I do it?我该怎么做?

All realistic implementations of GCM include a stage where an app receives a RegID, and communicates the RegID back to the server, typically via an HTTP service, typically along with some other business specific data. GCM 的所有实际实现都包括一个阶段,在该阶段应用程序接收 RegID,并将 RegID 传回服务器,通常通过 HTTP 服务,通常与一些其他业务特定数据一起。 The server would store the RegID, associating it with other data, and later use it to send messages.服务器将存储 RegID,将其与其他数据相关联,然后使用它来发送消息。

Have you implemented automated the delivery of the GCM registration ID to the server yet?您是否实现了将 GCM 注册 ID 自动传送到服务器的功能? If so, in the same piece of code, you might as well push a notification back.如果是这样,在同一段代码中,您不妨将通知推回。 If not, do put together some.如果没有,请放在一起。 Server-side implementation would depend on your server's platform, naturally.服务器端的实现自然取决于您的服务器平台。

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

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