Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,778,176 Members 51,469 Now Online
XDA Developers Android and Mobile Development Forum

Step-by-Step: Maximize battery by toggling Sync with Tasker

Tip us?
 
rwb2073
Old
(Last edited by rwb2073; 16th June 2012 at 04:16 PM.)
#1  
Senior Member - OP
Thanks Meter 48
Posts: 144
Join Date: Sep 2009
Default Step-by-Step: Maximize battery by toggling Sync with Tasker

Someone was asking how to do this over in the Speed Rom thread...

Setting up Tasker to toggle Sync On / Off during the work day is a good way to prolong battery life. I already have Tasker doing other stuff for me, so this uses few additional resources.

This is a quick and dirty setup, but it works and it's dead simple - perfect for someone who's never used Tasker before. I'm sure someone here could come up with a more elegant solution, so please feel free to get fancy...

First we're gonna setup 3 Tasks ("tasks" are the bits that actually do the work).
AutoSync On, AutoSync Off, and AutoSync 5 minutes.

Those Tasks will be used by 2 Profiles (the "profiles" tell those tasks when to run).
AutoSync Home (Sync ON in the evening, then OFF in the morning), AutoSync Work (Intermittent Sync 3x from 8:00a-5:00p).

Anyway, launch Tasker then tap Tasks. Hit the + key.
When prompted, enter the name for the first one...
"AutoSync On", then... > check > + > Net > AutoSync > (Set) On > check > check. You're done.

Do the same thing again for AutoSync Off, with the obvious differences.
+ > "AutoSync Off" > check > + > Net > AutoSync > (Set) Off > check > check. Done.

AutoSync 5m will turn AutoSync On... for 5 minutes... then off. 3 steps.
+ > AutoSync 5m > check > + > Net > AutoSync > (Set) On > check
(now you'll add a second & third action to this same task)
+ > Task > Wait > + (minutes + 5x to read 5 minutes) > check
+ > Net > AutoSync > (Set) Off > check
You can see here what the Task will do in 3 steps. Tap "check" and you're done with the 3 Tasks.

Those are going to be ran from the two Time Based Profiles called "AutoSync Home" and "AutoSync Work".
Profiles > + > "AutoSync Home" > check > Time
I've set the times from 17:00 (5pm) to 8:00 (set it to whatever you want / it can be adjusted later, but the evening is first)
> check > Select the "AutoSync On" Task that you made
Press and hold "AutoSync On" > Add Exit Task < "AutoSync Off"

That'll automatically turn on AutoSync at 5:00pm, and turn it off again at 8:00am. Make sure the Profile is checked (to the right of the name) to make it active.

AutoSync Work.
Same as above, but the From time is 10:00 > Repeat every 2 hours > To 14:00.
Select the AutoSync 5m Task. No exit task.

That'll turn AutoSync on for 5 minutes during the day at 10:00am, 12 noon and 2:00pm. Again, check the Profile to make it active.

Tap Check to Save and Minimize. If you run a task killer, you'll want to make Tasker exempt. Also, when you get everything working the way you want, backup your work (Menu > Data > Backup).

Tasker can do much much more. This is the tip of the iceburg. Check out the Tasker Site and the Tasker Wiki.

I'm not affiliated. I just like the program. Really. It's the most powerful program I've found for Android. When someone shows you a cool app they have on their phone (or 5), you can say "Tasker can do that (all that)"

Once you get Tasker doing things for you, take your Amaze to the next level - get some NFC Tags and NFC Task Launcher which has, you guessed it, Tasker intergration! Once setup, you'll never have to touch the phone again... it'll just automagically do your bidding. <insert evil laugh>
Device: Nexus 4 (mako) | OS: Jelly Bean (stock) Rooted + Apex | Recovery: CWMT

Device: Nexus 7 (nakasi) | OS: Jelly Bean (stock) Rooted + Apex | Recovery: CWMT
The Following 13 Users Say Thank You to rwb2073 For This Useful Post: [ Click to Expand ]
 
fcpelayo
Old
#2  
Senior Member
Thanks Meter 139
Posts: 905
Join Date: Nov 2011
Location: Chino
Haha I think it was me! This is great as others can post their own profiles like turn on WiFi or GPS or Bluetooth or automatic vibrate or silent mode when certain times or locations are reached! The possibilities are endless. Having an automated phone awesome!

Sent from my HTC_Amaze_4G using xda premium
 
ddloco
Old
#3  
ddloco's Avatar
Senior Member
Thanks Meter 120
Posts: 489
Join Date: Jun 2010
Location: Rialto,Ca
Here's an idea create the task then zip them so people who can't figure it out can just restore the task to there phone don't get me wrong I can do it but some people may have a hard time lol

Sent from my HTC_Amaze_4G using Xparent Blue Tapatalk 2
 
rwb2073
Old
#4  
Senior Member - OP
Thanks Meter 48
Posts: 144
Join Date: Sep 2009
Give a man a fish...

Sent from my HTC_Amaze_4G using Tapatalk 2
Device: Nexus 4 (mako) | OS: Jelly Bean (stock) Rooted + Apex | Recovery: CWMT

Device: Nexus 7 (nakasi) | OS: Jelly Bean (stock) Rooted + Apex | Recovery: CWMT
The Following 2 Users Say Thank You to rwb2073 For This Useful Post: [ Click to Expand ]
 
Jay_Rulen
Old
#5  
Jay_Rulen's Avatar
Senior Member
Thanks Meter 192
Posts: 651
Join Date: Feb 2012
Location: Philly , USA
Quote:
Originally Posted by rwb2073 View Post
Give a man a fish...

Sent from my HTC_Amaze_4G using Tapatalk 2

"Give a man a fish and he won't starve for a day. Teach a man how to fish and he won't starve for his entire life."

Party ٩(-̮̮̃-̃)۶ at my __̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡

Was This Helpful
? Show Some RESPECT & Hit THANKS

NRGZ28 PIMPED MY PHONE ٩(-̮̮̃-̃)۶

Google+ Users Add Me >> Yesmrgomes@Gmail.Com <<
PS3 ID >>> Y2Ne1 <<<

Facebook ((( https://www.facebook.com/bangali.rapper )))
Youtube >>> JayRulen <<<
The Following 3 Users Say Thank You to Jay_Rulen For This Useful Post: [ Click to Expand ]
 
fcpelayo
Old
(Last edited by fcpelayo; 27th July 2012 at 02:23 AM.)
#6  
Senior Member
Thanks Meter 139
Posts: 905
Join Date: Nov 2011
Location: Chino
rwb2073 or anyone else. I have tasker turn off my mobile data every time that screen goes off. But I also stream ESPN and Pandora. So I said tasker Pandora is running enable mobile data. But is not working. How can I make tasker enable data while screen off only when those apps are running


My other question is turning off and on mobile data as screen goes on and off bad? Drain battery? I don't think it drains for me bc ill go a good 3 hrs without turning screen on and data is off saving me tons of battery.


Sent from my HTC_Amaze_4G using xda premium
 
jusuchin85
Old
#7  
jusuchin85's Avatar
Member
Thanks Meter 45
Posts: 93
Join Date: Jan 2011
Location: Mantin
This has been a great tutorial, @rwb2073.

I'll be trying this tonight, with just some minor tweaks to the AutoSync 5m task:
  • Wifi ON
  • AutoSync ON
  • Wait for 15m
  • AutoSync OFF
  • Wifi OFF

This is so that I can switch off my wifi when not in use, since I don't stream at night.


Visit my blog for all things tech: Coding For Me

Phone: Samsung GT-N7100 Galaxy Note 2
ROM Version: [4.4.3] Paranoid Android 4.4 RC2
Kernel Version: AGNi Kernel 2.8.3
Baseband Version: N7100XXUFND3
Recovery: PhilZ Touch 6.26.6

Phone: Samsung GT-I9100 Galaxy SII
ROM Version: [4.1.2] Chameleon v3.0.4
Kernel Version: 3.0.64-CM-g3d8b293 Stock
Baseband Version: I9100XXLPH
Recovery: PhilZ 5.15.9
The Following User Says Thank You to jusuchin85 For This Useful Post: [ Click to Expand ]
 
ecocar
Old
#8  
Junior Member
Thanks Meter 0
Posts: 7
Join Date: Dec 2010
Location: Italy
IS "AutoSync 5m will turn AutoSync On... for 5 minutes... then off. 3 steps. " A CYCLE ?
I mean, when it finishs it starts again ?
 
rwb2073
Old
#9  
Senior Member - OP
Thanks Meter 48
Posts: 144
Join Date: Sep 2009
No. It runs just once, but at each specified time of course.

Sent from my Nexus 4 using Tapatalk 2
Device: Nexus 4 (mako) | OS: Jelly Bean (stock) Rooted + Apex | Recovery: CWMT

Device: Nexus 7 (nakasi) | OS: Jelly Bean (stock) Rooted + Apex | Recovery: CWMT
 
ekaj98x
Old
#10  
Junior Member
Thanks Meter 0
Posts: 15
Join Date: Oct 2011
This saved me extreme amounts of battery, thank you!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes