android force camera to take photo in landscape mode
问题 I want to force the default android camera to take photo in landscape mode only. I have tried following: Intent cameraIntent=new Intent("android.media.action.IMAGE_CAPTURE"); File photo = new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "Pic.jpg"); cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photo)); cameraIntent.putExtra(MediaStore.EXTRA_SCREEN_ORIENTATION, ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); startActivity(cameraIntent); but this works only in 2.1