当策略应用于设备时,蓝牙扫描和显示设备不工作
Bluetooth scan and display devices not working when policy applied to device
我有一个应用程序可以扫描附近的蓝牙设备并将它们显示在应用程序上。这在 phone 处于正常模式时工作正常,但是当在同一 phone 上使用 android 管理 API 策略时,它不会像以前那样显示任何结果[=11] =]
无法理解是什么原因造成的?
这是正在应用的政策
policy_json = '''
{
"applications": [
{
"packageName": "com.example.ble",
"installType": "FORCE_INSTALLED"
}
],
"debuggingFeaturesAllowed": true
}
'''
谢谢
已找到问题的解决方案,未指定定位模式,因此无法获取位置。
link 可能的位置模式是 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
}
'''
希望对您有所帮助
我有一个应用程序可以扫描附近的蓝牙设备并将它们显示在应用程序上。这在 phone 处于正常模式时工作正常,但是当在同一 phone 上使用 android 管理 API 策略时,它不会像以前那样显示任何结果[=11] =]
无法理解是什么原因造成的?
这是正在应用的政策
policy_json = '''
{
"applications": [
{
"packageName": "com.example.ble",
"installType": "FORCE_INSTALLED"
}
],
"debuggingFeaturesAllowed": true
}
'''
谢谢
已找到问题的解决方案,未指定定位模式,因此无法获取位置。 link 可能的位置模式是 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
}
'''
希望对您有所帮助