应用程序强制停止后GCM推送通知的作品? [英] GCM push notification works after app Force Stop?

查看:597
本文介绍了应用程序强制停止后GCM推送通知的作品?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 GCM 来获取推送通知,现在如果我强制停止该应用从设置在Android设备上,将它能够得到推送通知?

I have used GCM to get push notifications, now if I Force stop the app from the settings on the Android device, will it be able to get push notifications?

我已阅读,说在这种情况下,一个应用程序无法收到通知的许多职位。是否有可能得到通知?

I have read many posts that say in this case an app cannot receive notifications. Is there any possibility to get notifications?

有没有其他的办法,以及对吗?

Is there any other way as well for this ?

在此先感谢

推荐答案

一旦强行停止设置你的应用程序,你的code将不会运行直到有手动运行的组件之一(即用户手动启动一个活性)。

Once you force-stop your app from Settings, your code will not run until something manually runs one of your components (ie the user manually launches an activity).

因此后强制停止从设置你的应用程序,您将不会收到GCM消息。
如果你想获得通知,您必须手动重新启动应用程序。

Therefore after force-stopping your app from Settings, you will not receive GCM messages.
If you want to get notifications you have to manually restart your app.

这是由设计,由于Android 3.1。
应用是处于停止状态时,不接收广播意图。

This is by design since Android 3.1.
Apps that are in the stopped state do not receive broadcast Intents.

停止状态是:

  • 当应用程序最初安装(用户运行的东西之前, 该应用程序)的
  • 在一个强制停止。
  • when the app is initially installed (before the user runs something in the app) or
  • after a Force Stop.

您可以在这里找到更多关于这个:的http://开发商。 android.com/about/versions/android-3.1.html#launchcontrols

You can find more about this here: http://developer.android.com/about/versions/android-3.1.html#launchcontrols

这篇关于应用程序强制停止后GCM推送通知的作品?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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