Does the camera work without camera permission?

In one of our applications, we use the intention of the camera to take pictures. This works on real devices - without camera permission.

Is this correct or should I add it to this application manifest?

ContentValues contentValues = new ContentValues(); contentValues.put(MediaStore.Images.Media.DESCRIPTION, "Image capture"); contentValues.put(MediaStore.Images.Media.TITLE, "new image"); Uri uri = getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues); Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, uri); intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1); startActivityForResult(intent, 1); 

TIA

+7
source share
1 answer

See this: http://mobile.tutsplus.com/tutorials/android/android-sdk-quick-tip-launching-the-camera/

There are two things here. First: A note about permissions: Although your application uses a camera, it does not require android.permission.CAMERA permission, since it does not have direct access to the camera. Instead, it simply launches the Camera app through Intent.

I donโ€™t see this being clarified anywhere on developers.android.com, so this might be wrong and something else is happening.

It seems that you only need permission to access the camera elements directly, and not through Intent.

Please note that the same URL above also indicates that you must declare this feature so that users without a camera can see your application on the market.

+13
source

All Articles