我有一个可以扫描附近蓝牙设备并将其显示在应用程序上的应用程序。当手机处于正常模式时,此方法工作正常,但是在同一部手机上使用android管理API策略时,它不会像以前一样显示任何结果
无法理解是什么原因造成的?
这是正在应用的政策
policy_json = '''
{
"applications": [
{
"packageName": "com.example.ble",
"installType": "FORCE_INSTALLED"
}
],
"debuggingFeaturesAllowed": true
}
'''
谢谢
找到了解决该问题的方法,未指定位置模式,因此无法获取位置。指向可能的位置模式的链接是https://developers.google.com/android/management/reference/rest/v1/enterprises.policies#LocationMode
由于某些未指定的原因,需要位置来扫描BLE设备
更新后的政策是
policy_json = '''
{
"applications": [
{
"packageName": "com.example.ble",
"installType": "FORCE_INSTALLED"
}
],
"locationMode": "SENSORS_ONLY",
"debuggingFeaturesAllowed": true
}
'''
希望这可以帮助
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句