[英]Push notifications arrive after a long time on some devices
On Android, I have been experiencing long push delay in some devices (minutes, half an hour). 在Android上,我在某些设备上经历了长时间的推送延迟(几分钟半小时)。 Seems like the device is asleep (but not for WhatsApp). 似乎该设备正在睡眠(但不适用于WhatsApp)。 Even on Pre-Marshmallow devices. 即使在棉花糖前设备上。
After a while they don't respond to push . 一段时间后他们对推送没有反应 。
I have created a simple app (copied Google's Cloud Messaging client sample ). 我创建了一个简单的应用程序(复制了Google的Cloud Messaging客户端示例 )。
Tried to send push via The Firebase Console, setting priority to HIGH and made sure it works. 尝试通过Firebase控制台发送推送,将优先级设置为HIGH并确保它可以工作。
Experiment 1: After a while - tried to send. 实验1:过一会儿-尝试发送。 The device is not responding. 设备无响应。
Experiment 2: Tried to use Telegram and WhatsApp. 实验2:尝试使用Telegram和WhatsApp。 Message passes immediately on both. 消息立即传递给双方。
Experiment 3: Tried the my test app again. 实验3:再次尝试了我的测试应用。 Not working. 不工作
Experiment 4: Tried to downgrade from FCM to GCM and all the way to C2DM. 实验4:尝试从FCM降级到GCM,并一直降级到C2DM。 Same thing, not working. 同样的事情,不起作用。
Any ideas? 有任何想法吗?
To make it clear: 明确说明:
priority:high
on the payload. 我对有效负载使用priority:high
。 Possible clue: some of my customers are using VMWare AirWatch. 可能的线索:我的一些客户正在使用VMWare AirWatch。 anybody know about any issues related to AirWatch and Push? 有人知道与AirWatch和Push相关的任何问题吗?
This is not a complete answer so I can't mark this question "Answered". 这不是一个完整的答案,因此我无法将此问题标记为“已回答”。
I found some alternative push mechanism called Pushy . 我发现了另一种称为Pushy的推送机制。 It's mentioned quite a lot in Stack Overflow. 在Stack Overflow中已经提到了很多。
Pros: 优点:
SERVICE_NOT_AVAILABLE
issue. 这也是解决SERVICE_NOT_AVAILABLE
问题的一种解决方法。 Cons: 缺点:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.