Stop tasker from turning things off that are manually on


  1. bmore1229

    bmore1229 Member

    My profile

    Any text recieved from gmail. (gmail forwards all Mail to SMS)

    Turns on Wifi, data, and sync. For 2 mins. To get the new Mail. Then turns off the Wifi, data, and sync

    My problem is if I'm manually using Wifi/data on the phone. This profile turns off the Wifi/data when its done.

    So my question is if Wifi or something is already on manually. Is it possible. To set up the profile so things don't turn off I'f they were on before the profile started to run? And how?

    Thanks for the forum, and any help.

    Advertisement
    :
  2. tatootie67

    tatootie67 Well-Known Member

    In your task are you using toggle for your network or off? Tasker will usually override anything else
  3. bmore1229

    bmore1229 Member

    I usually use ZDBox widget to turn things on and off manually.

    Screenshot attached.

    Is toggle thru tasker what I should be using to do it manually?

    Attached Files:

  4. tatootie67

    tatootie67 Well-Known Member

    No. You want to use on, and off with tasker. That way it overrides whatever else is going on.

    Just remember, once the task fires, it can be overridden because the task will exit and thus end the control over your phone
    bmore1229 likes this.
  5. bmore1229

    bmore1229 Member

    I got it. I made a variable for tasker to know if the Wifi was on before the task started. So it knows if it should turn it off or not.

    Quick Sync 2 (267)
    A1: Vibrate [ Time:50 ]
    A2: Variable Set [ Name:%WIFION To:1 Do Maths:Off Append:Off ] If [ %WIFI ~ on ]
    A3: Goto [ Type:Action Number Number:5 Label: ] If [ %WIFI ~ on ]
    A4: WiFi [ Set:Toggle ]
    A5: Auto-Sync [ Set:Toggle ]
    A6: Wait [ MS:0 Seconds:0 Minutes:2 Hours:0 Days:0 ]
    A7: WiFi [ Set:Toggle ] If [ %WIFION ~ 0 ]
    A8: Auto-Sync [ Set:Toggle ]
    A9: Variable Set [ Name:%WIFION To:0 Do Maths:Off Append:Off ] If [ %WIFI ~ on ]
  6. tatootie67

    tatootie67 Well-Known Member

    That's great but you shouldn't have had to do it that way.
  7. bmore1229

    bmore1229 Member

    Is the problem that I'm not using tasker widgets to toggle things to let everything in tasker flow properly?
  8. tatootie67

    tatootie67 Well-Known Member

    Not at all. Like I've been trying to tell you your using wifi /toggle instead of wifi /on or off. You need to use on or off on your task
  9. bmore1229

    bmore1229 Member

    Ok i got rid of the varibles. and toggle.

    I made one profile for when im connected to the wifi and i recieve a text from gmail. syncker force runs. i made another one for when im not connected to the wifi. it turns on the wifi syncker runs and the wifi turns off after 2 mins.

    I did the same for data it knows im not home by looking at what cell towers are near. if data is on syncker will force run if a sms comes from gmail. if its off it will turn the data on run force sync then turn off in 2 mins.

    i usually do not leave wifi data or sync on eats too much battery. thats why i wanted it set up this way.

    i do have one more question. winamp or anything that streams on the internet. if i set up winamp to turn on the wifi i open a shoutcast stream. its fine. but as soon as i hit the home key. the wifi turns off. how can i make it so it knows winamp is still open in the background?
  10. tatootie67

    tatootie67 Well-Known Member

    You can't really do that, the app has to be run in the foreground. I usually use screen on or off and locations for my net control tasks for this reason. Or you could try using juice defender ultimate, which give you individual app control like you are looking for.
  11. electricpete

    electricpete Well-Known Member


    Look at Michael Yaeger's post here:
    https://groups.google.com/forum/#!msg/tasker/KVhuDORpMII/YDMsW9A00_cJ

    I'm going to suggest a modification to meet your needs asuming you want to toggle wifi based on streaming app running (you may need to modify it further if you want to also use data depending on locations)

    Run the shell command with each app running so you can find the correct text to use for matching.

    The entrance task fires whenever you enter program or when you bring it back to foreground after being in background. Turn wifi on in either case (it is already on upon reentering... no big deal).

    The exit task fires whenever you exit the program or send it to the background. The shell command checks if process is still running so we can distinguish which is the case. Only if the app is no longer running will the exit task turn off wifi.
  12. electricpete

    electricpete Well-Known Member

    I see that action A2 got a little garbled by smiley face attack ;-)
    It is run shell command with ps in the command box.

    The command will spit out a bunch of stuff that is easier to inspect on pc when you're looking for those app names. If you want to whittle it down to a smaller list, expand the command as follows:
    ps | grep app_

    (that will only output lines containing app_... which includes all apps but excludes a bunch of other stuff)
Loading...

Share This Page