How to prevent menu from continuously popping up on app?

125 views
Skip to first unread message

Anony Mouse

unread,
Jun 25, 2012, 8:26:12 PM6/25/12
to tas...@googlegroups.com
I am trying to create a profile for my car that when the phone is plugged in and I open my car dock app, a scene display (menu) automatically opens allowing me to click a button to open either media player, Slacker, or Pandora. The problem is, I can't figure out how to get the menu to only appear once for the app - when the app is initially opened. It keeps popping up repeatedly, whether I hit back to get rid of the menu or click and open one of the music apps (I return back to the car dock app and leave the music running in the background as I drive). Once I get back to my car dock app, it continuously pops back up. I would think it to be something so simple to do, but my brain can't wrap around it to figure it out through all my tinkering with "stop", ""wait", "hide scene", "destroy scene", etc.

This is what I have for the task:

1. Wait (3 secs)
2. Show Scene
3. Wait (20 secs)
4. Destory Scene
5. If %GONEMAD ~ on
6. Element text colour
7. Else
8. Element text colour
9. End if
10. If %PANDORA ~ on
11. Element text colour
12. Else
13. Element text colour
14. End if
15. If %SLACKER ~ on
16. Element text colour
17. Else
18. Element text colour
19. End if





Pent

unread,
Jun 26, 2012, 2:12:19 AM6/26/12
to Tasker
Try using

state: Variable Value, %UIMODE Matches car

Instead of triggering off the app.

Pent

Anony Mouse

unread,
Jun 26, 2012, 11:20:02 AM6/26/12
to tas...@googlegroups.com
No luck. The display does not appear anymore when I initially open the app.

Cptnodegard

unread,
Jun 26, 2012, 12:14:11 PM6/26/12
to tas...@googlegroups.com
Pent's solution uses a phone state called car mode. This is something that is triggered on many phones when inserted into actual car docks that support it. If you're using a generic holder, generic charger, and manually open up the car app, it won't work. 
What you can do is create a system of variables that interact with the menu pop up. As an example, let's say that the music player, phone dialer and message app are the ones you sometimes head into and get this annoyance with when you return. Create a profile that sets a variable %Stillcarmode to on when those apps are opened, add an exit task with a Wait action, put it to e.g. 30 seconds, and then do Variable Clear %Stillcarmode. The modify your Show Scene to include If %Stillcarmode !~(doesn't match) on. 
The result is that if you go back into your car app within 30 seconds of exiting one of the other apps, the menu won't pop back up. 

Anony Mouse

unread,
Jun 26, 2012, 12:35:17 PM6/26/12
to tas...@googlegroups.com
Oh, okay. Thank you for the clarification on the car mode. No, I have nothing like that. My cup holder is my car dock, I have a generic charger, and no bluetooth. I just use the app in itself. I will try to figure out how to incorporate the variables you suggested since I am fairly new to Tasker and struggling a bit with it. I am determined to figure it out, though. Thanks for your help and suggestions.

Matt R

unread,
Jun 26, 2012, 2:40:07 PM6/26/12
to tas...@googlegroups.com
I assume you plug your phone in while driving and unplug it when you leave your car?  You could also use something similar to Cptnodegard's solution above, but instead clear %Stillcarmode when the phone is unplugged instead of after 30 seconds.  Just use a profile to set %Stillcarmode to "true" or "1" (whatever makes logical sense to you) when you launch the car dock app and the phone is plugged in.  Then, create a separate profile with contexts of "not plugged in" (use the "invert" checkbox) and "%Stillcarmode ~ true" and give it a task to clear %Stillcarmode (or set to "false" or "0" ... ).
 
Matt

Anony Mouse

unread,
Jun 26, 2012, 3:14:48 PM6/26/12
to tas...@googlegroups.com
Yep, exactly. I am about as low tech as anyone can get as far as nifty phone accessories and features. Tasker is the only thing high tech about my phone so I am trying to get the most out of it that I can. :D

Cptnodegard

unread,
Jun 26, 2012, 4:04:20 PM6/26/12
to tas...@googlegroups.com
Matt's suggestion with AC based menu triggering would work fine, though if you stop the car and that turns off charging, you might get an extra popup. 
Here's how you create it:

Replace the context for the profile you already have with Event->Variable->Variable Set: Variable: %Carmode, Value: on. 

Create a new profile, "Carmode on". Contexts should be the following two:
Application:the car app you use
State->Power->Power: Source: AC (or USB, depending on what the phone registers your car charger as. probably AC). 
Task should be the following:
Variable->Variable Set: Name: %Carmode, To: on

Create another new profile, "Carmode off". Contexts should be the following two:
State->Power->Power: Source: Any, Invert: checked
State->Variable->Variable value: Name: %Carmode, Op: Matches, Value: on
Task should be the following:
Variable->Variable Clear: Name: %Carmode

This will cause the following to happen:
The menu will appear when the phone is plugged into charging AND the car app is started. 
It won't appear again until the phone has been unplugged, and the above two conditions are true once again. 

Like I said though, if it stops charging and then starts back up again, e.g. because yous topped the car for a bit, the menu will pop back up. If that's a potential problem, my original suggestion might be the better choice

Anony Mouse

unread,
Jun 26, 2012, 5:18:06 PM6/26/12
to tas...@googlegroups.com
Sadly, something did not work just right. I set up the three profiles exactly as stated (and triple checked that it had it exactly as typed out). When I plugged the phone in using the car charger, nothing happened. I changed the AC to USB in the "Carmode On" profile and tried again. Nothing happened. I tried Any and tried again. Nothing. :( I went ahead and opened the car dock app manually and the display popped up. I opened Pandora and hit the back button on the phone. When the car dock app opened again, the pop up appeared again. Since it was already set as USB, I decided to test it with the house charger and got the same results. When the second pop up is cleared by using the back button, the display is not appearing to be popping up anymore (I am testing it just now as I type this and it has gone through three songs with no annoying pop up of the display). I was so looking forward to the app opening when plugged in, but I get no more annoying continuous popping up of the display which is just what I wanted. :D

Thank you guys so much!

Cptnodegard

unread,
Jun 26, 2012, 5:32:20 PM6/26/12
to tas...@googlegroups.com
The car app was never supposed to pop up on its own, as that would then happen when plugged into your home charger etc too. It's supposed to react to manually opening the app AND having power plugged in.

To prevent it from popping up twice, go into the Carmode on profile, the task, and the variable set action. Check "If" and add %Carmode !~(doesn't match) "on", like this:


If you really want the car app to start automatically, we might be able to make that happen. Is there some sort of state your phone is always in when you charge it outside of your car, e.g. if you always charge at home it might be connected to your home wifi network? Or perhaps you only charge it during certain parts of the day, or only use the car during certain parts of the day?

Anony Mouse

unread,
Jun 26, 2012, 6:14:30 PM6/26/12
to tas...@googlegroups.com
I'm sorry. I misread your post.

The profile works BRILLANTLY now! Thank you! As to the *bonus* function, I'm not sure. While at home is the only time the phone is connected to a wifi network (and this is the only one I connect to) so that might work. However, it is not consistently connected. I have it set to toggle wifi off and on every half hour to conserve battery life. Would that still work? If not, it is okay. You have been uber helpful and I really appreciate the time and effort you have put into helping me get this working.

Cptnodegard

unread,
Jun 26, 2012, 8:46:04 PM6/26/12
to tas...@googlegroups.com
No problem. 

It's not really practical to try the bonus feature based on lack of WiFi when that's not a constant while you're at home. For the record though, my phone runs through 4-500 Tasker actions per day, has email, IM, wifi, 3g etc always enabled, and on a slow day with little phone uses it drains about 10% of the battery on its own. Depends on the device of course, but I find that a lot of people overestimate how much of an impact wifi and stuff like that has on battery life. 

What you could do is use a second menu to ask you if you want to open the car app when AC power is connected. Saves you a few seconds while in the car, might become annoying at home. 

Anony Mouse

unread,
Jun 26, 2012, 11:23:23 PM6/26/12
to tas...@googlegroups.com
Great suggestion! Thank you! That would be a bit time saving and less annoying than having to click a few buttons every time I am about to drive to start the app.

Wow! You must have a great Juice Defender type of profile. I shall experiment with turning off the toggle profile and leave wifi on and see how it goes.

Thank you for all your great suggestions and help. :)

Cptnodegard

unread,
Jun 26, 2012, 11:33:51 PM6/26/12
to tas...@googlegroups.com
Actually I don't have any sort of battery saving setup whatsoever. I do have a 2000mAh extended battery in my Galaxy S II, but that's only an additional 25% on top of the stock battery. And it's an AMOLED device, so the fact that I like black and use it on everything actually does save battery since AMOLED black = the pixels are physically off. 

Maybe the phone knows that I can't be bothered trying to save power, so it doesn't bother trying to use more than necessary? :D

Anony Mouse

unread,
Jun 27, 2012, 1:15:50 AM6/27/12
to tas...@googlegroups.com
Haha! You truly have a smartphone, don't you? :)

Well, the display leaves much to be desired and it is working as intended, but now my music menu is blinking on and off without giving me a chance to make a selection once the car dock app is opened. GRRRRRRRRR!!!!

Cptnodegard

unread,
Jun 27, 2012, 2:03:29 AM6/27/12
to tas...@googlegroups.com
You mean after you added a dialog option for opening the app when plugged in? How exactly did you go about adding that?

Anony Mouse

unread,
Jun 27, 2012, 10:25:00 AM6/27/12
to tas...@googlegroups.com

Yep. I probably left something out somewhere, but I tried. :D

Display:

I created the display, text buttons x3.

1. Open Car Dock? (No task)
2. No (Destroy scene - Car Dock)
3. Yes (Load app - Car Dock Home v3)

Profile:

Context: Power AC
Task: Show scene car dock

Cptnodegard

unread,
Jun 27, 2012, 2:33:05 PM6/27/12
to tas...@googlegroups.com
Hmm that should work. Try to click the menu button, Run Log, turn it on for everything. Try your task, then check the log/post it here to see what's going on

Anony Mouse

unread,
Jun 27, 2012, 11:33:04 PM6/27/12
to tas...@googlegroups.com
Okay, this is what it came up with. I'm not sure what you need from it so I will type it all out. It is a bit lengthy....

inactive 65 load car dock
active 128 carmode off
running 129 anon
inactive 128 carmode off
ok 12.. anon.variable clear
exitok 129 anon
active 65 load car dock
running 118 anon
ok 11 anon.show scene
exitok 118 anon
running 42 anon
ok 42.1 anon.load app
exitok 42 anon
active 19 display screen on
active 3 night mode (car dock)
active 4 music volume
active 9 data
active 123 carmode on
running 25 screen on
running 6:2 anon
running 5:3 anon
running 13:4 anon
running 12... anon
ok 12...anon.variable set
exitok 12... anon
instant 8 carmode
running 89:6 music
ok 13:... anon.mobile data
exitok 13:4 anon
ok 5:3.1 anon.media volume
exitok 5:3 anon
ok 6:2.1 anon.screen filter
exitok 6:2 anon
ok 25.1 screen on.display timeout
exitok 25 screen on
ok 89:... music.wait
ok 89:.. music.wait
inactive 123 carmode on
inactive 9 data
inactive 4 music volume
inactive 3 night mode (car dock)
inactive 19 display screen on
running -15... system
running 16:8 anon
running 14... anon
ok 89:.. music.show scene
ok -15.. anon.display timeout
ok -15... anon.media volume
exitok -15.. system
ok 14... anon.screen filter
exitok 14... anon
ok 16:... anon.mobile data
exitok 16:8 anon
active 19 display screen on
active 3 night mode (car dock)
active 4 music volume
active 9 data
active 123 carmode on
running 25:.. screen on
running 6:11 anon
running 5:12 anon
running 13:.. anon
running 12. anon
ok 89:... music.wait
ok 12... anon.variable set
exitok 12... anon
ok 13:... anon.mobile data
exitok 13:... anon
ok 5:1 ... anon.media volume
exitok 5:12 anon
ok 6:1 ... anon.screen filter
exitok 6:11 anon
ok 25:... screen on. display timeout
exitok 25:... screen on
ok 89:.. music.wait
ok 89:.. music.wait
ok 89:... music.destroy scene
ok 89:... music.if
ok 89:... music.else
89:... music.element text colour
89:6 music
inactive 123 carmode on
inactive 9 data
inactive 4 music volume
inactive 3 night mode (car dock)
inactive 19 display screen on
running -165 system
running 16:2 anon
running 14.. anon
ok -16... anon.display timeout
ok -16.. anon.media volume
exitok -165 system
ok 14... anon.screen filter
exitok 14. anon
ok 16:... anon.mobile data
exitok 16:2 anon

Anony Mouse

unread,
Jun 30, 2012, 5:12:56 PM6/30/12
to tas...@googlegroups.com
I think I need to get rid of that profile. Yesterday it opened the display when the phone was not even plugged in to the charger. Weird....

Anony Mouse

unread,
Jul 2, 2012, 12:25:30 PM7/2/12
to tas...@googlegroups.com
I got it sorted out, I think. I ended up doing a factory restore on the phone and it seems to have cleared up issues with this profile and a couple of other profiles as well.

Thanks for your help, Cptnodegard. You were also right about leaving wifi on. :)

Cptnodegard

unread,
Jul 2, 2012, 8:51:50 PM7/2/12
to tas...@googlegroups.com
Forgot about this thread, nice to hear you solve it. If you start leaving WiFi on you can just use inverted WiFI connected (i.e. wifi not connected) as a state along with your AC plugged in state, then open the app when both those are met
Reply all
Reply to author
Forward
0 new messages