I have created simple android application to test the camera functionality. When I set the display orientation to 'portrait', it open the camera in half of the screen on version 2.1. my requirement is to open the camera on full screen.
Asked
Active
Viewed 1,006 times
2 Answers
0
Intent i8 = new Intent("android.media.action.IMAGE_CAPTURE");
activity.startActivity(i8);

Nikhil
- 16,194
- 20
- 64
- 81
0
Android 2.1 supports a Camera SurfaceView for landscape mode ONLY.
If you want to use in portrait mode, you will have to either:
(a) Rotate your icons and set up the UI in landscape mode (so that the UI looks as if it was set up for portrait mode) keeping the display orientation as landscape.
or
(b) Use portrait mode in Android 2.2, and then use setDisplayOrientation to correct the display. This function is available in Android 2.2 and above only.

Shumon Saha
- 1,415
- 6
- 16
- 33
-
Thanks for the suggestions. but none of them work for me. My requirement was to open camera on the surface view which is open by the activity. and I want to keep the activity in portrait mode also. – Nandika Jun 02 '11 at 12:05
-
Samsung GT-I9000, Firmware version-2.1 (Update 1) – Nandika Jun 02 '11 at 12:39
-
You might want to test your app on other phones. From my experience, Camera Preview in Portrait mode shows a rotated preview (but full screen) on most devices. I used an LG Optimus One P500 and a Nexus One. – Shumon Saha Jun 02 '11 at 13:02
-
I have tested on nexus & HTC. both are working perfect. But need to run on Samsung GT-I9000 too. – Nandika Jun 02 '11 at 13:20