public interface IAOrientationListener
IALocationManager.
Sample usage:
mOrientationListener = new IAOrientationListener() {
public void onHeadingChanged(long timestamp, float heading) {
// handle heading change
}
public void onOrientationChange(long timestamp, double [] quaternion) {
// handle orientation
}
}
// specify sensitivity
IAOrientationRequest request = new IAOrientationRequest(10.0f, 10.0f);
mLocationManager.requestOrientationUpdates(request, mOrientationListener);
| Modifier and Type | Method and Description |
|---|---|
void |
onHeadingChanged(long timestamp,
double heading)
Called when the the heading of the device has changed.
|
void |
onOrientationChange(long timestamp,
double[] quaternion)
Called when the orientation of the device has changed.
|
void onHeadingChanged(long timestamp,
double heading)
IALocation.getBearing() with 0 indicating north, 90 east, and so on. The provided
timestamp is consistent with IALocation.getTime()timestamp - Timestampheading - Heading in degreesvoid onOrientationChange(long timestamp,
double[] quaternion)
IALocation.getTime().timestamp - Timestampquaternion - Quaternion indicating orientation