android camera changing sensor orientation?

by Lukasz Mosdorf » Fri, 13 Mar 2009 01:43:12 GMT

Sponsored Links
 Hi all
I am developing an application which uses a live camera preview. At
the same activity I am using camera preview and sensors
(accelerometers). After this activity is closed and entered again the
sensors are flipped. It looks like the screen orientation changes(but
it can be seen at camera-everything is OK).
Tried changing screen orientation parameters but they doesn seem to
work on the camera preview(known issue as far as I am concerned. I
have already spent some time trying to find where the problem is and I
am stuck. I unregister the sensor listener when the activity is


Also, in activities where camera is not used sensor orientation
doesn't change, so the problem is not necessarily in accesing sensor
Any suggestions?


Other Threads

1. How to look up position in spinner from string array?

Hello all!

I have a pretty simple question, but I am still hammering my brain with
finding an elegant solution.

I have a spinner filled with an array defined as xml resource:

    <string-array name="distances">

Whenever I close the application I save the selected string of the
spinner in a database. E.g. I save "item1".

On application restart I now want to relaod the spinner with the
previous selection. Therefore I read "item1" from the db and now have to
somehow lookup the position of it and there I am stuck.
An additionalproblem is that the array might have changed from the time
where the data was saved to the db.

I hope I explained my problem clear enough.

Anyways lots of thanks, Fabian


2. android Hello mapview

Hello i'm new in the android developpement and i've tested the
tutorial "Hello mapview" (at the URL:"
guide/tutorials/views/hello-mapview.html") but i'm stopped in the step
8. I don't understand how to retrieve the ZoomControls object from the
MapView and add it to my new layout element.
If someone have done this tuto can he explain to me please ?


3. MMS intent

4. Connect Google via WiFi

5. Installing the Android SDK

6. Multi Touch keyboard for Android

7. Multi touch FrogPad for Android