1.

How to use the camera in React Native?

Answer»

To USE the camera to React Native, follow these STEPS carefully:

  • On Android, camera permission must be asked:
    <uses-permission android:name="android.permission.CAMERA" />
  • Now, to enable video recording feature ADD the following code to the AndroidManifest.xml:
    <uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  • For iOS, you must update the Info.plist with a USAGE description for camera
    <KEY>NSCameraUsageDescription</key> <string>Your own description of the purpose</string>


Discussion

No Comment Found