Tasker: CDMA Data checker

Bwangster12

Well-known member
Sep 20, 2010
250
12
0
Visit site
So, I am running the latest version of Tasker on my HTC Thunderbolt on Verizon. To this point I've actually picked up Tasker rather quickly, setting up profiles for silenting during meetings, quiet at night, silent when flipped over, turning on and off wifi by cell tower... but now I want to try and mirror what Juicedefender does.

I created a profile to turn off Mobile Data when display goes off and a profile to turn on Mobile Data when the display comes on. For the life of me, I can't get something to work so that every 15 minutes, when the display is off, have it enable Mobile Data for like a minute, do a sync, and then turn off again. Then recheck every 15 minutes.

I've tried a number of variations and even revising profiles I've found online, as known seem to be geared towards CDMA. I feel like I've gotten it to check for data when screen is off, but doesn't do it consistently. Right now I have:

From 06:30 every 15m til 23:00
If %WIFI ~ off
If %SCREENSTATE ~ off
Mobile Data Set On
Auto-Sync Set On
Wait 1 minute
Mobile Data Set off
Auto-Sync Set off

Now, believe me that I've tried a few different variations. I'm not comfortable with these variables, so I initially tried doing them as contexts, but that didn't seem to work.
 

UncleMike

Well-known member
Nov 8, 2009
205
1
0
Visit site
I would try something like this:

Context: Variable Value %SCREEN ~ off
Context: Variable Value %WIFI ~ off
Context: Time 06:30 every 15m til 23:00
Enter Task:
Mobile Data On
Auto-Sync On
Exit Task:
If %SCREEN ~ off
Mobile Data Off
Auto-Sync Off
End If

The profile will only activate if the screen and Wifi are both off. In the odd case that you turn the display on during the 1 minute, Mobile Data and Auto-Sync will not be turned off if the screen is on when the profile exits.

Note that a repeating profile like this is active for 1 minute, so you don't need a delay, just an exit task.

Also, ideally a profile like this would start a 15 minute timer when the display turns off, but this doesn't do that.
 

Bwangster12

Well-known member
Sep 20, 2010
250
12
0
Visit site
So, it looks like I can't add an EXIT TASK when I use the Time context.

I added Wifi Connected State as Invert, Variable Value as %SCREEN matches OFF, and then the TIME context screws me up.
 
Last edited:

Bwangster12

Well-known member
Sep 20, 2010
250
12
0
Visit site
Since I can't add an EXIT TASK when using an Event context, am I better off doing something like this...

Context: Not Wifi Connected
Context: Display Off
Task (All under one): Auto Sync Off, Mobile Data Off, Wait 15 mins, Auto Sync On, Mobile Data On

Only problem is... how do I get this to repeat ever 15 minutes? I can't logically do this all day long. Also, where would I incorporate the STOP if I turn on the screen.

I am definitely making this more complicated then need be, but I don't know how to correctly do it.
 

UncleMike

Well-known member
Nov 8, 2009
205
1
0
Visit site
Oops! In earlier version of Tasker you could have an exit task with a repeating time-based profile. I forgot this was no longer possible. With the above task, you could do something like this:

[0] Auto-Sync Off
[1] Mobile Data Off
[2] Wait 14 minutes
[3] Auto-Sync On
[4] Mobile Data On
[5] Wait 1 minute
[6] Goto 0 if %SCREEN ~ off

You would want to set the collision handling to kill existing task - that way the timer starts over at zero when you turn the screen off. The task will end if the screen is on when it gets to step 6.
 

Trending Posts

Forum statistics

Threads
943,008
Messages
6,916,876
Members
3,158,772
Latest member
Laila Nance