简体   繁体   English

如果我们强制手动停止应用程序,推送通知将不起作用

[英]Push Notification not working if we force stop the app mannually

I have moved my app notification code from C2DM to GCM.我已将我的应用程序通知代码从 C2DM 移至 GCM。 In this i have a inbox for notification.在这个我有一个通知收件箱。 Everything is working as expected.一切都按预期工作。 But notification doesn't work in below scenario:但通知在以下情况下不起作用:

I have installed the app.我已经安装了该应用程序。 If I send notification, it comes to notification bar and in inbox also.如果我发送通知,它也会出现在通知栏和收件箱中。 If i force close the application from settings.如果我从设置中强制关闭应用程序。 Now, If we try to send the notification again to the device then we are not getting notification in notification bar but it is coming in notification inbox.现在,如果我们尝试再次向设备发送通知,那么我们不会在通知栏中收到通知,而是在通知收件箱中收到通知。

Note: I am using android 2.3.注意:我使用的是 android 2.3。
For ICS and Jelly Bean: I have read in this post that if you force stop the app from settings then u will not get notification.对于 ICS 和 Jelly Bean:我在这篇文章中读到,如果您从设置中强制停止应用程序,那么您将不会收到通知。 Is it same problem here?这里有同样的问题吗?

thanks in advance.提前致谢。

Yes that's true.是的,这是真的。 If you force stop the app, the message can't be received (unlike iOS/APNS).如果您强制停止应用程序,则无法接收消息(与 iOS/APNS 不同)。 The Xtify service will be restarted and messages will be received when the user re-opens the app or the user restarts his/her device.当用户重新打开应用程序或用户重新启动他/她的设备时,将重新启动 Xtify 服务并接收消息。

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

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