0

I am working on an app which makes use of webview on react native. The web app itself when fired up on an android device asks for the prompt to access camera and works absolutely fine. I am quite new to react-native, the web app itself was done in VueJS so was of the mindset that just simply wapping it in a webview would be straightforward.

From the research I have done online, I understand the app is automatically suppressing the prompt to require camera access, is there anyone with a guide or workaround to make it work please?

Things I have tried:

Adding the following to the AndroidManifest.xml

<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.read_external_storage" />
oluwatyson
  • 251
  • 4
  • 18

1 Answers1

0

React Native itself does not support using the device camera out of the box. You will need to add a community module for the camera, React Native CameraRoll is recommended in the official docs.

If you used Expo for your app you can add their dedicated Camera module.

p-syche
  • 575
  • 1
  • 5
  • 17