rnc-archive / rncamera-example

This contains the RNCamera Example
https://github.com/react-native-community/react-native-camera
45 stars 45 forks source link

Missing CAMERA permission #11

Closed mun3 closed 6 years ago

mun3 commented 6 years ago

The AndroidManifest.xml is missing the android.permission.CAMERA permission, yet debug/AndroidManifest.xml contains many more permissions, e.g., android.permission.CAMERA, android.permission.WRITE_EXTERNAL_STORAGE, etc. How are the extra permissions generated when they're not stated in AndroidManifest.xml?

sibelius commented 6 years ago

I think Camera and other permissions are asked using PermissionModule from Android 6

check this https://github.com/react-native-community/react-native-camera/blob/master/src/handlePermissions.js#L14

I don't think we need WRITE_EXTERNAL_STORAGE, as we save in a temp directory

mun3 commented 6 years ago

@sibelius Right. Can I also ask how come when targetSdkVersion is set to 26 at https://github.com/react-native-community/rncamera-example/blob/master/android/app/src/main/AndroidManifest.xml#L12 targetSdkVersion in debug/AndroidManifest.xml is set to 22?

sibelius commented 6 years ago

we can just remove those lines https://github.com/react-native-community/rncamera-example/blob/master/android/app/src/main/AndroidManifest.xml#L10-L12

mun3 commented 6 years ago

Thanks.