README
Simple React Native Camera for Android - KISS
This library is a very simple Android camera component for React Native. It was made to show a portrait camera view. Take a picture as fast as possible.
Getting started
npm install react-native-camera-android-simple
react-native link react-native-camera-android-simple
Usage
All you need is to import
the react-native-camera-android-simple
module and then use the
<Camera/>
tag.
// 2 types: 'front' and 'back'
<Camera
ref={(instance) => {
this.camera = instance;
}}
type={type}
/>
// to capture a picture
this.camera.capture({metadata: options})
.then((data) => console.log(data))
.catch(err => console.error(err));
type
[front
, back
]
data
{
path: "link to image file"
}