Categories
Uncategorized

Revised “Juice Defender”-like Tasker profiles

A couple of months ago, I posted up My “Juice Defender” Tasker Profiles. I've had a while to play around with different versions of those profiles, and this is what I've finally settled on. (I'm going with Tasker shorthand here and just showing you the final product—if you need handholding on how in general to build a profile, see the prior blog post, which walks you through step by step.)


Under Variables, you'll need to create two variables. I called them %DATA and %SCREENOFFTEST.


Under Profiles, create a profile called Screen Off Data Off. The triggers are the event Display Off and the state Not Power Any. Then create a Task called Screen Off Data Off.


You can see what I built here. The basic gist of it in plain English is that it turns on a temporary test to see if the screen stays off. Then it waits 15 minutes. If the test is still on, it turns the data off, turns auto-sync off, and then cancels the test.


Tapping the wrench in the bottom-right corner brings up the Task Properties. Set the Collision Handling to Abort Existing Task. This means if you turn the screen off and then turn it on again and turn it off again within 15 minutes, the first instance of this task will be aborted in favor of the most recent time you turned the screen off.


The next Profile is called Screen On Data On. The triggers are an event of Display Unlocked and a state of Not Airplane Mode. Then you'll also create a Task called Screen On Data On.


For this profile, you can see the end product again. The gist is: if you wake up the screen, that test from earlier should be off. And then if data is off, you turn it back on again.

I made the timeout 15 minutes so that the data isn't constantly turning off and on again, but I still get the battery life savings. I also turned off auto-sync for good measure. It doesn't really need to be off, though. If data is off, Android won't look to auto-sync. Lastly, I made the trigger for screen on data on to be unlocking instead of just turning the display on. That's because on my phone (the Galaxy Nexus) it can be sometimes easy to accidentally jostle the power button, so I don't want to turn on data until I unlock the phone, which means I'm actually using it for something data-related. The data reconnects fairly quickly on the Galaxy Nexus (on my old phone—the MyTouch 4G—the reconnection time was much longer).

I hope you found this helpful!

Categories
Uncategorized

My “Juice Defender” Tasker Profiles

In response to My Favorite Android App: Tasker, one reader asked how I set up my battery conserving profiles. These are totally a work in progress (and if someone has suggestions for how to streamline them, I'm open to hearing people's thoughts).

Terminology


These are not official names for the icons. These are just what I'm calling them.


This is what I'm calling check.


This is what I'm calling X.


This is what I'm calling plus.


This is what I'm calling bolt.


And this is what I'm calling tag.

I'd also like to throw in a disclaimer here that I am not trying to replicate the exact behavior of Juice Defender. I just found with JD that the bulk of the savings was in turning off data when the screen is off, so this is a modification of that.

User-defined global variables

I'm not a programmer, but I do understand some basics of how to use variables, and I think the way I use these I actually had to define them. (You can find on the Tasker website a list of variables Tasker comes with—that is, ones you don't have to define yourself.)

  • Click tag to bring up the Global Variable Editor.
  • Click plus and define a new variable as %DATA.
  • When prompted for a Variable Value, input on if your mobile data is on and off if your mobile data is off.
  • Click check to confirm.
  • Click plus again define another new variable as %POWER.
  • For the Variable Value, input on if your phone is plugged into a power source (either AC or USB) and off if your phone isn't plugged in.

Data on when screen is on

  • Click plus to add a New Profile Name. You can call it whatever you want. I called mine Screen On Data On.
  • When prompted for First Context, select Event.
  • Select Display.
  • Select Display On.
  • For Task Selection, select New Task.
  • For New Task, you can call it whatever you want. I uncreatively called it Screen On Data On.
  • Under Task Edit, you'll see a blue plus above the check. Click that blue plus.
  • Select Task and then If.
  • Click tag.
  • Under Variable Select, select %DATA and after the tilda, type in off. Then click check.
  • Click blue plus and click Variable and Variable Set. Set %DATA to on.
  • Blue plus and then Net, Mobile Data, On.
  • Blue plus, Net, Auto-Sync, On.
  • Blue plus, Task, End If.
  • Click check.

Power Variable

Since there's no built-in variable for whether power is connected or not, we've had to create one. So let's make it work.
  • Green plus.
  • Name Power Variable.
  • For First Context, State, Power, Power, source Any.
  • Under Task Selection, New Task called Power Variable On.
  • Task, If %POWER off.
  • Variable set %POWER to on.
  • Task, End If.
  • Tap Power Variable On and then for Task Options, select Add Exit Task.
  • Call it Power Variable Off.
  • Task If %POWER on.
  • Variable Set %POWER to off.
  • Task, End If.

Data off when screen is off

  • Green plus.
  • Name Screen Off Data Off.
  • For First Context, Time.
  • Check Repeat and set it for every 5 Minute(s).
  • Check.
  • Under Task Selection, New Task and then call it Screen Off Data Off.
  • Blue plus, Task, If, %POWER, off.
  • If %SCREEN off.
  • If %DATA on.
  • Auto-Sync Off.
  • Variable Set %DATA off.
  • Mobile Data set Off.
  • Task and End If.
  • Another End If.
  • Another End If.

English translation

Basically what this does is say if you turn the display on, check to see if data is off. If it's off, turn it on, and then turn on auto-sync. And then every five minutes, check to see if the phone is plugged in and if the display is off and the data is on. If it's on, turn off auto-sync, and then turn off data. That's it!
Categories
Uncategorized

Android Battery Saving Tips

Don’t run a “task killer” app
A lot of people think a task killer or app killer app will save you battery life. In fact, you’ll find it regularly in the top 20 for top free apps in the Android Market. When I bought my first Android phone in 2009, the T-Mobile salesperson recommended I install it. And I’ve heard of cases in which salespeople will actually install a task killer app while you’re at the store. Let me be clear about this: task killers will not save you battery life. If they do, all it means that you have a bad app installed that, instead of being killed constantly, should be uninstalled. At best, task killers will do nothing for your phone. At worst, they will cause instability and glitches. For more details, read the following:
Android Task Killers Explained: What They Do and Why You Shouldn’t Use Them
FAQ: Why You Shouldn’t Be Using a Task Killer with Android
Why you don’t need a task killer app with Android.

Don’t bother with all the little things
So after I did quite a bit of research and found out task killers are not only useless but actually detrimental to the proper functioning of your Android phone, I read all sorts of tips espousing little things you can do to save battery: dim the screen brightness, turn off GPS, switch to Edge only (not 3G), turn off automatic syncing. Most of these things all help a little bit but not really enough to make it worth the trouble. And, in the case of GPS, sometimes they don’t help at all. GPS, for example, isn’t really on even if it’s “on” unless you’re using an app that actively uses GPS (e.g., Google Maps, Google Navigation, Yelp). If I constantly dimmed the screen and then made it brighter when I needed it and turned off syncing and synced only when I needed it, I could eke out maybe an extra hour or hour and a half of battery life. It seemed a lot of maintenance for very little return.

Use Juice Defender
It took me a year and a half of using Android before I stumbled upon and finally tried Juice Defender. This app easily doubled my battery life. I used to have my phone run from 7:30 AM to 11:30 PM at night but with only 15-20% of my battery left when I plugged it back into the charger at night. With Juice Defender, I had 50-60% of my battery left at night. There are a lot of things Juice Defender can do if you get the paid versions, which allow you to tweak settings even further, but on a basic level with the free version it turns off your data when your screen is off and then turns it back on again when your screen is on.

Even though I would highly recommend JD to anyone with an Android phone who also wants to get the most out of her battery life, there are a couple of annoying things with the program. Firstly, it insists on having a huge icon in the notification bar all the time. Well, there’s a setting to not keep it there, but apparently if you don’t keep it in the notification bar the Android OS might accidentally turn off Juice Defender to free up RAM. Secondly, it takes a few seconds for data to turn back on after your screen is on. This last little niggle led to me uninstalling Juice Defender and opting for another alternative.

Or just turn off data when you don’t need it
You kind of have to think about your own phone-using lifestyle to see what will make more sense to you—turning data off every time your screen is off (Juice Defender) or just manually turning off data when you don’t need it. For my lifestyle, it makes a lot more sense for me to turn data off manually. I’m grateful for the work the Juice Defender folks are doing in showing me how to save battery life, but the extra few seconds to wait for data to turn back on were just too much for me, the way I use my Android phone.

I basically have some periods in which I’m using my phone pretty heavily (but only in short spurts) for data and then longer periods when I’m not using my phone for data at all. So I have a power widget on my home screen for toggling data. When I’m about to use data, I turn it on. When I know I won’t be using data for a long period of time (2-3 hours or more), I turn it off.

I hope people have found these tips helpful. Post if you have any questions. (Any attempts to promote task killers will be immediately deleted as spam.)