Android blocks
Taps, swipes, hardware buttons and typing on a phone or emulator.
ADB Connect
Connects to an Android phone or emulator and reports its screen size.
In: Device:String
Out: Success:Bool, Width:Int, Height:Int, Connected Device:String
Pro. Turn on USB debugging on the phone first. Must run before the other Android blocks.
ADB Connect(emulator-5554) → ADB Tap.
ADB Tap
Taps a point on the Android screen.
In: Pos:Vec2, Hold:Int, Offset:Vec2
Out: Success:Bool
Pro. The phone does not need to be the active window — taps go to the device directly.
Image Detection(button) → ADB Tap(Pos).
ADB Swipe
Swipes from one point to another — scrolling, dragging, unlocking.
In: From:Vec2, To:Vec2, Duration:Int
Out: Success:Bool
Pro. A longer duration reads as a slower, more deliberate gesture.
ADB Swipe(500,1500 → 500,400) to scroll a list.
ADB Key Event
Presses a hardware Android button, such as Back or Home.
In: Keycode:Int
Out: Success:Bool
Pro. Common codes: 4 = Back, 3 = Home, 66 = Enter.
ADB Key Event(4) to go back.
ADB Type Text
Types text into whatever field is focused on the phone.
In: Text:String
Out: Success:Bool
Pro. Latin letters and digits only — tap the field first.
ADB Tap(login field) → ADB Type Text(my_name).