2.2 Camera Orientation Problem

by Vincent » Thu, 15 Jul 2010 20:01:11 GMT


Sponsored Links
 Hi,

In my camera application, I use the following code to change the
screen orientation.

Parameters params = mCamera.getParameters();
params.set("orientation", "portrait");

It worked for the most of devices.
However, after updating my NexusOne to 2.2, the above code does not
work!!
Is there any other way to change the orientation?

The only way to change the orientation is to change the orientation of
an Activity.
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
But, I don't want to do this because I have other controls like Text
or Button on Screen.

If somebody knows the solution for this, please help me!!

--



2.2 Camera Orientation Problem

by TreKing » Thu, 15 Jul 2010 22:18:22 GMT


 



It worked for "most"? And that was good enough for you?



What does "does not work!!" mean?



I'm sure there is a "correct" way, like the request orientation you're
avoiding. Not really sure though.

-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

--


Sponsored Links


2.2 Camera Orientation Problem

by Dave Sparks » Fri, 16 Jul 2010 04:56:47 GMT


 See android.hardware.Camera.setDisplayOrientation (int degrees)

This is the approved way to set the camera orientation as of V2.2.
Please note that this only works for still images, videos will still
record in landscape orientation.




--



2.2 Camera Orientation Problem

by Vincent » Tue, 20 Jul 2010 09:30:45 GMT


 Dave Sparks

Thank you very much for your response.
I didn't aware of the new api.
It solved my problem.

Thanks!!

Vincent






--



Other Threads

1. how to dynamically create buttons?

hello all,
i wanted to create buttons at runtime. The no. of buttons to be
displayed depends upon the input of user. But creating a button
requires some code to be written in the .xml file. so how can i
dynamically generate the code for n no. of buttons at runtime?

regards!

-- 

2. how to make an image button?

hello all,
i wanted to create an imagebutton i.e. an image on which if i click,a
query is fired..
can u please help me out with this?

regards!

-- 

3. Getting location from within an IntentService?

4. Is this a joke or a spam or another April 1st prank?

5. Cupcake berubah------"Eclair"

6. How to modify NAND device blocks size from 4096 to 2048 at run-time

7. Non Ascii characters are Displayed as ? and squares and some junk characters