Android推送通知系统的工作原理 [英] Working principles of Android Push NotificationSystem

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

问题描述

我有两个与Android推送通知系统相关的问题:

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推送通知系统的工作原理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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