【问题标题】:Bluetooth scan and display devices not working when policy applied to device将策略应用于设备时,蓝牙扫描和显示设备不工作
【发布时间】:2020-01-08 06:11:29
【问题描述】:

我有一个应用程序可以扫描附近的蓝牙设备并将它们显示在应用程序上。这在手机处于正常模式时可以正常工作,但是在同一部手机上使用android管理API策略时,它不会像以前那样显示任何结果

无法理解是什么原因造成的?

这是正在应用的政策

policy_json = '''
{
  "applications": [
    {
      "packageName": "com.example.ble",
      "installType": "FORCE_INSTALLED"
    }
  ],    
  "debuggingFeaturesAllowed": true
}
'''

谢谢

【问题讨论】:

    标签: android android-management-api android-managed-profile


    【解决方案1】:

    找到了解决该问题的方法,没有指定定位模式,因此无法获取位置。 可能的定位模式的链接是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
    }
    '''
    

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-26
      • 1970-01-01
      相关资源
      最近更新 更多