Android Push Notification System的工作原理 [英] Working principles of Android Push Notification System

查看:179
本文介绍了Android Push Notification System的工作原理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个与Android Push Notification System有关的问题:

I have two questions related to Android Push Notification System:

  1. 此系统的工作原理是什么?客户端将自己的IP发送到Google Cloud Messaging Service(例如,当其切换自己的IP时)?所以这是一种汇集吗?.
  2. 您如何知道Google Cloud Messaging Service调查"了通知消息的内容(在服务器中创建并分发给客户端)?

推荐答案

回答有关GCM服务如何与客户端联系的问题,GCM客户端与GCM联系以创建连接.您正确地说,设备地址会随着设备断开和重新连接而改变,因此GCM无法从服务器端启动连接.

Answering the question about how GCM service contacts the client, the GCM client contacts GCM to create the connection. You are correct that device addresses change as the device disconnects and reconnects so GCM cannot initiate the connection from the server side.

此连接将得到尽可能多的维护,并且不会为特定消息创建.

This connection is maintained as much as possible and is not created for specific messages.

注册ID可以识别设备和应用,并允许GCM将消息路由到设备(如果已连接).如果未连接,则GCM需要等待直到设备重新连接.

The registration id identifies the device and app and allows GCM to route the message to the device, if it is connected. If it is not connected, GCM needs to wait until the device reconnects.

这篇关于Android Push Notification System的工作原理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆