title: Barcode scanning with ZX and front facing camera
body: <p>I'm using the following code to fire an Intent to start the ZX barcode scanner. I've tweaked it to use the front-facing camera, but this appears to be failing to scan any barcodes because the front-facing image is reversed (I'm assuming this is the reason). ie a book barcode shows NBSI (with backwards letters) rather than ISBN. Using the rear facing camera a Nexus 5 and Nexus 7 can both scan barcodes. When switching to the front camera both fail to recognise barcodes.</p>
  
  <p>How do I tweak my Intent so ZX shows a non-reversed front-facing camera image?</p>
  
  <pre><code>private void startBarcodeScanner() {
      IntentIntegrator integrator = new IntentIntegrator(MainActivity.this);
      integrator.addExtra("SCAN_CAMERA_ID", getFrontCameraId());
      integrator.addExtra("SCAN_MODE", "PRODUCT_MODE");
      integrator.initiateScan(IntentIntegrator.PRODUCT_CODE_TYPES);
  }
  
  private int getFrontCameraId() {
      int cameraId = -1;
      int numberOfCameras = Camera.getNumberOfCameras();
      for (int i = 0; i &lt; numberOfCameras; i++) {
          Camera.CameraInfo info = new Camera.CameraInfo();
          Camera.getCameraInfo(i, info);
          if (info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) {
              cameraId = i;
              return cameraId;
          }
      }
      return -1;
  }
  </code></pre>