android 6.0 no camera found #696
Comments
I'm having the same issue. When opening the scene with the Camera component added, the emulator/device shows a blank screen, and when tapping the screen the app crashes with no error message. It would seem that react-native-camera doesn't work on Android 6 or higher? React Native version: 0.41.2 |
I have it working on android 6. Maybe its something to do with your device? Are you seeing any exceptions in Log cat? |
Hi @npomfret, I found the problem. There were some permissions missing in the manifest and the app's permissions also needed to be set on the device to allow it to use the camera. |
Hi! could you show which permissions did you need to set? I apologize for opening this |
Hi @Graren, I added: Also note that you need to use a device. Using the emulator will not work. I hope you come right! |
I'm also getting The permissions which I added are :
Any advice? |
Hi @Borisboky, I'm assuming you're using a device, right? If so, then what could be causing this problem is permissions in your device itself. I had to go to It seems that you only need to do this once, unless you uninstall the app, in which case you'll have to give permissions again. I'm unsure as to why the permissions aren't automatically set in the app's permissions settings, as they're specified in the manifest file. |
Thanks @gsteyn. Strange that those permissions aren't automatically set, but that did the trick. |
Glad I could help @Borisboky. Yeah I found it quite strange too, although I didn't investigate it further... deadlines are sometimes greater than curiosity ;) |
Any ideas as to why we have to manually request camera permissions in Settings -> Apps? |
@grigored Read more about Runtime permissions: |
@npomfret compileSdkVersion 25 It works well in iOS and android emulator, however app crashes in android device(release mode APK). If I run it in debug mode in device it gives no camera found error. I don't know where I am going wrong. |
Dear author:
Camera on the ios is normal, but on android 6.0 phone does not open, tip me no camera found, but the example of you on my mobile phone can run normally, permissions are added, who know what the reason
Expected behaviour
Tell us what should happen
Actual behaviour
Tell us what happens instead
Environment
react-native-camera
Version: npm version or "master"
The text was updated successfully, but these errors were encountered: