https://developer.android.com/training/permissions/requesting.html

functionality n. 功能;[数] 泛函性,函数性
revoke vt. 撤回,取消;废除
confidential adj. 机密的;表示信任的;获信任的

If the device is running Android 5.1 or lower, or your app’s target SDK is 22 or lower: If you list a dangerous permission in your manifest, the user has to grant the permission when they install the app; if they do not grant the permission, the system does not install the app at all.
If the device is running Android 6.0 or higher, and your app’s target SDK is 23 or higher: The app has to list the permissions in the manifest, and it must request each dangerous permission it needs while the app is running. The user can grant or deny each permission, and the app can continue to run with limited capabilities even if the user denies a permission request.

如果你的app运行在5.1或者以下的版本,或者你的target SDK小于22,那么用户必须在安装app时候就授予这些权限,如果不授予,那么系统不会去安装这个app。
但是如果运行在6.0以上,或者target SDK大于等于23,那么app必须把权限写在Manifest中,必须在运行时请求这些危险权限。

circumstances n. 情况(circumstance的复数);环境;情形

In many cases, you can choose between two ways for your app to perform a task. You can have your app ask for permission to perform the operation itself. Alternatively, you can have the app use an intent to have another app perform the task.
For example, suppose your app needs to be able to take pictures with the device camera. Your app can request the CAMERA permission, which allows your app to access the camera directly. Your app would then use the camera APIs to control the camera and take a picture. This approach gives your app full control over the photography process, and lets you incorporate the camera UI into your app.
However, if you don’t need such complete control, you can use an ACTION_IMAGE_CAPTURE intent to request an image. When you send the intent, the system prompts the user to choose a camera app (if there isn’t already a default camera app). The user takes a picture with the selected camera app, and that app returns the picture to your app’s onActivityResult() method.

你可以在自己的app中申请权限,你也可以通过Intent打开其他app,让其他app申请权限,比如你的app需要用相机拍照,你可以在自己的app中请求权限,这样的话你的app就可以拥有camera所有api的使用权,但是你也可以通过intent打开其他app,在onActivityResult()中获得图片。

inappropriate adj. 不适当的;不相称的

获取危险权限列表

adb shell pm list permissions -d -g

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值