I need to simulate this scenario with adb, drag from a srouce point to a target point and keep pressed until an event happens.
how can I write the adb shell command? thanks in advance.
Several ways-
1. Use getevent
and sendevent
if coordinates wont change:-
Record your drag event with adb shell getevent
and play with adb shell sendevent
. Refrer this link.
2. Use uiautomator if drag co-ordinates are not constant
create a uiautomator jar which accepts your drag coordinates from command line and run via adb shell.