title: How I can modify my code to can use front camera for scanning QR code
body: <p>I'm using android vision to scan QR code in my app and everything is ok but now I want to make my app can scan QR code by opening front camera not back camera.</p>
  
  <p>Code of scanning screen:</p>
  
  <pre><code>public class BarCodeScanActivity extends AppCompatActivity implements BarcodeReader.BarcodeReaderListener {
  
  private String TAG = OperatorBarCodeScanActivity.class.getSimpleName();
  private Context mContext;
  private View currentView;
  private Activity currentactivity;
  private BarcodeReader barcodeReader;
  
  
  @Override
  protected void onCreate(@Nullable Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.barcode_reader_activity);
  
      mContext = getApplicationContext();
  
      barcodeReader = (BarcodeReader) getSupportFragmentManager().findFragmentById(R.id.barcode_scanner);
  
  }
  
  @Override
  public void onScanned(Barcode barcode) {
      // playing barcode reader beep sound
      barcodeReader.playBeep();
      final String scannedCode = barcode.displayValue;
  
  }
  
  @Override
  public void onScannedMultiple(List&lt;Barcode&gt; barcodes) {
  
  }
  
  @Override
  public void onBitmapScanned(SparseArray&lt;Barcode&gt; sparseArray) {
  
  }
  
  @Override
  public void onScanError(String errorMessage) {
      Toast.makeText(getApplicationContext(), mContext.getString(R.string.barcode_error)+" " + errorMessage, Toast.LENGTH_SHORT).show();
  }
  
  @Override
  public void onCameraPermissionDenied() {
      finish();
  }}
  </code></pre>
  
  <p>Layout of this screen is looking like the following:</p>
  
  <pre><code> &lt;LinearLayout
      android:visibility="visible"
      android:id="@+id/scanningContainer"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_gravity="center_vertical|center_horizontal"
      android:gravity="center_vertical|center_horizontal"
      android:orientation="vertical"&gt;
  
      &lt;fragment
          android:id="@+id/barcode_scanner"
          android:name="info.androidhive.barcode.BarcodeReader"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:auto_focus="true"
          app:use_flash="false" /&gt;
  
      &lt;info.androidhive.barcode.ScannerOverlay
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:line_color="@color/colorPrimary"
          app:line_speed="6"
          app:line_width="4"
          app:square_height="200"
          app:square_width="200" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>How I can update my code to can use Camera Surface and then call front face camera?</p>
  
  <p>Thanks.</p>