How to lock the camera app orientation called through intent in android?
问题 I want to open the native camera app through intent in my application. I have used the following lines of code. Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(f)); startActivityForResult(takePictureIntent, actionCode); Now, I want to lock the orientation of camera in portrait when it is opened . I just added the below line to the above piece of code. takePictureIntent.putExtra(MediaStore.EXTRA_SCREEN