简体   繁体   English

当应用程序从Ionic 2中的应用程序托盘中被杀死时,如何继续接收GCM通知

[英]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运行gcmListenerServicegcmBroadcastReceiver ,因为本机插件广播程序无法达到目的。

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.

相关问题 在Android上杀死应用时收到系统托盘通知 - Receive system tray notification when app killed on Android Android-GCM在打开应用程序时从gcm接收通知 - Android - GCM receive notification from gcm when open app 当从通知托盘按下推送通知时,Android GCM 使应用程序崩溃 - Android GCM Crashes App when Push Notification is pressed from Notification Tray 未从通知托盘中获取捆绑包中的 Pubnub 有效负载。 当应用程序被杀死时 - Not getting Pubnub payload in bundle from Notification tray. When app is killed 应用程序被杀死时未收到GCM通知(非强制终止) - GCM notification is not receiving when app is killed( not force kill) 当从联想等某些设备上的多任务托盘中杀死应用程序时,Android应用程序未收到Firebase推送通知 - Android app not receiving Firebase Push Notification when application is killed from multi-task tray on some devices like lenovo 应用被终止后继续服务 - Continue service when app is killed 使用 FCM 杀死应用程序时,Android 无法接收通知 - Android unable to receive notification when app is killed using FCM 应用程序被杀死后,如何防止通知消失? - How do you keep a notification from disappearing when the app is killed? 从应用服务器接收GCM推送通知消息的步骤 - Steps to receive GCM push notification message from app server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM