简体   繁体   English

应用被杀死时接收Fence回调

[英]Receive Fence callbacks when app is killed

I'm using Fence Api in Google Awareness Api to create a geofence and trigger it when the user enters or exists the location. 我正在Google Awareness Api中使用Fence Api创建地理围栏,并在用户输入或存在该位置时触发它。 But this is working fine if the app is running. 但是,如果应用程序正在运行,则可以正常工作。 If the app is killed, I'm not receiving any status. 如果该应用程序被杀死,则我没有任何状态。

I've a static broadcast receiver in manifest which will receive the pending intent for fence callbacks. 我在清单中有一个静态广播接收器,它将接收篱笆回调的挂起意图。

I'm neither unregistering reciever nor the fence. 我既不注销收款人,也不是篱笆。

I don't know why I'm not able to receive the fence callbacks when the app is killed. 我不知道为什么该应用被杀死后为什么我无法接收围栏回调。

Try running the service as a foregroundservice and/or binding the service. 尝试将服务作为前台服务运行和/或绑定服务。 It'll be easier to answer if you post some code. 如果发布一些代码,回答起来会更容易。

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

相关问题 应用程序被杀时无法接收SIP呼叫 - Unable to receive SIP calls when app is killed 应用被杀死时接收PubNub推送通知 - Receive PubNub Push Notifications when app is killed 当我收到应用程序 OTA 更新时,我的应用程序会被终止吗? - Will my app get killed when i receive app OTA updates? 在Android上杀死应用时收到系统托盘通知 - Receive system tray notification when app killed on Android 应用程序被杀死时Firebase不会收到消息-Android Oreo - Firebase don't receive message when app is killed - Android Oreo 当应用程序被杀死时,有没有办法在 flutter 中接收数据通知? - Is there a way to receive data notifications in flutter when the app is killed? 应用程式被杀死时,Android无法接收到解析推送通知 - Unable tor receive parse push notifications when app is killed Android 即使应用被杀死,如何继续接收地理围栏通知? - How to receive continuous geofence notifications even when app is killed? Firebase云消息传递服务 - 即使应用程序被终止也会收到通知 - Firebase Cloud Messaging Service - Receive Notifications even when app is killed 应用程序被杀死时是否可以接收 FCM 推送通知? - Is it possible to receive FCM push notifications when app is killed?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM