Question

I'm currently writing a application that needs to capture some images. I start the camera application using a intent like this:

if (v.equals(btnCap)) {
        Intent cameraIntent = new Intent(
                android.provider.MediaStore.ACTION_IMAGE_CAPTURE);

        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR);
        startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);
    }

The problem is: When i tilt my device, the buttons on the camera still change their orientation and the picture I receive is not in portrait.

Does anyone know how to capture a image in portrait mode, even if the device is tilted?

Thanks in advance, Adrian

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top