微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何使用 Android Management API 获取运行时应用程序权限?

如何解决如何使用 Android Management API 获取运行时应用程序权限?

我正在使用 Android Management API 来获取应用权限列表。

APIhttps://developers.google.com/android/management/reference/rest/v1/enterprises.applications/get

响应正文https://developers.google.com/android/management/reference/rest/v1/enterprises.applications#ApplicationPermission

它返回与我们请求的应用程序相关联的所有权限,没有任何分类(如运行时、正常、特殊等)。

我只想从提供的响应中过滤掉运行时权限。

有什么方法可以获取权限详细信息以及它在 Android Management API 中的权限类型吗?

我为 Gmail 应用程序获取的示例数据:

{
  "name": "enterprises/xxxxxxxxxx/applications/com.google.android.gm","title": "Gmail","permissions": [
    {
      "permissionId": "android.permission.BLUetoOTH","name": "pair with Bluetooth devices","description": "Allows the app to view the configuration of Bluetooth on the device,and to make and accept connections with paired devices."
    },{
      "permissionId": "android.permission.CALL_PHONE","name": "directly call phone numbers","description": "Allows the app to call phone numbers without your intervention. This may result in unexpected charges or calls. Note that this doesn't allow the app to call emergency numbers. MalicIoUs apps may cost you money by making calls without your confirmation."
    },{
      "permissionId": "android.permission.CAMERA","name": "take pictures and videos","description": "Allows the app to take pictures and videos with the camera. This permission allows the app to use the camera at any time without your confirmation."
    },{
      "permissionId": "android.permission.USE_CREDENTIALS","name": "use accounts on the device","description": "Allows the app to request authentication tokens."
    },{
      "permissionId": "android.permission.WRITE_CONTACTS","name": "modify your contacts","description": "Allows the app to modify the data about your contacts stored on your device,including the frequency with which you've called,emailed,or communicated in other ways with specific contacts. This permission allows apps to delete contact data."
    },{
      "permissionId": "com.google.android.providers.gsf.permission.READ_GSERVICES","name": "read Google service configuration","description": "Allows this app to read Google service configuration data."
    },{
      "permissionId": "com.google.android.voicesearch.AUdio_FILE_ACCESS"
    }
  ]
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。