How can I prevent the android camera to switch orientation to landscape if I start the camera like this:
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
File imageFolder = new File (Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DCIM);
imageFile = new File (imageFolder, UUID.randomUUID().toString()+".png");
Uri uriImage = Uri.fromFile(imageFile);
intent.putExtra(MediaStore.EXTRA_OUTPUT, uriImage);
startActivityForResult(intent, 0);
So I don't have a particular camera activity. In the manifest.xml the whole appliaction is set to portrait orientation, but the camera switches.
Second Problem, after taking picture and setting it to the imageView it ist switched in orientatien even if I took it in portrait mode (I save the image before I set the imageView), how can I display it in the right posititon?
try this for lock camera orientation to portrait,
Set this on onActivityResult for getting picture in right position