我们能否通过设备的蓝牙或BLE信号唤醒Android应用-Android 8.0及更高版本 [英] Can we wakeup the Android app via bluetooth or BLE signal from a device - Android 8.0 and above
问题描述
我正在尝试通过附近的蓝牙设备唤醒我的android应用.如果我强制关闭应用程序(在Android 8.0及更高版本中),并且在将我的Android设备靠近BLE设备时,是否可以获取回调或意图回调,以便可以推动ForeGround服务并使应用程序保持唤醒状态.
I am trying to wakeup my android app via nearby bluetooth devices. If I force close the app (in Android 8.0 and above), and when I bring my Android device near to a BLE device, can I get a callback or intent callback so that I can push a ForeGround service and make the app stay awake.
我尝试扫描附近的BLE设备,但是当应用被强行杀死时,BLE扫描停止,并且无法通过BLE附近的设备唤醒应用.
I tried scanning for the BLE devices nearby but when the app is force killed, the BLE scan stops and I cannot wake up the app via BLE nearby devices.
推荐答案
Force stop
完全杀死应用程序.它不会获得FCM,也不会删除AlarmManager
中的警报,等等.因此,应用程序进程被完全杀死,并且所有信息也被删除.
Force stop
kills application totally. It won't get FCMs, alarms in AlarmManager
are removed too, etc. So app processes are totally killed, and any info is removed.
这篇关于我们能否通过设备的蓝牙或BLE信号唤醒Android应用-Android 8.0及更高版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!