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>
BY Best Interview Question ON 09 Apr 2020