I wonder why you don't look into the documentation where everything is
explained?
http://developer.android.com/reference/android/hardware/SensorEvent.html#values

The first value means you point your phone 60° away from the north
pole.

PS: If you don't need compass orientation, it may be better/easier for
you to only use the accelerometer for determining the "arrow that
points to the floor".

Peli
www.openintents.org

On Jul 17, 7:50 pm, f_heft <delphik...@gmail.com> wrote:
> Hello,
>
> I have a problem with working with the ORIENTATION values of the
> SensorManager.
> I would like to have some kind of 360°-value which directly shows me
> if the phone is in normal portrait (0°), landscape, portrait turned
> around (180°) or anything in between.
> So I could have, for example, an arrow that points to the floor (like
> gravity would do with a plummet) all the time, no matter how I tilt
> (sidewards) the phone.
> I thought this would be easy, but I'm pretty confused at the moment.
>
> First of all, the X value of the orientation-array seems to
> correspondent with how I turn the phone, BUT: if it's completely
> uprightly standing, this value is about 60° ... why not 0° (or 90°,
> 180°, 270°), as I would expect?
>
> Second: The value resets if I turn the phone and Android automatically
> changes screen orientation. So both in Portrait and in Landscape mode
> it will be sth. like 60° when the phone is in a 0° angel in real
> world.
> I set "android:screenOrientation" to "landscape" but this doesn't help
> anything :/
>
> I want the app NOT to change orientation when I turn the phone, but I
> want it to get a continuous orientation value when I tilt the phone.
>
> Any ideas how to achieve that?
>
> To complicate matters further, I have a Samsung Galaxy, so at the
> moment I'm unable to use the phone for debugging (no adb connection)
> because Samsung hasn't made a driver yet -.-
> So it's hard for me to try out things and I hope anyone has a really
> helpful answer ....
>
> Best regards,
> Florian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to