I’m facing an issue with my React Native app where camera and file access permissions are not being granted on Android 14, even though I’ve allowed the permissions in the settings. The permissions are working fine on previous versions of Android, but not on Android 14.
I have already modified my AndroidManifest.xml as follows:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
But despite these changes, I still see the "Permissions not granted" warning for camera and file access on Android 14.
Has anyone encountered a similar issue or can suggest a solution?
Thanks in advance!
2
Answers
The INTERNET permission is classified as a normal permission, which means it is automatically granted at install time and does not require explicit user approval at runtime.
But, that is needed for other permission types . Such as for camera you have to make sure to follow the following steps ,
Declare camera permissions in AndroidManifest.xml. ( which you did )
Request camera permission at runtime using PermissionsAndroid or
expo-camera.
Use a library like react-native-camera or expo-camera to access the
camera.
Handle permission denial gracefully.
This worked for me: