title: How to detect front camera and flash availabiliy
body: <p>Hi I am developing a custom video app. I am able to get the <code>currentCameraId</code>  by</p>
  
  <pre><code>currentCameraId = Camera.CameraInfo.CAMERA_FACING_BACK;
  </code></pre>
  
  <p>I have two questions to ask:</p>
  
  <p>1) How to detect android devices with only front camera. </p>
  
  <p>Because on tablets with only front camera like in Micromax tab, the <code>currentCameraId</code> is 0. </p>
  
  <p>2)  How to check camera flash availability as the below code is not working on some of the phones</p>
  
  <pre><code>flash = this.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH);
  </code></pre>
  
  <p>Please Help.</p>
  
  <p>Thanks!</p>