title: React native access front camera
body: <p>I am using "react-native camera" library to access the camera. So here is my code
   . </p>
  
  <pre><code> import React, { Component } from "react";
   import {
    AppRegistry,
    Dimensions,
    StyleSheet,
    Text,
    TouchableHighlight,
     View
   } from "react-native";
  import Camera from "react-native-camera";
  import { RNCamera, FaceDetector } from "react-native-camera";
  
   export default class App extends Component&lt;Props&gt; {
   render() {
     return (
    &lt;View style={styles.container}&gt;
      &lt;Camera
        ref={cam =&gt; {
          this.camera = cam;
        }}
        style={styles.preview}
        aspect={Camera.constants.Aspect.fill}
      &gt;
        &lt;Text style={styles.capture} onPress= 
     {this.takePicture.bind(this)}&gt;
          take photo
        &lt;/Text&gt;
      &lt;/Camera&gt;
    &lt;/View&gt;
     );
   }
  
   takePicture() {
     const options = {};
     //options.location = ...
     this.camera
    .capture({ metadata: options })
    .then(data =&gt; console.log(data))
    .catch(err =&gt; console.error(err));
    }
    }
  
  const styles = StyleSheet.create({
   container: {
   flex: 1,
   flexDirection: "row"
  },
  preview: {
    flex: 1,
    justifyContent: "flex-end",
    alignItems: "center"
  },
   capture: {
    flex: 0,
    backgroundColor: "#fff",
    borderRadius: 5,
    color: "#000",
    padding: 10,
    margin: 40
    }
  });
  </code></pre>
  
  <p>Here i am able to access the back camera and whenever i am clicking on take photo, it capture image and show that instantly. But i need two changes here.</p>
  
  <ol>
  <li><p>Using this code, the back camera is getting accessed but i want to access the front camera.</p></li>
  <li><p>Also, the image i captured, should not be shown instantly. I want a button , and whenever i click on that button, it navigates to different page and show all the images there.</p></li>
  </ol>
  
  <p>Is it possible in react native ?? If yes, then please suggest me the changes that i require to make in this code</p>