MCPcopy Create free account
hub / github.com/X-PLUG/MobileAgent / tap

Function tap

Mobile-Agent-v1/MobileAgent/controller.py:34–41  ·  view source on GitHub ↗
(adb_path, x, y, px, py)

Source from the content-addressed store, hash-verified

32
33
34def tap(adb_path, x, y, px, py):
35 w = px
36 h = py
37 ax = int(x*w)
38 ay = int(y*h)
39 command = adb_path + f" shell input tap {ax} {ay}"
40 subprocess.run(command, capture_output=True, text=True, shell=True)
41 time.sleep(1)
42
43
44def type(adb_path, text):

Callers 1

runFunction · 0.90

Calls 2

runMethod · 0.45
sleepMethod · 0.45

Tested by

no test coverage detected