I am trying to take photo from android device\'s native Camera App. For that i create a file first and then attach its URI with the intent to capture image and write output in t
However, not all Android devices actually have these hardware features. So if your app requests the CAMERA permission, it's important that you also include the <uses-feature>
tag in your manifest to declare whether or not this feature is actually required.
For more information, see Google Play and feature-based filtering
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="your package" >
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:name="android.hardware.camera2.full" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
From Marshmallow, Dangerous permissions are:
SO i think Permission may be required...
The issue is the revoked permission ("with revoked permission android.permission.CAMERA"). Normally, you do not need permission, but if you ask for permission (say, in a previous build of your app), and the user revokes that permission, then you cannot use ACTION_IMAGE_CAPTURE
.
Add below lines in your Manifest.xml :
<uses-feature
android:name="android.hardware.camera.any"
android:required="true" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<uses-permission android:name="android.permission.CAMERA" />
Please refer to this URL for more.