I am using camera intent for capturing selfie but by default it open back camera and I want front camera by default.
ContentValues values.put(MediaStore.Images.Media.TITLE, "New Picture");
values.put(MediaStore.Images.Media.DESCRIPTION, "From your Camera");
imageUri = getContentResolver().insert(
MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
startActivityForResult(intent, 101);
Add the following line:
cameraIntent.putExtra("android.intent.extras.CAMERA_FACING", 1)
Although, it doesn't seem to always work. But it's the best you can get using just intents.