Exit RootAutomator.
If true, the process will be forcibly killed and the operation will be interrupted; if false, the process will be exited after the current operation ends.
A Promise object, which will be resolved when the operation is completed.
Long press on (x, y) position. The duration of long press is ViewConfiguration.getLongPressTimeout()+100 milliseconds.
Finger ID, default is 0
A Promise object, which will be resolved when the operation is completed.
Press on (x, y) position for the given duration, then lift the finger.
Press duration, unit is milliseconds
Finger ID, default is 0
A Promise object, which will be resolved when the operation is completed.
Swipe from (x1, y1) to (x2, y2) position on the given duration.
Swipe duration, unit is milliseconds
Finger ID, default is 0
Swipe point sampling time, unit is milliseconds, default is 8 milliseconds
A Promise object, which will be resolved when the operation is completed.
Click position (x, y), duration is 5 milliseconds.
Finger ID, default is 0
A Promise object, which will be resolved when the operation is completed.
Touch down on (x, y) position.
Finger ID, default is 0
Move finger to (x, y) position.
Finger ID, default is 0
Touch up.
Finger ID, default is 0
RootAutomator is used to simulate click, gesture, and long press operations based on root or adb permission. Compared to the operation based on accessibility, RootAutomator supports multiple-touch and dynamic gesture, but may not be compatible with all devices.