Skip to main content

Get Front App Orientation (device.front_orien)

Declaration

orien = device.front_orien()

Returns

  • orien
    Integer. Screen orientation of the foreground app:
    0 Home at bottom (portrait)
    1 Home at right (landscape)
    2 Home at left (landscape)
    3 Home at top (portrait, upside down)
    4 Failed to retrieve

Example

sys.toast('Toast shows with the front app orientation', device.front_orien())

Note: Uses sys.toast