Package 

Interface RotationMonitor.Listener


  • 
    public interface RotationMonitor.Listener
    
                        

    Defines the contract of listener that can receive notifications about device rotation changes.

    • Method Summary

      Modifier and Type Method Description
      abstract void onDetected(int orientation, float azimuth, float pitch, float roll) This method will be called by RotationMonitor the host device position is first detected.
      abstract void onChanged(int orientation, float azimuth, float pitch, float roll, float azimuthChange, float pitchChange, float rollChange) This method will be called by RotationMonitor whenever a rotation change is detected.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • onDetected

         abstract void onDetected(int orientation, float azimuth, float pitch, float roll)

        This method will be called by RotationMonitor the host device position is first detected.

        Parameters:
        orientation - the current orientation of the host device.
        azimuth - the current rotation around the Z axis
        pitch - the current rotation around the X axis
        roll - the current rotation around the Y axis
      • onChanged

         abstract void onChanged(int orientation, float azimuth, float pitch, float roll, float azimuthChange, float pitchChange, float rollChange)

        This method will be called by RotationMonitor whenever a rotation change is detected.

        Parameters:
        orientation - the current orientation of the host device.
        azimuth - the current rotation around the Z axis
        pitch - the current rotation around the X axis
        roll - the current rotation around the Y axis
        azimuthChange - the delta between last rotation and the current rotation around the Z axis
        pitchChange - the delta between last rotation and the current rotation around the X axis
        rollChange - the delta between last rotation and the current rotation around the Y axis