Launching recent apps dialogue

1,549 views
Skip to first unread message

Dale Newton

unread,
Feb 5, 2014, 7:58:07 PM2/5/14
to tas...@googlegroups.com
Hi,

Anyone know a way to launch the built-in recent apps dialogue directly using intents or a shell command?

It isn't in the list of apps, and I think it is just a dialogue not an app, so I dont think it can be done that way (or using a javascript action to launch an app).

At the moment Im looking at how intents are used but I dont know which action to use.

Thanks for any help.

i9100
NeatRom 5.7

Bob Hansen

unread,
Feb 5, 2014, 8:16:07 PM2/5/14
to tas...@googlegroups.com
You can do this like this:

Recent apps (177)
        A1: Run Shell [ Command:input keyevent 187 Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

Matt R

unread,
Feb 5, 2014, 8:20:31 PM2/5/14
to tas...@googlegroups.com
This works on my device:

Send Intent [
Action:com.android.systemui.recent.action.TOGGLE_RECENTS
Cat:None
Mime Type:
Data:
Extra:
Extra:
Package:com.android.systemui
Class:com.android.systemui.recent.RecentsActivity
Target:Activity
]

Matt

Pent

unread,
Feb 6, 2014, 3:38:59 AM2/6/14
to tas...@googlegroups.com
I have a feeling the Close System Dialogs action will get rid of it too :-)

Pent

Dale Newton

unread,
Feb 6, 2014, 8:03:06 AM2/6/14
to tas...@googlegroups.com
Thanks, but this isnt working on my device.  Nothing is happening.  Anything else I can try?

Dale Newton

unread,
Feb 6, 2014, 8:05:44 AM2/6/14
to tas...@googlegroups.com
Thanks Bob, Thats working. It is a little slow to react though. 

Its about the same time to react as when holding the home button, and that delay is one of the things I'm trying to get around.

Bob Hansen

unread,
Feb 6, 2014, 8:44:17 AM2/6/14
to tas...@googlegroups.com
It's a little slow because Tasker has to basically launch a new process in the background with requires having android allocate memory among other things. So depending upon the current device available memory it can take more or less time. I have noticed the when I first run a run shell command, it takes up to twice as long to run compared to running it the second time. So one trick that might help you is to run a shell command (ls) at a point where the user is busy looking at something. This will cause android to allocate memory then the second run shell command will execute faster. At least, that worked for me in a test I just did.

Matt R

unread,
Feb 6, 2014, 10:31:02 AM2/6/14
to tas...@googlegroups.com
Get a logcat viewer app, access the recents menu through holding the home button or whatever, and then look at the logcat to see what activity was launched.

Matt

Jay M

unread,
Feb 6, 2014, 11:51:01 AM2/6/14
to tas...@googlegroups.com

Its like a 1second delay if that on my device, how long is it on yours like?

Jay M

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/groups/opt_out.

Bob Hansen

unread,
Feb 6, 2014, 12:17:49 PM2/6/14
to tas...@googlegroups.com, jaymen...@googlemail.com
On my droid razr hd with android 4.1.2 its about 1.5 seconds the first time it runs with Tasker in the foreground and about 1 second on repeated runs.

Dale Newton

unread,
Feb 6, 2014, 3:22:36 PM2/6/14
to tas...@googlegroups.com, jaymen...@googlemail.com
Its just under 2 seconds on my device

Dale Newton

unread,
Feb 6, 2014, 3:34:47 PM2/6/14
to tas...@googlegroups.com
Following your suggestion I'm using Logcat extreme.  I start recording then press and hold the home button, then go back and pause.but Im not sure there are any intent sends in there though. Its very verbose (TextLayoutCache in particular).

I have found these in there though, which seem ro relate to Recents, though the spelling is Secents for some reason:

02-06 21:18:11.360  1843  2021 I SurfaceFlinger: id=455(47) createSurf 0x40e4a654 (480x800),1 flag=0, SecentsPane

02-06 21:18:12.380  1843  1843 I SurfaceFlinger: id=455 Removed SecentsPane idx=6 MapSz=4

There's also:

02-06 21:18:11.180  2245  3164 D RestrictionPolicy: isHomeKeyEnabled :true

I have attached the full log (about 1.5 seconds worth).
Log_2014-02-06_21-18-10.txt

Matt R

unread,
Feb 6, 2014, 3:59:00 PM2/6/14
to tas...@googlegroups.com
That's a pretty sparse log.  I'm not familiar with logcat extreme, but maybe you don't have the log priority or buffer selected.  Priority I set to verbose and buffer should be main or events ... I don't remember which.  You should see log entries from ActivityManager.

Matt

Dale Newton

unread,
Feb 6, 2014, 9:49:40 PM2/6/14
to tas...@googlegroups.com
I just tried with another called Logcat.  Again,. I started recording, held home to make recents dialogue come up, then stop recording and saved the log.

I had Main, Event, and Radio all selected, and verbose outputlevel. Is this anything:

02-07 03:37:41.175 I/binder_sample( 3650): [android.app.IActivityManager,63,29,net.dinglisch.android.taskerm,5]

?

There are a couple of other instances of ActivityManager in the log.
2014-02-07-03-37-18.txt
device_info.txt

Matt R

unread,
Feb 6, 2014, 11:05:16 PM2/6/14
to tas...@googlegroups.com
Nope, I don't see anything there about the recent panel. On my device I get an entry like this:

02-06 20:02:49.102 I/ActivityManager(772): START u0 {act=com.android.systemui.recent.action.TOGGLE_RECENTS flg=0x10800000 cmp=com.android.systemui/.recent.RecentsActivity} from pid 1141

Not sure why you aren't getting ActivityManager entries like that. Are you using ART? Maybe that's why.

Matt

Dale Newton

unread,
Feb 7, 2014, 4:03:58 PM2/7/14
to tas...@googlegroups.com
Do you mean Android Runtime?  It doesnt mention anywhere that that ROM uses the Android Runtime, and I see Dalvick entries in the log, and the ROM is based on 4.1.2.  So, I guess would suggest it isnt (?).  I have emailed the developer about that.

The system does respond to intent sends  (some, at least) becasue I can get numbers sent to the dialer, and SMS messages etc using intents sent from the app called intents playground.

Could it be something to do with services installed on the phone interfering maybe?  Something to do with it being a custom ROM?

Matt R

unread,
Feb 7, 2014, 6:10:39 PM2/7/14
to tas...@googlegroups.com
Beats me. On my old phone I had a custom ROM and it still had activity manager entries for each new app that's loaded. Sorry I don't know how to help more.

Matt

Dale Newton

unread,
Feb 8, 2014, 8:26:46 AM2/8/14
to tas...@googlegroups.com
If I cant get around using intents I'll eventually post this problem as a main topic. 

Thanks for the help. I've learn't a lot from this thread.

Edmond Tong

unread,
Jul 1, 2015, 7:34:55 PM7/1/15
to tas...@googlegroups.com
That's great!! Very efficient and works for me too...

Allan Edgar Bate

unread,
Aug 3, 2015, 10:40:21 PM8/3/15
to Tasker
Is there an updated version for Lollipop?

Abdullah Alahdal

unread,
Aug 5, 2015, 12:48:14 PM8/5/15
to Tasker
What do you want to achieve?

If you want to switch to the previous application, then you can search the store for Switchback for Tasker.

Reply all
Reply to author
Forward
0 new messages