[英]how to continue to receive GCM notification when app killed from app tray in Ionic 2
I am a newbie in Ionic 2, I have developed an app where I use FCM push notification in Android, and I am able to receive notification when app is in foreground or in background. 我是Ionic 2的新手,我开发了一个应用程序,可以在Android中使用FCM推送通知,并且在应用程序处于前台或后台时都可以接收通知。 But I am not able to receive notification when app is removed from background. 但是当应用程序从后台删除时,我无法收到通知。 Is there a way to run gcmListenerService
& gcmBroadcastReceiver
from cordova
as the native plugin broadcaster does not serves the purpose. 有没有一种方法可以从cordova
运行gcmListenerService
和gcmBroadcastReceiver
,因为本机插件广播程序无法达到目的。
This can be done by using Service in android native code implementation. 这可以通过在Android本机代码实现中使用Service来完成。 You can either create a plugin for your app for doing your task in background or can refer to this plugin and check if it is helpful in your case. 您可以为您的应用创建一个插件以在后台执行任务,也可以引用该插件并检查是否对您有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.