mobileDeviceOrientation

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
mobileDeviceOrientation()
Synonymsiphonedeviceorientation
Summary

Returns the current device orientation.

Introduced4.5.2
OSios, android
Platformsmobile
Example
put mobileDeviceOrientation() into theOrientation
Values
NameTypeDescription
return

The mobileDeviceOrientation function returns one of:

unknown: the orientation could not be determined
portrait: the device is being held upward with the home button at the bottom
portrait upside down: the device is being held upward with the home button at the top
landscape left: the device is being held upward with the home button on the left
landscape right: the device is being held upward with the home button on the right
face up: the device is lying flat with the screen upward
face down: the device is lying flat with the screen downward
RelatedCommand: mobileSetAllowedOrientations, mobileLockOrientation, mobileUnlockOrientation
Function: mobileAllowedOrientations, mobileOrientation
Message: orientationChanged
Description

Use the mobileDeviceOrientation function to find the current device orientation.

The mobileDeviceOrientation function returns the current orientation of the device.

Note: Due to the limitation of the Android operating system, landscape left and portrait upside-down are only supported on Android 2.3 and later.

Note: The iPhone X model doesnŐt currently support upside-down portrait mode. Other Apple iPad and iPhone devices continue to support both standard and upside-down portait and landscape orientations.