Skip to content

Mobile Lua API

Lily edited this page Dec 16, 2024 · 4 revisions

Touch Functions

TODO

Android Functions

isRooted

A variable checks if your Android device is rooted

isDolbyAtmos

A variable checks if your Android device has Dolby Atmos

isAndroidTV

A variable checks if your Android device is an Android TV

isTablet

A variable checks if your Android device is a tablet

isChromeBook

A variable checks if your Android device is a Chromebook laptop

isDeXMode

A variable checks if your Android device is in Samsung DeX mode

isCharging

A variable checks if your Android device is being charged

backPressed()

Checks if the back button is pressed

backJustPressed()

Checks if the back button gets pressed once

backJustReleased()

Checks if the back button gets released

menuPressed()

Checks if the menu button is pressed

menuJustPressed()

Checks if the menu button gets pressed once

menuJustReleased()

Checks if the menu button gets released

setOrientation(hint:String)

Sets a orientation. Possible values are "Portrait", "PortraitUpsideDown", "LandscapeLeft" and "LandscapeRight"

getCurrentOrientation()

Gets current orientation

isScreenKeyboardShown()

Checks if screen keyboard is shown

clipboardHasText()

Checks if clipboard has something on it

clipboardGetText()

Gets clipboard text

clipboardSetText(string:String)

Sets the clipboard text

manualBackButton()

Simulates a back button press

setActivityTitle(title:String)

Sets the activity title

Other Things

mobileC

A variable that returns mobile controls are visible or not

mobileControlsMode

A variable representing the current mobile controls the player is using all the possible values are "left", "right", "custom", "duo", "hitbox" and "none".

vibrate(duration:Int, ?period:Int)

Vibrates your device

Clone this wiki locally