freesmartphone.org Orientation Interface
Description
This interface provides access to the device’s physical orientation.
Namespace
org.freesmartphone.Device.Orientation
Methods
Signals
Properties
None
Errors
None
Methods
GetOrientation ( ) → s
Description: Returns the orientation of the device.
Returns:
s: orientation The orientation. Expected substrings are:
- “flat” (Laying flat on a level surface, e.g. a table),
- “held” (Being held slightly tilt towards your face),
- “portrait” (Display held with the long side vertically),
- “landscape” (Display held with the long side horizontally,
- “faceup” (Display being oriented towards the sky),
- “facedown” (Display being oriented towards the floor),
- “normal”, (Not rotated)
- “reverse”, (180 degrees rotated)
Signals
OrientationChanged ( s )
Description: Sent whenever there is a change of the device orientation.
Parameters:
s: orientation The new orientation. See GetOrientation for supported values.