0

I found this hack,

Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
intent.putExtra("android.intent.extras.CAMERA_FACING", 1);

from SO Question. Apparently the Front camera worked for the person. But this does not work on my Moto G. Is there any other hack except Building our own custom camera app to achieve this.

Following is my code.:

Intent takeVideoIntent=new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
if (noOfCameras>1){
 Log.d("It came here", "it came here");
 takeVideoIntent.putExtra("android.intent.extras.CAMERA_FACING",      Camera.CameraInfo.CAMERA_FACING_FRONT);
 }
            if (takeVideoIntent.resolveActivity(getPackageManager())!=null){
                startActivityForResult(takeVideoIntent,1);
                //1 is for video capture;
            }
        }
    });

Am i doing something wrong. I could not comment on the mentioned SO link since don't have enough reputation.

Community
  • 1
  • 1
inquisitive
  • 3,738
  • 6
  • 30
  • 56

0 Answers0