Skip to content
A Camera component for React Native. Also supports barcode scanning!
Java Objective-C C# JavaScript Ruby CSS
Branch: master
Clone or download
cristianoccazinsp and sibelius feat(example): New example app using RN 0.61, native-base, and react-…
…navigation. (#2588)

Includes a camera screen with support for the right dimensions, aspect ratio, flash, tap to focus, pinch to zoom, flash, and multi camera support.
Latest commit 9c6fcea Nov 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci feat(ci): CircleCI Fix & Optimizations (#2550) Oct 18, 2019
.github feat(funding): add FUNDING.yml [skip ci] Jun 13, 2019
android fix(android): fix possible crash when attempting to retrieve camera p… Nov 11, 2019
docs feat(ios): Preserve exif/metadata on photo capture. (#2573) Nov 11, 2019
examples feat(example): New example app using RN 0.61, native-base, and react-… Nov 15, 2019
ios feat(ios): Handle audio interruption in session queue. This prevents … Nov 11, 2019
src feat(ios): Preserve exif/metadata on photo capture. (#2573) Nov 11, 2019
types feat(Ios): handle audio interruptions (#2565) Nov 4, 2019
website doc(tidelift): add tidelift for enterprise Oct 19, 2019
windows fix(windows): update min sdk version (#2117) Feb 19, 2019
.dockerignore feat(docs): Add docusaurus (#2293) Jun 2, 2019
.eslintrc docs(rn-camera): add rncamera-example without face detection (#1979) … Dec 11, 2018
.flowconfig chore(lint): fix lint to make ci work Apr 15, 2018
.gitattributes disable git large files Feb 1, 2018
.gitignore feat(mlkit): Migrate Face, Barcode and Text Recognition to Firebase M… Mar 11, 2019
.npmignore fix: exclude android build artifacts (#2001) [skip ci] Dec 17, 2018
.prettierrc docs(rn-camera): add rncamera-example without face detection (#1979) … Dec 11, 2018
CHANGELOG.md chore(changelog): add link to github releases [skip ci] Nov 12, 2018
Dockerfile feat(docs): Add docusaurus (#2293) Jun 2, 2019
LICENSE Initial commit Apr 1, 2015
README.md doc(tidelift): add security section on readme Nov 8, 2019
THIRD-PARTY-LICENSES rename expo to simple RN, add js files, and export them inside the sa… Jan 1, 2018
commitlint.config.js chore(semantic-release): setup semantic-release for automated publish… Nov 12, 2018
docker-compose.yml feat(docs): Add docusaurus (#2293) Jun 2, 2019
package.json chore(release): 3.9.0 [skip ci] Nov 4, 2019
react-native-camera.podspec feat(mlkit): add mlkit barcode detection ios (#2209) Apr 16, 2019
yarn.lock Merge pull request #2447 from react-native-community/dependabot/npm_a… Aug 30, 2019

README.md

React Native Camera Backers on Open Collective Sponsors on Open Collective npm version npm downloads

Docs

Follow our docs here https://react-native-community.github.io/react-native-camera/

Sponsors

If you use this library on your commercial/personal projects, you can help us by funding the work on specific issues that you choose by using IssueHunt.io!

This gives you the power to prioritize our work and support the project contributors. Moreover it'll guarantee the project will be updated and maintained in the long run.

issuehunt-image

react-native-camera for enterprise

Available as part of the Tidelift Subscription

The maintainers of react-native-camera and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

Open Collective

You can also fund this project using open collective

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

The comprehensive camera module for React Native.

Supports:

  • photographs.
  • videos
  • face detection (Android & iOS only)
  • barcode scanning
  • text recognition (optional installation for iOS using CocoaPods)

Example import

import { RNCamera, FaceDetector } from 'react-native-camera';

How to use master branch?

We recommend using the releases from npm, however if you need some features that are not published on npm yet you can install react-native-camera from git.

yarn: yarn add react-native-camera@git+https://git@github.com/react-native-community/react-native-camera.git

npm: npm install --save react-native-camera@git+https://git@github.com/react-native-community/react-native-camera.git

Contributing

  • Pull Requests are welcome, if you open a pull request we will do our best to get to it in a timely manner
  • Pull Request Reviews are even more welcome! we need help testing, reviewing, and updating open PRs
  • If you are interested in contributing more actively, please contact me (same username on Twitter, Facebook, etc.) Thanks!
  • We are now on Open Collective! Contributions are appreciated and will be used to fund core contributors. more details
  • If you want to help us coding, join Expo slack https://slack.expo.io/, so we can chat over there. (#react-native-camera)
Permissions

To use the camera,

  1. On Android you must ask for camera permission:
  <uses-permission android:name="android.permission.CAMERA" />

To enable video recording feature you have to 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" />

5j2jduk

  1. On iOS, you must update Info.plist with a usage description for camera
...
<key>NSCameraUsageDescription</key>
<string>Your own description of the purpose</string>
...
	

For more information on installation, please refer to installation requirements.

For general introduction, please take a look into this RNCamera.

Security contact information

To report a security vulnerability, please use the

Tidelift security contact.

Tidelift will coordinate the fix and disclosure.

You can’t perform that action at this time.