简体   繁体   English

Titanium推送通知(Android接收通知中的延迟)

[英]Titanium Push Notification (Delay in Receiving Notification Android)

I have implemented Appcelerator Titanium push notification in my application (Android and IOS) for 2 things: 我已经在我的应用程序(Android和IOS)中为两件事实现了Appcelerator Titanium推送通知:
1. Chat push notification 1.聊天推送通知
2. comment push notification 2.评论推送通知

Problem: Right now I am testing in Android and I am facing problem while receiving Notification from appcelerator. 问题:目前,我正在Android中进行测试,并且在收到来自appcelerator的通知时遇到问题。 Sometimes user is getting notification instant, but Sometimes he is getting notification with some delay (1 hour or sometimes 2 hour). 有时用户会立即收到通知,但有时他会有所延迟(1小时或有时2小时)。

For example: Suppose I have send a chat message to other user, then our local server will send this detail to Appcelerator, after that Sometimes other user is getting notification instant from appcelerator But Sometimes He (other user) is getting notification With some Delay (1 hour or Sometimes 2 hour). 例如:假设我已将聊天消息发送给其他用户,则我们的本地服务器会将此详细信息发送给Appcelerator,此后,有时其他用户正在从appcelerator即时获得通知,但有时他(其他用户)正在收到具有某些延迟的通知( 1小时或有时2小时)。 Same with Comment Push notification. 与评论推送通知相同。

Please can any one help me, how can I get Instant Notification from Appcelerator. 请任何人帮助我,如何从Appcelerator获得即时通知。

Thanks 谢谢
Mohit Jain 莫希特·贾恩(Mohit Jain)

Notifications are NOT guaranteed to arrive for a user and there is NO quality of service guarantee either (ie will be sent within 10 mins etc). 不能保证用户会收到通知,也不能保证服务质量(例如,将在10分钟内发送通知等)。 Using notifications is great but can be unreliable. 使用通知很棒,但可能不可靠。 I'd say that only around 90% of them get through to those users who have agreed to receive them. 我想说的是,只有大约90%的用户可以访问那些同意接收它们的用户。 There can be issues with users registering (accepting pushes) and those registrations getting through to Apple & Google properly. 用户注册(接受推送)时,可能会出现问题,并且这些注册会正确通过Apple和Google。 Apple's and Google's servers do not guarantee delivery and keep in mind that there can be significant delivery delays. 苹果和谷歌的服务器不保证交付,请记住交付时间可能会很长。 And order of sending is not guaranteed either. 并且也不保证发送顺序。 Put all that together and the behaviour you are seeing is pretty much standard and you can't fix it. 将所有这些放在一起,您看到的行为几乎是标准的 ,您无法修复。

Now, having said that, we have used websocket communication to enable real-time communication with devices while the app is running. 话虽如此,我们已经使用websocket通信在应用运行时启用与设备的实时通信。 Not sure if that helps you or not. 不确定是否对您有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM