react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

🐛 Android's getCameraPermissionStatus and getLocationPermissionStatus always returned 'denied' on a fresh install of the app

Open tomtargosz opened this issue 1 year ago • 4 comments

What's happening?

On Android, when an app is freshly installed getCameraPermissionStatus and getLocationPermissionStatus always returned 'denied' when they should be returning 'not-determined'. If after installing the app you go into the settings for the app and turn camera or location permissions on and then off, and then open the app the methods will return 'not-determined' as expected. This is not happening on iOS. I noticed this issue that mentions the same thing but I don't believe the docs were updated.

Reproduceable Code

console.log(Camera.getCameraPermissionStatus())
console.log(Camera.getLocationPermissionStatus())

Relevant log output

-

Camera Device

-

Device

Pixel 7 (Android 14)

VisionCamera Version

4.1.0

Can you reproduce this issue in the VisionCamera Example app?

Yes, I can reproduce the same issue in the Example app here

Additional information

tomtargosz avatar Jun 06 '24 21:06 tomtargosz

Hi @tomtargosz I'll suggest you to take a look at react-native-permissions. They have a great README explaining the permissions flow for Android. @mrousavy I can update the docs for Android you're cool with it

giuliobracci avatar Jun 07 '24 14:06 giuliobracci

@tomtargosz How can I reduce the size of a video that is 151 MB for a 1-minute recording? The bitRate setting does not seem to be working. https://github.com/mrousavy/react-native-vision-camera/issues/3113

vishalyad16 avatar Aug 04 '24 17:08 vishalyad16

@mrousavy I can update the docs for Android you're cool with it

yea! @giuliobracci

mrousavy avatar Aug 04 '24 18:08 mrousavy