Interface IAOrientationListener

  • public interface IAOrientationListener
    Used for receiving headings and orientation updates from 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);

    • 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 in IALocation.getBearing() with 0 indicating north, 90 east, and so on. The provided timestamp is consistent with IALocation.getTime()
        timestamp - Timestamp
        heading - 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 with IALocation.getTime().
        timestamp - Timestamp
        quaternion - Quaternion indicating orientation