Android Power Management: AutoSync & Account Optimization
In my last article I discussed how sometimes using a slower network technology was potentially bad for battery life during active use. Today, I'm going to write about how to best optimize AutoSync and Notifications on our device and how switching to the slow 2G network can save battery life…
First, let's go over how Google Android is organized when it comes to accounts (in Settings) and notifications (the drop down notification area). In an ideal world, all accounts will be controlled by the single AutoSync toggle, but unfortunately some applications will do their own thing and ignore the master AutoSync switch. There isn't much that we can do about this other than email the developers to ask that they change how their app works.
There are two ways our devices keep up to date with our accounts: push and poll. Push means that a message is automatically sent to the device, polling means the device regularly checks for messages. Many applications use push notifications thanks to Google writing the Google Cloud Messaging system, or GCM. This means that developers haven't had to reinvent the wheel for every application and as it's a standard, it works on anything running Android 2.2 or later, connected to the Internet. Another popular push service uses Microsoft (Exchange) Active Sync, typically used with a corporate email account.
A push service should reduce battery consumption because the Android device does not need to do very much in order to receive notifications other than maintain an Internet connection. It is the server that does the heavy lifting. The app does not need to be running on the device because notifications are handled by the operating system. By comparison, when polling, the Android device does all of the work. It must connect to the service, sign in, check and download new messages, then disconnect; the application is usually woken up to do this. This is why regular polling drains the battery.
Most of the time, the biggest impact on battery life when using a push notification service is the device maintaining a connection to the Internet. If you are using a cell ‘phone and you have a weak signal, your device will work hard to maintain that connection to the Internet and this is bad for battery life. Since you don't need a high speed connection for a push service, switching to a 2G mobile network and disabling 3G and LTE should reduce power consumption, but consider enabling the quicker networks when you use the device.
Not all Android apps can use a push service; older handsets and tablets may not have adopted the service for their email application; if you have a choice of application, I recommend switching to one that supports push notifications. If you can't do this, set a less frequent regular poll. The golden rule is to synchronize your data as infrequently as you can tolerate; anything less than fifteen minutes tends to be hard on the battery.
Putting it Together
Most client handsets that I work on have a collection of accounts that connect using both push and poll modes. If the client is complaining of poor battery life, a look through the Android power management screen will help. If I see an email or social networking application high up in the list of power users, it's a fair bet that one or more of their accounts is taking a lot of time to log in, synchronize and disconnect. Here, lengthening the time between regular polls should help. If instead I see a high Mobile Standby or Android System, this is a sign that the device is working hard to maintain a connection to the Internet. If Android System is very high, I may try switching one or more accounts to a regular poll if I'm able to. Depending on how patient the user, installing GreenPower and setting the Sync Option is a good one stop shop and avoids the need to experiment with the device.
I do not believe that having many accounts on a device is a guarantee of poor battery life, it simply needs to be carefully managed.