home button press intent (maybe?)

300 views
Skip to first unread message

Richard Wallace

unread,
Sep 3, 2014, 1:48:15 PM9/3/14
to tas...@googlegroups.com
I have a scene I've created for in car use.
There are various buttons to open dialer, contacts,music etc.
But I'd like to return to my scene when the home Hutton is pressed rather than my launcher.
Is it possible?
I'm thinking along the lines of:
As part of the run scene task a variable is set, let's say %CarMode, to 1.
The whenever he home button is presses whilst %CarMode = 1, have the car mode scene displayed?

Sean Williams

unread,
Sep 3, 2014, 1:56:54 PM9/3/14
to tas...@googlegroups.com
As far as I know you cannot catch the home button.

Maybe you could trigger on the %WIN value of your home screen?

Rich D

unread,
Sep 3, 2014, 8:35:14 PM9/3/14
to Tasker Google Groups Post


> As far as I know you cannot catch the home button.
>
> Maybe you could trigger on the %WIN value of your home screen?

That is how I do it for some scenes, you can check to see if the scene is still created when %WIN ~ 'your home screen'. If it is created then show scene if not do nothing...  
>
> --
> 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/d/optout.

Richard Wallace

unread,
Sep 4, 2014, 3:27:18 AM9/4/14
to tas...@googlegroups.com
How do I set a WIN value.
I've tested using flash %WIN with scene open and of returns %WIN

Jay M

unread,
Sep 4, 2014, 4:30:32 AM9/4/14
to tas...@googlegroups.com

Enable Taskers Accessibility service then create a new profile with variable set %WIN then link it to a task that flashes %WIN

Jay M

On 4 Sep 2014 08:27, "Richard Wallace" <richiew...@googlemail.com> wrote:
How do I set a WIN value.
I've tested using flash %WIN with scene open and of returns %WIN

joaomgcd

unread,
Sep 4, 2014, 4:55:19 AM9/4/14
to tas...@googlegroups.com
If you have Android 4.3+ and your home key is a physical key (not a software key like on nexus devices) you can do this with AutoInput. Check it out here: joaoapps.com/beta-testing/

Richard Wallace

unread,
Sep 4, 2014, 5:07:53 AM9/4/14
to tas...@googlegroups.com
Thanks jay.
The acessability service is set to on in android settings.
I'm not following here...?! Sorry

Richard Wallace

unread,
Sep 4, 2014, 5:29:59 AM9/4/14
to tas...@googlegroups.com
So far what I have is this:
Profile: Go Car Home (212)
Application: Nova Launcher
Enter: Anon (213)
A1: Test Scene [ Name:CarDockHome Test:Status Store Result In:%sceneon ]
A2: Show Scene [ Name:CarDockHome Display As:Activity, Full Window, No Bar Horizontal Position:100 Vertical Position:100 Animation:System Show Exit Button:On Continue Task Immediately:On ] If [ %sceneon ~ visible | %sceneon ~ hidden | %sceneon ~ background ]
A3: Flash [ Text:%sceneon Long:Off ]

It works but its slow when the home button is pressed. When the back button is pressed its pretty quick though?

Rich D

unread,
Sep 4, 2014, 9:28:00 AM9/4/14
to Tasker Google Groups Post


> So far what I have is this:
> Profile: Go Car Home (212)
>         Application: Nova Launcher

> It works but its slow when the home button is pressed. When the back button is pressed its pretty quick though?
>

You are using the 'App' context.  It could be faster if you use context: event / variable set : %WIN / Value: "your launcher window value"

To get "your launcher window value". You need to make a simple testing profile

Profile : test window value
Context: event / variable set : %WIN
Task:
1. Flash %WIN

This will flash the window value every time you change windows.

Richard Wallace

unread,
Sep 4, 2014, 5:16:55 PM9/4/14
to tas...@googlegroups.com
Thanks.
Got it.
But unfortunately its not really any quicker. Even taking out the test scene action.
Seems to take 3 - 5 seconds for the scene to reappear.
I can live with it for now I think.
Reply all
Reply to author
Forward
0 new messages