title: How can I open front camera using Intent in android?
body: <p>I want to make a app in which I have to open only front camera, How can i do it using <code>intent</code>?</p>
  
  <pre><code>private void captureImage() {
      Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
  
      fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);
  
      intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
      intent.putExtra("android.intent.extras.CAMERA_FACING", 1);
  
      // start the image capture Intent
      startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);
  }
  </code></pre>