What's new
DroidForums.net | Android Forum & News

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

What have YOU done with Tasker?

I saw this Shake2MuteCalls Silences Your Ringer When You Jostle Your Android Phone

And I am going to try and develop a profile for this function in tasker. If you are interested, let me know and I will give detailed instructions after I finish it and its working.

That sounds interesting Nebula, how did it work out? I'd be interested in your setup if you've made it work. =)

I think I got it working though I haven't been in a situation to test it.
I set a profile to Event: Phone ringing and that sets a variable %phonering to 1. and an exit to set it back to 0

I then created another profile to Event Gesture and recorded the gesture I wanted to use and then a second context that %phonering = 1. This way it isn't always scanning for the gesture, only when I have that variable set to one. I then execute a task that I had previously set up called mute which kills media, notification, ringer, and system volumes.

I have Mute and Unmute set up as widgets on a homescreen that has a lot of technical stuff on it like Juiceplotter, Setcpu and the power widget.

Mute records the volume levels to custom variables then mutes the volumes and unmute resets them to the recorded values. I also created a %mute variable to use so I don't delete those recorded variables by setting mute twice and I have a popup for both functions to tell me they completed successfully.
 
so this isnt working for me. now sure how else to code it. any ideas?

I've done something similar but I just rely on the day of the week, time, and "wifi near" with my router SSID.

Profile: Weekday at Home
Day: Mon, Tue, Wed, Thu or Fri
Time: From 16:00 Till 07:00
State: Wifi Near
Enter: Home
Execute, Abort New Task
A0: Variable Set [ Name:%ATHOME To:TRUE Do Maths: Append: ]
A1: WiFi [ Set:On ]
A2: Silent Mode [ Mode:Off ]

Exit: Away
Execute, Abort New Task
A0: Variable Set [ Name:%ATHOME To:FALSE Do Maths: Append: ]
A1: WiFi [ Set:Off ]

My weekend profile is the same but just relies on the day.

I also set the Wifi Scan Seconds to 120 so it doesn't check quite as often as the default but still comes on in a reasonable amount of time.

this seems a bit overkill for turning on the wifi. You can do a cell site near Context option with the action to turn wifi on. Thats what I use and that way it uses less battery by not having the GPS and Wifi running all the time.

I think I am going to change mine to cell site. I don't like wifi near and the way I had it set up with a gps site worked but only if I manually got a gps fix. The only problem I see is that I live in a small city and if I am tooling around in it I don't think my wifi will turn off. Though maybe I could do cell near and then set a variable to turn on wifi near.
 
I still can't figure out the wifi turn off/turn on when at home profile. I think I've tried every location fix available haha...anyone have it working.

My goal is for wifi to turn on at home, and for 3g, bluetooth and gps to turn off. When I leave home I want wifi off, and 3g, bluetooth and gps on. Seems so simple, but just cant get it to work...and can't find anything online that would help me...
 
I still can't figure out the wifi turn off/turn on when at home profile. I think I've tried every location fix available haha...anyone have it working.

My goal is for wifi to turn on at home, and for 3g, bluetooth and gps to turn off. When I leave home I want wifi off, and 3g, bluetooth and gps on. Seems so simple, but just cant get it to work...and can't find anything online that would help me...

After I get mine setup tonight, if it works I will tell you how I did it. I am going to use Cell Near to set a variable %CellWifi to 1 and then when that state is enabled turn on Wifi Near with the toggle wifi enabled.

I already know how I am going to turn it off, when Wifi is not connected, disable wifi. This isn't a state thats held by tasker, it is only checked when Wifi disconnects.

As for the 3g, on my phone I lose my 3g icon when I connect to wifi unless I am using an app the requires 3g. My bluetooth and gps turn on with my dock.
 
I still can't figure out the wifi turn off/turn on when at home profile. I think I've tried every location fix available haha...anyone have it working.

My goal is for wifi to turn on at home, and for 3g, bluetooth and gps to turn off. When I leave home I want wifi off, and 3g, bluetooth and gps on. Seems so simple, but just cant get it to work...and can't find anything online that would help me...

After I get mine setup tonight, if it works I will tell you how I did it. I am going to use Cell Near to set a variable %CellWifi to 1 and then when that state is enabled turn on Wifi Near with the toggle wifi enabled.

I already know how I am going to turn it off, when Wifi is not connected, disable wifi. This isn't a state thats held by tasker, it is only checked when Wifi disconnects.

As for the 3g, on my phone I lose my 3g icon when I connect to wifi unless I am using an app the requires 3g. My bluetooth and gps turn on with my dock.

Ah makes sense, so I don't technically have to turn 3g off when wifi is connected? It automatically turns off until wifi is disconnected? Looking forward to your profile. I still would like to turn bluetooth and gps on/off when connected/not connected to wifi but I assume if your Cell Near method works that I just create tasks to do that. Never thought one little thing could be so difficult haha...
 
I've done something similar but I just rely on the day of the week, time, and "wifi near" with my router SSID.

Profile: Weekday at Home
Day: Mon, Tue, Wed, Thu or Fri
Time: From 16:00 Till 07:00
State: Wifi Near
Enter: Home
Execute, Abort New Task
A0: Variable Set [ Name:%ATHOME To:TRUE Do Maths: Append: ]
A1: WiFi [ Set:On ]
A2: Silent Mode [ Mode:Off ]

Exit: Away
Execute, Abort New Task
A0: Variable Set [ Name:%ATHOME To:FALSE Do Maths: Append: ]
A1: WiFi [ Set:Off ]

My weekend profile is the same but just relies on the day.

I also set the Wifi Scan Seconds to 120 so it doesn't check quite as often as the default but still comes on in a reasonable amount of time.

this seems a bit overkill for turning on the wifi. You can do a cell site near Context option with the action to turn wifi on. Thats what I use and that way it uses less battery by not having the GPS and Wifi running all the time.

I've done the cell tower approach in the past and that worked, but I was experimenting with some other ideas that required me to know when I was home to a much higher fidelity (20 meters as opposed to 1000 meters). Because I limit the checks to only those times I know I'll be home (I have a pretty regular schedule) it really doesn't use a noticeable amount of the battery. I don't use GPS location at all, just the wifi near. Since my other ideas didn't pan out, I may go back to the cell tower location approach eventually.
 
My current profiles

I currently have Task set up to fix a few annoyances (mainly I forget to change settings back like silent mode) but I'm finding new uses for it all the time:

1. When I dock the phone in the car, turn on bluetooth, turn off wifi, go to the car home, and give a verbal notification when done. I used to also have it bring up Navigation but my commute is not long enough to make that anything more then a distraction.

2. When I undock the phone in the car, if I'm at work (cell near to detect location) set it to Airplane Mode and give a verbal greeting, something like "Have a nice day at work.". If I'm somewhere else, turn off bluetooth and set the volumes back to normal (sometimes I set the phone to silent during the day and forget to set it back).

3. When I'm at home (wifi near), make sure the wifi stays enabled. To limit battery use, I limit this profile to just those times I know I will be home, though I may switch back to using cell near instead (see postings above).

4. When a call starts, turn off wifi (for some reason my cell signal goes to pot when I have wifi enabled), give a little vibrate notification (so I know the task executed) and set a screen lock. I and my wife experience the dreaded cheek dialing problem with the Droid 1 (i.e. the screen doesn't stay disabled during a call and we end up muting or hanging up on people with our cheeks). I'm going to modify this one though to only lock the screen if the phone is not docked or perhaps only if there isn't a bluetooth headset attached.

One thing I would love to be able to do with tasker (though I can't figure out how) is to have it skip the call log screen at the end of a call. I know I just made the call and I'd rather go back to what I was doing then default to the call log. For now I've installed No Call Log to do this.

The problem I have doing this with Tasker is determining when a call ends. There is no "end of call" state and the only phone based state is "Incoming Call" but I want this to work for all calls, not just incoming ones. I've experimented with setting variables but with little success.
 
Last edited:
Just installed tasker - media volume question

I'd like to set up a task where the media volume is muted whenever an app / game / video is played or started.

Is there a way to do this? I was thinking of setting a profile where:
media volume=0 at %applaunch
media volume=0 at media button play (if this will be met by streaming youtube, etc.)

I'm not sure the nomenclature though on how to accomplish. Can I get some guidance?
 
I'd like to set up a task where the media volume is muted whenever an app / game / video is played or started.

Is there a way to do this? I was thinking of setting a profile where:
media volume=0 at %applaunch
media volume=0 at media button play (if this will be met by streaming youtube, etc.)

I'm not sure the nomenclature though on how to accomplish. Can I get some guidance?

Press Task
New - Type a name (i.e. Media Mute)
press + - Audio - Media Volume -Level to 0
Done


One the main screen press New
Enter a name
Application - Choose the apps you want to have this affect (i.e. minisquadron) - Done
+ - Tasker - Perform Task - Long click under name and choose Media Mute
Done - Done
Apply

If you need more help let me know.
 
Okay here is the profiles I was talking about

Profile: Work SMS Loc
State: Cell Near
Enter: SMS FWD On
Execute, Abort New Task
A0: Variable Set [ Name:%SMSFWD To:1 Do Maths: Append: ]

Exit: SMS FWD Off
Execute, Abort New Task
A0: Variable Set [ Name:%SMSFWD To:0 Do Maths: Append: ]

Profile: Work SMS Send
Event: Received SMS
Enter: 16
Execute, Abort New Task
A0: Stop [ ]
A1: If [ ]
A2: Send SMS [ Number:731***1**7 Message: Store In Messaging App: ]

Profile: Work SMS Reply
Event: Received SMS
Enter: 18
Execute, Abort New Task
A0: Stop [ ]
A1: If [ ]
A2: Send SMS [ Number:%SMSNUM Message: Store In Messaging App: ]
A3: Variable Clear [ Name:%SMSNUM ]
A4: Stop [ ]
A5: End If [ ]
A6: Variable Set [ Name:%SMSNUM To:%SMSRB Do Maths: Append: ]
 
I think I have the Wifi on/off thing about 95% done (but of course the 5 remaining % is the most difficult haha)

I have it set up as follows:

Context: Wifi Connected to my home network
Task: Turn off Bluetooth
Turn off GPS
Turn off Mobile Data
Exit: Turn on Bluetooth
Turn on GPS
Turn on Mobile Data

What this seems to do is turn off Bluetooth, GPS and Data when connected to my home network. When I disconnect (or in my case, leave home), it turns everything back on.

The problem is I don't know how to make it turn Wifi off, and then periodically check if I'm back home. I tried setting Wifi Toggle as an exit task but it doesn't seem to ever turn wifi back on.

I tested it and it does in fact turn off Bluetooth, GPS and data when at home, and turn them back on when not at home, but it doesn't turn off Wifi and I don't know a way to accomplish this. Anyone? :)
 
Does this look right?

I made this pretty intense profile set [building from "Periodic Data Check (Juicedefender Replacement)" on the Tasker Wiki]. Not sure if I have everything set up right and would like to have someone more knowledgeable look it over before I activate it. Thanks in advance!!

Ok, the idea here is to turn off Data, Auto-Sync, and WiFi but turn Data and Auto-Sync, or Wifi (Preferred) on periodically (every 25 minutes) to get email, etc. It will also turn Data and Auto-Sync, or WiFi on if the screen is on, or the phone is charging.

Questions:
  • Are my Variables being Set, Cleared, and Used in the correct way and order?
  • Am I using the 'Wait' Task correctly?
  • Am I using the "If" statements properly?
  • Are the Priorities set correctly? Should I just make them all have the same priority? They need to work together simultaneously...
  • Actions are completed in order, not simultaneously right?
  • Does Tasker do WiFi scans if WiFi is off?
  • Will Tasker do a WiFi scan as soon as WiFi is turned on?
  • When a Time Context is set to Repeat every 25 minutes, does it enter for 25 minutes, then exit for 25 minutes? Or does it enter for a certain amount of time, exit, then enter again 25 minutes later? If its the latter, how long is it in the profile? And how could I specify that length of time (with a Wait Action?)?

Program:

Profile: Nighttime Data Off (Priority 8)
Context: Time 00:00-6:29
Context: Power State AC

Task:
A1: "WiFi" Set Off
A2: "Mobile Data" Set Off
A3: "Auto-Sync" Set Off


Profile: Home WiFi Near Check (Priority 8)
Context: Time 6:30-23:59
Context: Variable Value %WiFi_ON ~ ON
Context: WiFi Near (SSID is set)

Task:
A1: Variable Set %WiFi_NEAR to ON

Exit Task:
A1: Variable Clear %WiFi_NEAR


Profile: Campus WiFi Near Check (Priority 8)
Context: Time 6:30-23:59
Context: Variable Value %WiFi_ON ~ ON
Context: WiFi Near (SSID is set)

Task:
A1: Variable Set %WiFi_NEAR to ON

Exit Task:
A1: Variable Clear %WiFi_NEAR


Profile: Data Check (Priority 8)
Context: Time 6:30-23:59, repeat every 25 mins

Task:
A1: "Stop" if %SCREENSTATE ~ ON
A2: "Stop" if %POWER ~ ON
A3: "WiFi" Set On
A4: Variable Set %WiFi_ON to ON
A5: "Wait" for 30 seconds (to allow Tasker to perform a WiFi Scan.)
A6: "WiFi" Set Off, If %WiFi_NEAR !~ ON
A7: Variable Clear %WiFi_ON, If %WiFi_NEAR !~ ON
A8: "Mobile Data" Set On, If %WiFi_NEAR !~ ON
A9: "Auto-Sync" Set On, If %WiFi_NEAR !~ ON

Exit Task:
A1: "Stop" if %SCREENSTATE ~ ON
A2: "Stop" if %POWER ~ ON
A3: "WiFi" Set Off
A4: Variable Clear WiFi_ON
A5: "Mobile Data" Set Off
A6: "Auto-Sync" Set Off


Profile: Powered (Priority 6)
Context: Power State any

Task:
A1: Variable Set %POWER to ON
A2: "WiFi" Set On
A3: Variable Set %WiFi_ON to ON
A4: "Wait" for 30 seconds (to allow Tasker to perform a WiFi Scan)
A5: "WiFi" Set Off, If %WiFi_NEAR !~ ON
A6: Variable Clear %WiFi_ON, If %WiFi_NEAR !~ ON
A7: "Mobile Data" Set On, If %WiFi_NEAR !~ ON
A8: "Auto-Sync" Set On, If %WiFi_NEAR !~ ON

Exit Task:
A1: Variable Clear %POWER
A2: Stop if %SCREENSTATE ~ ON
A3: "WiFi" Set Off
A4: Variable Clear WiFi_ON
A5: "Mobile Data" Set Off
A6: "Auto-Sync" Set Off


Profile: Screen On (Priority 6)
Context: (Event) Screen On

Task:
A1: Variable Set %SCREENSTATE to ON
A2: "WiFi" Set On
A3: Variable Set %WiFi_ON to ON
A4: "Wait" for 30 seconds (to allow Tasker to perform a WiFi Scan. Is this long enough time? Tasker will run its first WiFi scan as soon as WiFi is turned on right? even though it is set to scan every 100 seconds?)
A5: "WiFi" Set Off, If %WiFi_NEAR !~ ON
A6: Variable Clear %WiFi_ON, If %WiFi_NEAR !~ ON
A7: "Mobile Data" Set On, If %WiFi_NEAR !~ ON
A8: "Auto-Sync" Set On, If %WiFi_NEAR !~ ON


Profile: Screen Off (Priority 6)
Context: (Event) Screen off
Context: Not Application (Browser, WiFi Tether)

Task:
A1: Variable Clear %SCREENSTATE
A2: Stop if %POWER ~ ON
A3: "WiFi" Set Off
A4: Variable Clear WiFi_ON
A5: "Mobile Data" Set Off
A6: "Auto-Sync" Set Off


I realize this is a fairly large program but any help would be greatly appreciated! Even if you could just answer the Questions I have bulleted out it would be a huge help.

THANKS!!
 
Last edited:
I made this pretty intense profile set [building from "Periodic Data Check (Juicedefender Replacement)" on the Tasker Wiki]. Not sure if I have everything set up right and would like to have someone more knowledgeable look it over before I activate it. Thanks in advance!!

Ok, the idea here is to turn off Data, Auto-Sync, and WiFi but turn Data and Auto-Sync, or Wifi (Preferred) on periodically (every 25 minutes) to get email, etc. It will also turn Data and Auto-Sync, or WiFi on if the screen is on, or the phone is charging.

You could just use the program" Juice Defender".
Bugt the options for turning data, auto sync& wifi are not
available with J.D. This program has a widget for the desktop
that allows you to toggle on/off different features.



Sent from my Simply Stunning 4.8 Droid 1 with BLAZING 1.25GHz speed using TapaTalkPro.
 
I made this pretty intense profile set [building from "Periodic Data Check (Juicedefender Replacement)" on the Tasker Wiki]. Not sure if I have everything set up right and would like to have someone more knowledgeable look it over before I activate it. Thanks in advance!!

Ok, the idea here is to turn off Data, Auto-Sync, and WiFi but turn Data and Auto-Sync, or Wifi (Preferred) on periodically (every 25 minutes) to get email, etc. It will also turn Data and Auto-Sync, or WiFi on if the screen is on, or the phone is charging.

You could just use the program" Juice Defender".
Bugt the options for turning data, auto sync& wifi are not
available with J.D. This program has a widget for the desktop
that allows you to toggle on/off different features.



Sent from my Simply Stunning 4.8 Droid 1 with BLAZING 1.25GHz speed using TapaTalkPro.



I have tried Juice Defender. It caused a TON of Lag and I felt like it used more battery than it saved. Thanks tho
 
Back
Top