-3

I want to launch from my application the activity recent apps, without holding on home button. How can i launch that dialog activity? Is that possible ? Thank you very much.

androniennn
  • 3,117
  • 11
  • 50
  • 107

1 Answers1

2

No, it is not possible to do this. The OS does not provide access to this (and moreover, on Android 3.0+, the dialog has changed completely).

However, you could make your own dialog using ActivityManager's getRecentTasks, as well as Dialog (or its subclasses), that would handle the same task.

Cat
  • 66,919
  • 24
  • 133
  • 141
  • maybe it's possible on rooted devices? i think i've seen some apps do it. there is even a key for it: http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_APP_SWITCH – android developer Jan 09 '14 at 21:34
  • @androiddeveloper It's definitely possible, but I haven't attempted to do so on a rooted device. Additionally, this question was posted regarding devices on API 10 and lower (which do not have that key). Good find, though. – Cat Jan 09 '14 at 21:36
  • do you know perhaps where to look for it? i wonder how such apps do it. maybe there is a way to trigger key presses on a global scale? – android developer Jan 09 '14 at 21:38
  • 1
    @androiddeveloper It's possible, but I'm not sure. You could take a look at [this answer](http://stackoverflow.com/a/15964856/1438733) and see if it suits your needs. (Note that this method could break in some versions of Android, so it's honestly better to create your own UI from the recent apps list.) – Cat Jan 09 '14 at 21:40
  • I was just curious. maybe in the future it could be useful... thank you for your answer. – android developer Jan 10 '14 at 07:53