I have a sensor event handler that gets fired and I have no problem
getting and processing acceleration readings. However this code
always fails.
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER)
{
float[] geomagnetic = new float[3];
geomagnetic[0] = geomagnetic[1] = geomagnetic[2] = 0;
float[] r = new float[9];
float[] I = new float[9];
boolean b = SensorManager.getRotationMatrix(r, I,
event.values.clone
(), event.values.clone());
if ( ! b)
{
Log.e(LOG_TAG, "getRotationMatrix failed");
return;
}
...
tia,
mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---