Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 7.0,打开相机的时候报错误java.lang.SecurityException: Permission Denial: starting Intent #1

Closed
kong-jing opened this issue Sep 10, 2016 · 5 comments

Comments

@kong-jing
Copy link

我在TedBottomPicker中#183,查看了打开相机的地方,
Intent cameraInent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);这里改为
Intent cameraInent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE_SECURE);就能够打开相机了。

参考:
https://developer.android.com/reference/android/provider/MediaStore.html#ACTION_IMAGE_CAPTURE

@wl386123298
Copy link

android6.x需要加权限判断!

@ParkSangGwon
Copy link
Owner

ParkSangGwon commented Sep 12, 2016

@knjin
Do you declare CAMERA permission in Manifest.xml?

@kong-jing
Copy link
Author

yes, I declare CAMERA permission in Menifest.xml.

@ParkSangGwon
Copy link
Owner

@knjin
If we use MediaStore.ACTION_IMAGE_CAPTURE intent, we don't need any permission for capture.
And developer document told us too like this.
(https://developer.android.com/reference/android/provider/MediaStore.html#ACTION_IMAGE_CAPTURE)

But this issue is very strange.

If you use Camera permission in Manifest.xml, you have to request camera permission for ACTION_IMAGE_CAPTURE.
Even if you use ``ACTION_IMAGE_CAPTURE` intent , you have to request.
I don't know why we have to request camera permission.

You can check it like this.

  1. Don't have CAMERA permission in Manifest.xml
    -> you dont need request CAMERA permission for ACTION_IMAGE_CAPTURE intent.
  2. Have CAMERA permission in Manifest.xml
    -> you have to request CAMERA permission for ACTION_IMAGE_CAPTURE intent.

@kong-jing
Copy link
Author

@ParkSangGwon
ok ,Thanks your reply.

ParkSangGwon pushed a commit that referenced this issue Jan 16, 2017
- Support multi image select
ParkSangGwon pushed a commit that referenced this issue Jan 16, 2017
- Support multi image select
- fix rotation error
ParkSangGwon pushed a commit that referenced this issue Jan 17, 2017
- Support Nougat version 'file://' scheme issue
- Support max/min select error count text
ParkSangGwon pushed a commit that referenced this issue Feb 22, 2017
- Fixed screen rotation issue.
ParkSangGwon pushed a commit that referenced this issue Feb 22, 2017
- Support multi image select
- fix rotation error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants