You are getting gravity from the accelerometer and magnetic field from
gravity.
case Sensor.TYPE_ACCELEROMETER: {
mGravity = event.values.clone();
break;
}
case Sensor.TYPE_GRAVITY: {
mGeomagneticField = event.values.clone();
break;
}
But then again, the sample I cited is getting gravity from the
accelerometer also, so it seems wrong.
Nathan
--
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