Android 是否支持近乎实时的推送通知? [英] Does Android support near real time push notification?

查看:17
本文介绍了Android 是否支持近乎实时的推送通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近了解到 iPhone 应用程序能够接收几乎即时的应用通知 应用通知.

I recently learned about the ability of iPhone apps to receive nearly instantaneous notifications to apps notifications to apps.

这是以推送通知的形式提供的,这是一种定制的协议,它保持与 iPhone 的始终在线数据连接,并将二进制数据包消息发送到应用程序,该应用程序难以置信快速地弹出警报,介于 0.5- 从服务器应用程序发送到手机应用程序响应时间为 5 秒.这是作为数据发送的 - 而不是 SMS - 在非常非常小的数据包中作为数据计划的一部分而不是作为传入消息进行收费.

This is provided in the form of push notifications, a bespoke protocol which keeps an always on data connection to the iPhone and messages binary packets to the app, which pops up alerts incredibly quickly, between 0.5 - 5 seconds from server app send to phone app response time. This is sent as data - rather than SMS - in very very small packets charged as part of the data plan not as incoming messages.

我想知道在使用 Android 时是否有类似的工具,或者是否可以使用 Android API 实现与此类似的功能.为了澄清,我将类似定义为:

I would like to know if, using Android, there is either a similar facility, or whether it's possible to implement something close to this using Android APIs. To clarify, I define similar as:

  • 不是短信,而是一些数据驱动的解决方案
  • 尽可能实时
  • 具有可扩展性,即作为移动应用的服务器部分,我可以在几秒钟内通知数千个应用实例

我很欣赏该应用程序可以是基于拉取的、HTTP 请求/响应风格,但理想情况下,我不想仅仅为了检查通知而进行大量轮询;除此之外,这就像在耗尽数据计划.

I appreciate the app could be pull based, HTTP request/response style, but ideally I don't want to be polling that heavily just to check for notification; besides which it's like drip draining the data plan.

推荐答案

Firebase Cloud Messaging FCM FAQ 是 GCM 的新版本.它继承了 GCM 的核心基础架构,可在 Android、iOS 和 Chrome 上可靠地传递消息.不过,他们将继续支持 GCM,因为如今很多开发者都在使用 GCM SDK 来处理通知,而客户端应用升级需要时间.

Firebase Cloud Messaging FCM FAQ is the new version of GCM. It inherits GCM’s core infrastructure to deliver messages reliably on Android, iOS and Chrome. However they'll continue to support GCM because lot of developers are using GCM SDKs today to handle notifications, and client app upgrade takes time.

截至 2012 年 6 月 26 日,Google 云消息传递是向设备上运行的应用程序发送消息的首选方式.

As of June 26, 2012, Google Cloud Messaging is the preferred way of sending messages to applications running on devices.

以前(现在已弃用)该服务称为云到设备消息传递.

Previously (and now deprecated), the service was called Cloud To Device Messaging.

这篇关于Android 是否支持近乎实时的推送通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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