Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #2715

Re: Android Orientation Sensor

Date 2011-04-01 20:30 -0700
From Patricia Shanahan <pats@acm.org>
Newsgroups comp.lang.java.programmer
Subject Re: Android Orientation Sensor
References <in639a$p2v$1@lust.ihug.co.nz>
Message-ID <NZydnaGdCtbVBQvQnZ2dnUVZ_oKdnZ2d@earthlink.com> (permalink)

Show all headers | View raw


On 4/1/2011 7:56 PM, Lawrence D'Oliveiro wrote:
...
> The documentation for the sensor data
> <http://developer.android.com/reference/android/hardware/SensorEvent.html>
> says
>
>      Note: This sensor type exists for legacy reasons, please use
>      getRotationMatrix() in conjunction with remapCoordinateSystem() and
>      getOrientation() to compute these values instead.

I *think* this comment refers to using e.g. Sensor.TYPE_ORIENTATION 
directly. Instead, if I'm reading the documentation correctly, you are 
supposed to take the values from a TYPE_ACCELEROMETER and 
TYPE_MAGNETIC_FIELD and feed them to getRotationMatrix().

>
> Trouble is, none of those API calls mentioned actually reads any sensor
> values
> <http://developer.android.com/reference/android/hardware/SensorManager.html>,
> they only perform computations.
>
>

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar


Thread

Android Orientation Sensor Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-04-02 15:56 +1300
  Re: Android Orientation Sensor Patricia Shanahan <pats@acm.org> - 2011-04-01 20:30 -0700

csiph-web