Is there a way to get the use ADB to simulate a Recent App key press? I do not see it in the list of assigned keys and I am not able to select it using adb input shell tap
despite getting the coordinates from the debugging options.
I am trying to automate a task on my own personal phone (Nexus 5 with soft keys) so any hacky way is fine, assuming there is not a clean way to do this.
The solution is to use the KEYCODE_APP_SWITCH
KeyEvent:
adb shell input keyevent KEYCODE_APP_SWITCH
See @SimonMarquis answer below
adb shell input keyevent KEYCODE_APP_SWITCH
(OBSOLETE)
I don't think there is a keycode for it.
However, I am able to open the recent apps menu with adb shell input tap
(testing on a Nexus 5 with Lollipop). For example:
adb shell input tap 800 1890
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With