Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I'm running ICS on HTC Desire. Long pressing the home button brings the list of recently opened apps. Is there a way I can launch this without using the home button?

Please note that I want to do what long-pressing home button does, i.e. bring the stock opened app list not any third party one.

share|improve this question

1 Answer 1

You can open the recent apps list using .

Setup ADB in PC, connect the phone into PC, enable USB debugging in phone, launch a shell on PC, and enter:

adb shell input keyevent --longpress 3

3 is a KeyEvent to call Home. See more of them here. Also, if the recent list isn't bind to long press Home key but to another key like Menu/Overview key then the command wouldn't result in any visible activity on device. In that case, look for the KeyEvent associated to your key.

The parameter --longpress isn't available to Android versions prior to Kitkat release so the command would give you error on ICS or JB.

Alternatively, in my devices I found that the activity responsible for bringing that list is managed by SystemUI. You can call that activity using ADB to show that recent apps list.

adb shell am start -n com.android.systemui/.recent.RecentsActivity

(Add --activity-clear-task at the end if the activity doesn't show up in front. Space is important before --.)

This worked on Android 4.2.1, 4.4.2 and 5.0.2. For Lollipop, use com.android.systemui/.recents.RecentsActivity to show up recent apps list in 3D, otherwise, you would see a 2D list which is usual for Android 4.x.

As for launching it within the device without entering the commands, simply use QuickShortcutMaker or Tasker to make home screen shortcuts for the said activity.

share|improve this answer
    
One can consider this answer too : stackoverflow.com/a/20537408/4720957 –  Firelord Aug 14 at 5:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.