android - Gcm 消息不会以棉花糖形式出现,但其余所有设备都在接收

标签 android google-cloud-messaging android-6.0-marshmallow

我已经集成了 gcm 通知。 一切正常。 服务器正在提供成功,但棉花糖上没有收到通知。 我也测试过其他版本。他们收到罚款。

最佳答案

看看 http://android-developers.blogspot.ae/2015/10/how-google-cloud-messaging-handles-doze.html

Android 6.0 Marshmallow 引入了一项名为“Doze”的新节能功能,这可能会影响您的通知。

when using normal priority (the default priority), there are a number of different behaviors when the device is in Doze, including:

The most important change is that messages will be batched for devices in Doze. When the device enters its idle maintenance window, the batch of messages will be received.

We discard messages whose time_to_live expires while the device is in Doze (including TTL=0).

关于android - Gcm 消息不会以棉花糖形式出现,但其余所有设备都在接收,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37413041/

相关文章:

android - 我的应用程序在最初启动到设备时加载,但在我退出应用程序并返回后,它甚至不会尝试启动

android - Volley 库和 HTTPS 请求

java - 我从 gcm 收到消息 ID。但我在模拟器上没有收到

java - 借鉴其他应用问题 |开关变灰

安卓 6.0 棉花糖。无法写入 SD 卡

android - 我的应用程序没有出现在模拟器中

android - 如何在 Android Studio 中将 App Engine 后端设置为 "Run As Web Application"

android - XMPP Android 实现指南

安卓检查权限

android - 将包含 ID 的字符串转换为整数 ID