Package com.indooratlas.android.sdk
Interface IAOrientationListener
-
public interface IAOrientationListener
Used for receiving headings and orientation updates fromIALocationManager
.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);
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
onHeadingChanged
void onHeadingChanged(long timestamp, double heading)
Called when the the heading of the device has changed. The heading is the direction of the y-axis projected to the horizontal plane. The values are the same as inIALocation.getBearing()
with 0 indicating north, 90 east, and so on. The provided timestamp is consistent withIALocation.getTime()
- Parameters:
timestamp
- Timestampheading
- Heading in degrees
-
onOrientationChange
void onOrientationChange(long timestamp, double[] quaternion)
Called when the orientation of the device has changed. The orientation is given as an unit quaternion with format [w, x, y, z]. The provided timestamp is consistent withIALocation.getTime()
.- Parameters:
timestamp
- Timestampquaternion
- Quaternion indicating orientation
-
-