3.9.1.2 Constants

The following orientation constants are used by the OrientationEventFilter class. Callbacks which have been connected to a Sensor object that utilises the OrientationEventFilter event filter will receive one of these constants as an argument upon a detected orientation change. The names of the constant are the side of the device that is currently turned upwards from your point of view. (For example FRONT means that the device is lying on its back - its front side is turned upwards.)

orientation.TOP
Represents the orientation where the device is held upwards.

orientation.BOTTOM
Represents the orientation where the device is held upside down.

orientation.LEFT
Represents the orientation where the side of the device that is left of the display is turned downwards.

orientation.RIGHT
Represents the orientation where the side of the device that is right of the display is turned downwards.

orientation.FRONT
Represents the orientation where the device is lying on its back that is, the front side points upwards.

orientation.BACK
Represents the orientation where the device is lying on its front that is, the back side points upwards.

See About this document... for information on suggesting changes.