GithubHelp home page GithubHelp logo

Android 7.0,打开相机的时候报错误java.lang.SecurityException: Permission Denial: starting Intent about tedbottompicker HOT 5 CLOSED

parksanggwon avatar parksanggwon commented on September 12, 2024
Android 7.0,打开相机的时候报错误java.lang.SecurityException: Permission Denial: starting Intent

from tedbottompicker.

Comments (5)

wl386123298 avatar wl386123298 commented on September 12, 2024

android6.x需要加权限判断!

from tedbottompicker.

ParkSangGwon avatar ParkSangGwon commented on September 12, 2024

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

from tedbottompicker.

kong-jing avatar kong-jing commented on September 12, 2024

yes, I declare CAMERA permission in Menifest.xml.

from tedbottompicker.

ParkSangGwon avatar ParkSangGwon commented on September 12, 2024

@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.

from tedbottompicker.

kong-jing avatar kong-jing commented on September 12, 2024

@ParkSangGwon
ok ,Thanks your reply.

from tedbottompicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.