I am working on an Android application in which I want to set the orientation for my default Camera to be Portrait. My code is given below, but it is not working.
if(item==0){
mPicUri = Uri.fromFile(getOutputMediaFile(10101));
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, mPicUri);
cameraIntent.putExtra(android.provider.MediaStore.EXTRA_SCREEN_ORIENTATION,
ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
startActivityForResult(cameraIntent, REQUEST_PIC_CAMERA);
}