Home screen? Where is that?

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Home screen? Where is that?

Post by MURTUMA » 21 Apr 2013 21:44

I have made this nifty little flow that allows you use volume buttons to turn phone silent and back. I'd like that to work only when I'm at home screen to minimize accidental silencing of phone. However I'm unable to find a way for automagic to determine when I'm at home screen.

I'd like a way to do that universally, regardless of home launcher or at least easy way to tweak the flow to work in different launchers. Currently I'm using smart launcher pro.

Here the flow: http://automagic4android.com/flow.php?i ... ca4309ffaa

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Home screen? Where is that?

Post by Martin » 22 Apr 2013 10:54

Unfortunately the procedure is not launcher independent.

Condition App Task Running also creates a variable index that indicates the order of the tasks (0=top).

For testing purposes it can be helpful to check the value of index with a flow:
-trigger Periodic Timer: every 10s
-condition App Task Running: com.android.launcher
-->true: -action "Notification on Screen: {index}"

You can use this to check if you are on the launcher:
-condition App Task Running: com.android.launcher
-->true: -condition "Expression: index==0"
----->true: your actions


Martin

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: Home screen? Where is that?

Post by MURTUMA » 22 Apr 2013 13:18

Many thanks! That was exactly what I needed.

Updated flow: http://automagic4android.com/flow.php?i ... 434ca34cb2

EDIT: It seems this method is applicable to some of my other flows too to make them simpler and erase some loop checks to make them more battery friendly. Maybe I should start learning some codeing.

Post Reply