Battery life is the most precious thing when it comes to our beloved smartphones. As apps gets more evolved, especially when it comes to grabbing your location, it feels like we have to charge our phones at least twice a day.
The Android team wants to help its developers out with that, and has published a “class” on how to make some small tweaks in order to save us all from battery hell:
Did you know that if your app pings your server every 30 seconds, it can effectively keep the wireless radio of the host device on permanently? Or that downloading thumbnails on demand as you scroll through a list of news headlines uses significantly more battery than prefetching all of them upfront?
If not, you need to check out this new Android Training class.
It explains how the power-use profile of the wireless radio can affect your choices on when, what, and how to transfer data in order to minimize impact on battery life, and demonstrates some best practices to minimize the battery drain associated with downloads and network connections.
Among the items discussed in the resources for Android developers on this subject, the team explains how to perform simple tasks without having to use a lot of battery power, especially when you’re not on an amazing connection. If an app is trying to download thumbnails for news stories and you only have a few bars, the download could take quite a long time.
By making developers aware of the pitfalls of battery drainage, the Android team hopes to create an ecosystem that collectively takes the pain away from the end user, who is the one who has to be mindful of how much juice they have left.
One of the other things known to be a battery drain is ads, which is something that advertising networks absolutely have to do something about. This is a problem for both iOS and Android devices, specifically when it comes to free ad-supported apps.