May 18, 2022

The Blog of a Chronic Content Creator

Keep your Android Tablet Up To Date Daily With Increased Battery Life!

Recently I found that I had a problem with my Samsung Galaxy Tab (Although you might have the same problem with your Xoom, G-Slate, or any other Android / Droid device!). I would keep the WiFi radio turned off when I wasn’t using the device to save battery life (and since I didn’t have a data plan / cell connection, the battery life was amazing), however this meant that when I did connect back up, the initial sync took forever. Since Android has a bit of a problem doing anything else other than Synchronization, this meant that I had to wait a long time for pages to load, etc.. while using my Tab (at least for the first 10 minutes). I tried turning off auto-sync, however this meant that I never remembered to turn it back on while using the Tab, and missed important emails or messages since my hands were looking at a tablet, not my phone.

So to fix the problem, I wrote a few Tasker tasks and profiles that have been working quite well.

If you don’t know about Tasker, it’s pretty much the jack-of-all-Android-scripting-trades, and has some amazing functionality. My scripts aren’t too complicated, but you’ll see they all work in concert to accomplish the following goals:

1. Keep a semi-up-to-date gmail/calendar/contacts on my Tab, so that synchronizations every 2-3 days didn’t take forever.

2. Save battery life by doing things that I sometimes forgot to do (Namely turn off Wifi when I was done using the tablet)

3. Save me the trouble of turning WiFi on when I unlocked my tablet.

Step 3 was the easiest to accomplish: I simply set up a task to turn WiFi on, and a profile to run that task after the device was unlocked. Simple and effective.

Step 2 took a bit more effort. I wanted to have my Tab turn it’s WiFi off after itself, but didn’t want to wait for it to completely power back on if I put down the tablet, then a moment later realized I needed to look up one last thing. So I wrote a delayed WiFi turn-off task:

I then set this task to run after power-off. If you turn the device off then turn it back on, you can usually pull 1 or 2 pages before it turns the WiFi off, and by then if you’re going to browse for longer you can simply turn the WiFi back on again. You can also customize this with a longer time-out, say perhaps 5 minutes.

Finally, the last step was to build the nighly Sync task. This task waits until a certain time at night, turns on Wifi and just waits for a bit. The Tab automatically syncs up in that time. The script then turns off Sync and goes back to bed. Running this each night and using my tab regularly, I can usually get about a full week off of one charge. Fine by me. Here’s what it looks like:

Putting it altogether and you have a Tab that’s smart enough to turn on Wifi for you, smart enough to turn it off, and smart enough to keep an up-to-date copy of your info so that when you use it, you don’t spend hours waiting for a sync to finish! I’ve exported my scripts – if you want them, here’s the link!