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

Newbie Tasker Question

staffsmatt

Well-Known Member
Jun 7, 2010
153
9
Hi, I've just started using tasker and I think i'm doing something wrong!

I seem to always need an exit task for one profile. I'm trying to set it so that if the phone is on power and there is a headset plugged in then the screen will stay on and the lock (pattern lock) will be disabled.

For this i have created a new profile and added power source > any and headset plugged > any

For the enter task I have Display Timeout > 23 hours and keyguard set off

Without an exit task my phones screen doesn't turn off even when the headset and power are unplugged, am I doing something wrong or is this correct?

The exit task I have is Keyguard set on and display timeout 1 minute is this the best way of doing it?

Finally is there a way to have tasker acive but not have the notification showing (not a biggie but I would quite like to get rid of it...)

Thanks!
 
You shouldn't need an exit task for that. I do something similar. When it is plugged in and Listen is open, I have my Screen timeout set to *. When I unplug it or close Listen, my Screen timeout goes back to 1 minute without having an exit condition.

I use very few exit conditions. Tasker doesn't have a "default" option that you can set and you generally shouldn't need it. The way it is suppose to work is that when a profile becomes active it makes the changes necessary, and then when the profile goes inactive it changes the settings back to whatever they were at. Essentially whatever your settings are at with no conditions active becomes the "default" condition.

You may be having an issue with the task being active while you made changes to it, that can mess with turning on and off settings. Get the tasks set the way you want and then go in to the phone settings > Applications > Tasker > and force stop it. Now make sure it is set to 1 minute screen timeout as well as everything else being at whatever default condition you want. Then reopen Tasker and see if your conditions work correctly.
 
Upvote 0
Is there a default option in tasker though or is it just a case of knowing what you want it set back to (in the case of screen timeout times etc...)

When selecting an action for your tasks, the options that have a gear icon beside them in the select box are the ones that will revert back once the profile goes inactive. As opposed to the lightening bolt icons, which are actions.

I also agree with the above post, make sure your phone's settings are correct, then go into Tasker and be sure everything is set up properly, then try. If you are still having problems, post the profiles how you have them set up so someone can help easier.
 
Upvote 0
I know there is lots of discussion about exit tasks and not needing them, but personally I prefer to put them in there anyway. It doesn't hurt anything to have them.

Plus, there are cases where if the setting is manually (or otherwise changed) Tasker might revert back to a state that you had not intended.

IMO, much better to specify what you want Tasker to do when the profile exits, when possible.
 
Upvote 0
I do something similar. When it is plugged in and Listen is open, I have my Screen timeout set to *.

Not sure what I was doing but it seems to be working now! Quick question though, how tdo you enter * for the timeout? I have seconds, minutes hours and If I hit the double arrow button I can enter a variable but no where to put a star?

Thanks
 
Upvote 0
OK I've got another question! (I think I may end up with a lot!)

I'm trying to create a shortcut that will launch an app and if Wifi is on launch the app and if the wifi is off turn wifi on then launch the app (so far I'm fine) but for the exit task I want wifi turning off again only if it was turned on by the start task (I've attached a flow chart with how it should work in my head) my question is two-fold is this the best way of doing it and how can i use the if statements to get it to work properly..

Cheers
 

Attachments

  • Flow chart copy.jpg
    Flow chart copy.jpg
    30.9 KB · Views: 69
Upvote 0
Not sure what you mean by exit task. A widget doesn't have an exit task. So, when do you want the profile to exit? When you press the widget a second time?

I think something like this might work. Not sure. Put it together real quick. I'm hoping this will "exit" when you stop using the app. Try it and see.

Widget Task:
Variable Add %WIDGET (Add a value of 1 with a wrap around of 2)

Profile 1: Remember Wifi
Context: %WIDGET =1
Task: Set variable %WIFIMEM = 1 (If %WIFI = off)
Task: Activate Profile "Load Wifi App"
Exit Task: Wait 10 seconds, Clear Variable %WIFIMEM

Profile 2: Load Wifi App
Context: %WIDGET =1
Task: Wifi On, Load App (whatever app you want)

Profile 3: Close App
Context: Application (NOT the app you selected to load at profile 2)
Task: Variable Add %WIDGET (Add a value of 1 with a wrap around of 2)
Task: Wifi Off (if %WIFIMEM=1)
 
  • Like
Reactions: staffsmatt
Upvote 0
Sorry thought I'd said shortcut...

That doesn't seem to work once you introduce a wait into the mix... (ie Wifii matches *connection*) it launches great but doesn't turn wifi off after the app exits...

EDIT: I think this is because the shortcut I've created enables wifi outside of the app starting (it's not the app starting that enables wifi exactly... I think I'll have to have a play with variables...) thanks for your help.
 
Upvote 0
Not sure what I was doing but it seems to be working now! Quick question though, how tdo you enter * for the timeout? I have seconds, minutes hours and If I hit the double arrow button I can enter a variable but no where to put a star?

Thanks

Have the sliders for seconds, minutes, and hours all maxed. It will still show 59, 59, and 23 on the edit screen but when you tap 'done' it will show *'s.
 
  • Like
Reactions: staffsmatt
Upvote 0
Sorry thought I'd said shortcut...

That doesn't seem to work once you introduce a wait into the mix... (ie Wifii matches *connection*) it launches great but doesn't turn wifi off after the app exits...

EDIT: I think this is because the shortcut I've created enables wifi outside of the app starting (it's not the app starting that enables wifi exactly... I think I'll have to have a play with variables...) thanks for your help.

You may be making that more complicated than necessary.

What amlothi is saying is just make a new task with a context of application, select the application you want, tap done, tap the + to add a task, tap net > wifi > set to on, tap done a couple times and apply.

Now try opening the app that you set it for and it should turn wifi on and it should turn off when you exit the app.

edit: ah, I missed the part where you want it to wait 5 seconds before opening the app. Is the wait necessary? Wifi doesn't take long to connect and should take over anything downloading once it does.
 
Upvote 0
Hi think I've got it sussed now. I've done it like this:

I've got a task set as:

1) Variable Set > %Taskwifi to 0
2) Variable Add % Taskwifi Value 1 If % WIFII ~ *connection*
3) WiFi Set ON
4) Wait until %WIFII ~ *connection*
5)Load App

I've created a home screen shortcut for this task

Then I have an exit task where:

1) Wifi Set off if %Taskwifi ~ 0
2) Variable Set %Taskwifi to 1

Basically this is so that Closing the app will turn wifi off again IF wifi was turned on by launching the app (not just on before the app was launched...)

The only thing I have to do dow if find out how to put an if at the startso that if Mobile data is on it jumps straight to loading the app.... I can't find a variable for mobile data though...

(I fully acknowledge that this may be an over complicated way of doing it but it was the only way I could find of getting this exact behaviour... (one of the apps I used it for (ebay) wouldn't automatically reload if it started before wifi had connected)

Cheers
 
Upvote 0
I don't believe there is a Mobile Data variable. You could try using Variable Query. That pops up a box where you could ask yourself if it is on or off. The answer then becomes a variable, so if 'Y' is used as an answer, then use Goto Action to go wherever in your task. If 'N' then proceed accordingly.

I agree, it's not as automated as the rest of your profile. But we have to wait until the developer creates that variable.
 
Upvote 0
I've created a home screen shortcut for this task

Then I have an exit task where:


How, exactly, did you do this? What you are saying doesn't make sense.

You can't have an exit task for a widget/shortcut on the home screen.

When you press the widget, it will run the task immediately.

If you have an active profile, the exit task will run when the profile exits. However, with a widget, you just perform one task immediately. There is no profile active. So there cannot be an exit task.
 
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