How do I access the "Recent Apps" menu on Android? Drag only goes from point A to point B

On Pixel in specific. I’ve tried all sorts of different functions, but in every case (drag, press, mousebuttondown, etc) all the commands between the start and end are not carried out on the device.

For example:

Set screenW to (item 1 of RemoteScreenSize())
Set screenH to (item 2 of RemoteScreenSize())

MoveTo [screenW*0.5, screenH*0.9]
MouseButtonDown 1
MoveToEach [screenW*0.5, screenH*0.5], [screenW*0.8, screenH*0.5]
MouseButtonUp 1

Doesn’t cause the finger to drag to multiple places. It acts like this instead:

Set screenW to (item 1 of RemoteScreenSize())
Set screenH to (item 2 of RemoteScreenSize())

MoveTo [screenW*0.5, screenH*0.9]
MouseButtonDown 1
MoveTo [screenW*0.8, screenH*0.5]
MouseButtonUp 1

and

Drag [screenW*0.5, screenH*0.9]
MoveTo [screenW*0.5, screenH*0.5]
wait 1 second
Drop

Doesn’t wait, which is necessary to view recent apps. Instead, it acts like this:

Drag [screenW*0.5, screenH*0.9]
MoveTo [screenW*0.5, screenH*0.5]
Drop

I noticed that the mouse movement seems to still be working as intended, because setting MouseMoveSpeed to 1 causes a huge delay before the drag command is carried out on the mobile device quickly (moving only from drag point to drop point).

Is there a way to drag then hold? Or is there an alternate way to access the “Recent Apps” menu on a Pixel device?

You might want to try this:

put ADBCallRemote("shell input keyevent KEYCODE_APP_SWITCH") -- Sends keyevent KEYCODE_APP_SWITCH to the device

I don’t currently have access to a Pixel, but if this fails to work for you, I will see if I can get a crack at a Pixel.

Hope this helps,
Dave

1 Like

It works like an absolute charm. Thank you! I guess I should dive into adb shell keywords.

1 Like