• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Need Tasker Help

A couple more quick questions:

1) I have a profile that will start up Pandora when I plug in a headset. But I'd like for Pandora to open only if WIFI is on. I've tried various conditions for IF %WIFI, but can't get it to work. Do I do MATCHES, EQUALS, IS SET? And what would the variable be?

2) How do I create an "Open With" dialog box when I run a task, say a list of players when I plug in the headset? Just listing them in the task itself doesn't seem to work, so I'm obviously missing something.
 
Upvote 0
A couple more quick questions:

1) I have a profile that will start up Pandora when I plug in a headset. But I'd like for Pandora to open only if WIFI is on. I've tried various conditions for IF %WIFI, but can't get it to work. Do I do MATCHES, EQUALS, IS SET? And what would the variable be?

I had some problems with variables, until I realised that my keyboard (Swiftkey X) inserted a space after autocompletion of a word (value). I would do "matches", and choose to add a new context to the task that fires Pandora when connected to the headset. The new context is %WIFI matches "connected".

You will need to add a task to set %WIFI to "connected", when connected to the wifi. Exit task set variable %WIFI to "disconnected".

That way it only fires when both contexts are valid: only when plugged in to your headset and the variable %WIFI is set to "connected".

I hope this will work for you!

2) How do I create an "Open With" dialog box when I run a task, say a list of players when I plug in the headset? Just listing them in the task itself doesn't seem to work, so I'm obviously missing something.
You can add a menu as a task. I think it's under input-button-menu. Haven't tried it myself, but that's where I'd start.
 
Upvote 0
You will need to add a task to set %WIFI to "connected", when connected to the wifi. Exit task set variable %WIFI to "disconnected".

That way it only fires when both contexts are valid: only when plugged in to your headset and the variable %WIFI is set to "connected".

Actually this is what I had originally, or very close. Simply a task to load Pandora, followed by one to set Wifi to ON. Don't really care about closing Wifi at Exit since I'm on it most of the time. With a limited data plan, I just wanted to be sure it was on when Pandora was running.

You can add a menu as a task. I think it's under input-button-menu. Haven't tried it myself, but that's where I'd start.
I found it, very non-intuitively, under Alerts > Menu. Which is good, since Input > Button isn't supported with my phone apparently (HTC Vivid). So with this I really don't need the above since Pandora is now one of the choices along with PowerAmp and WinAmp.

But, if I choose Pandora, I want to ensure it won't load if I've forgotten to turn Wifi ON. I set the variable thus: IF %WIFI (matches) ON, but that doesn't work -- Pandora doesn't load when selected. Sorry to be so thick, but what should the syntax be?

Thanks for the help. :)
 
Upvote 0
A couple more quick questions:

1) I have a profile that will start up Pandora when I plug in a headset. But I'd like for Pandora to open only if WIFI is on. I've tried various conditions for IF %WIFI, but can't get it to work. Do I do MATCHES, EQUALS, IS SET? And what would the variable be?

2) How do I create an "Open With" dialog box when I run a task, say a list of players when I plug in the headset? Just listing them in the task itself doesn't seem to work, so I'm obviously missing something.

I had some problems with variables, until I realised that my keyboard (Swiftkey X) inserted a space after autocompletion of a word (value). I would do "matches", and choose to add a new context to the task that fires Pandora when connected to the headset. The new context is %WIFI matches "connected".

You will need to add a task to set %WIFI to "connected", when connected to the wifi. Exit task set variable %WIFI to "disconnected".

That way it only fires when both contexts are valid: only when plugged in to your headset and the variable %WIFI is set to "connected".

I hope this will work for you!


You can add a menu as a task. I think it's under input-button-menu. Haven't tried it myself, but that's where I'd start.

%WIFI is a built-in variable - you can't set it manually. But that's not the variable you need to use anyway. What you want to use as a restriction is the Wifi Connected context, since Wifi can be on but not connected.
 
  • Like
Reactions: bruce73 and Flumme
Upvote 0
%WIFI is a built-in variable - you can't set it manually. But that's not the variable you need to use anyway. What you want to use as a restriction is the Wifi Connected context, since Wifi can be on but not connected.

Right!

That was my idea, to have a "connected-to-a-specific-Wifi-SSID" context, that's why I said Connected (as in to a specific SSID) and not On. Noob as I am, I got it garbled when trying to articulate it.

Thanks for clearing it up!
 
Upvote 0
%WIFI is a built-in variable - you can't set it manually. But that's not the variable you need to use anyway. What you want to use as a restriction is the Wifi Connected context, since Wifi can be on but not connected.
That makes sense. Now, is there any way to make this restriction apply only to Pandora if it is one of the selections on a menu of players (that's why I was trying to work with IF ... )?
 
Upvote 0
When you choose Pandora from the menu profile you created, you have used the context headset connected as a context for that profile to launch, haven't you?

Keep that profile, but remove Pandora from it as an option, and rename it appropriately. Add another context to this profile that says state > net > wifi connected choose your SSID (if you only use wifi at home, for example, otherwise leave SSID blank) and then tick invert. This will launch this menu when not connected to your wifi (or any if you left SSID blank) .

Create another profile for when connected to wifi, with state> net > wifi connected (SSID or blank) as context. Add context headset connected. In the task launch menu include Pandora in this one.

Now you have two menus that will popup, based on whether you are connected to wifi or not.

I believe this will work.
 
  • Like
Reactions: bruce73
Upvote 0
Reminder profiles

I need reminders to take blood pressure medicine in the morning and evening @ 9:00. Basically I want the notification to repeat every 3 minutes, until I clear it (somehow).

I've created a couple of reminder profiles, but they seem a little clunky, so I'm wondering if there's a more elegant way to accomplish this.

Profile: AM Meds
Context: Time (from 9:00 - 9:15, repeat every 3 min)
Task: Notify Meds
1) Media Volume @ 14
2) Notify LED (red)
3) Notify Sound (gong.mp3)
4) Popup ("Take your meds") set for 10 sec
5) Media Volume @ 7

I created another profile (PM Meds) based on the above for 9pm. How do I keep the profile from repeating in those 15 minutes if I no longer need it? Also, even though the LED is set as red, it flashes green (no big deal, just curious why).
 
Upvote 0
One way to keep it from going off once you're done, is to set up an alarm using Gentle Alarm. You need to buy that. It will allow you to set alarms based on calendar events or location, for example, which I use extensively.

Another way is to kick up a notification, that kills the profile you've set up once cleared.
 
Upvote 0
Right, the latter is what I had thought of, too. In fact, to simplify it, I combined the two profiles into just one that would start @ 9am and repeat every 12 hours. Then, within the task itself I added a "Wait" action (set to 3 min) and then a "Goto = number 1" to repeat. Do I have to add an "If..." variable to the the Goto, so that it would only repeat if the notification is still active? Or, if I understand you correctly, canceling the notification would cancel the profile and its repeating action (which is what I want to happen).

EDIT: Nope, just checked. Canceling the notification has no effect. So I guess I would need to use a variable with the repeat action? I'm lost...
 
Upvote 0
Experimenting with notifications...

Wouldn't the goto task make the profile 15 min late for the next cycle?

I'd rather have different profiles that kick in for a short period of time at a certain time, rather than one that is always active. But that's just me ;)

I'll get back when, and if, I work something out.
 
Upvote 0
Here's what I've got:

Profile MedAM
Context time 9 am to 9:15 am every 2 min
Task as you have it, plus notify Title Medic

Profile MedPM
As above, with appropriate changes ;) include notify title Medic

Profile MedOff
Context Notification Click Tasker, Medic (Event>UI>Notification Click>Tasker>Medic)
Task Profile status Name MedAM Set Off
Profile status Name MedPM Set Off
Popup MedAM & MedPM Off!
Wait 20 min
Profile Status Name MedAM Set On
Profle status Name MedPM Set On
Popup MedAM & MedPM On!

Tried this, seems to work....
 
  • Like
Reactions: bruce73
Upvote 0
Flumme, very cool, thanks. Let me see if I understand what you did. The morning profile will start @ 9am and will repeat every 2 min, *until* I click/cancel the notification. That will cause the MedOFF profile to run, which will turn off the MedAM/MedPM profiles for 20 min, so that they won't run again within the 15 min time context. Is that right?

BTW, I had experimented with another task (can't remember which) which also asked to have Tasker's accessibility service turned on. Is the caveat it throws up significant? Or just be aware not to type anything that is "sensitive?"

As to the points you raised above, not sure why Goto would cause a 15 min delay as you suggest, since I had changed the time context to just 9am (to repeat at 9pm), no 15 minute interval at all. I thought I could just have the task itself repeat until a user action would stop it. You don't like any profiles to always be active (with the green check)?

One last thing -- I've noticed that a lot of you guys write profile/task titles with no spaces. Is that preferred?
 
Upvote 0
Flumme, very cool, thanks. Let me see if I understand what you did. The morning profile will start @ 9am and will repeat every 2 min, *until* I click/cancel the notification. That will cause the MedOFF profile to run, which will turn off the MedAM/MedPM profiles for 20 min, so that they won't run again within the 15 min time context. Is that right?
Yes, that's about how I tried to set it up. However, it will repeat every two minutes until the notification is clicked, or the 15 minutes are up. The 20 minute wait gaps those 15.
BTW, I had experimented with another task (can't remember which) which also asked to have Tasker's accessibility service turned on. Is the caveat it throws up significant? Or just be aware not to type anything that is "sensitive?"
I have no idea, to be honest.
As to the points you raised above, not sure why Goto would cause a 15 min delay as you suggest, since I had changed the time context to just 9am (to repeat at 9pm), no 15 minute interval at all. I thought I could just have the task itself repeat until a user action would stop it. You don't like any profiles to always be active (with the green check)?
I was thinking that you get the alarm at 9, it runs 3 cycles at 2 min intervals until killed at 9:04. It then goes on to wait 12 hours until 9:04 when it fires again, runs 5 cycles until 9:12, and so on...
One last thing -- I've noticed that a lot of you guys write profile/task titles with no spaces. Is that preferred?
I use spaces in my own profiles. Not in variables, though.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones