Back

GetOrientation

JS Py
Hello World

Returns the current device orientation.

app.GetOrientation() → String: “Portrait” or “Landscape”

The result modes can be “Portrait” if the device width is smaller than the device height, or “Landscape” vice versa.

See Also: SetOrientation, GetDefaultOrientation, GetRotation

Example - Example

function OnStart()
{
    orient = app.GetOrientation();
    app.Alert( orient );

}
from native import app

def OnStart():
    orient = app.GetOrientation()
    app.Alert(orient)
    Copy     Copy All       Run