Capture image without permission with Android 6.0

前端 未结 5 1180
庸人自扰
庸人自扰 2021-02-04 07:29

I need to let the user take a picture (from the gallery or from a camera app) with Android 6.0.

Because I don\'t need to control the camera, I wanted to use an intent as

5条回答
  •  不要未来只要你来
    2021-02-04 08:14

    I used content:// with FileProvider.getUriForFile() as described here, and used external camera app by ACTION_IMAGE_CAPTURE intent, which is not supposed to require any permission.

    But, it seems that if the app's manifest uses the android.permission.CAMERA permission, then opening an external camera app does require camera permission. See here and here.

提交回复
热议问题