Every year, without fail, both Apple and Google declare that the latest version of their operating system contains additional improvements that will save battery life and improve performance. In reality, these gains tend to be application or task-specific, which is to say that some users, in some cases, can see improved battery life. With Android Oreo, however, Google is making a concerted effort to crack down on developer practices that dramatically reduce performance and whack battery life even in standby mode.
We discussed some of these changes several months ago, but now that Oreo is in the wild we know more about how they’ll work. Going forward, the types of applications that are allowed to run in the background will be restricted. Apps will no longer be able to constantly ping location data or to start new services while in the background. Audio playback and presumably turn-by-turn navigation are exceptions to these policies — Android can still play music or give directions while you’re using your phone for other tasks. SMS messages are also still delivered immediately, even if running as a background service. Apps can still remain active in the background if necessary (SMS messaging, music), but will have to display a notification that they are running to do so.
Instead of simply relying on background service calls, app developers are encouraged to use Android’s job scheduler, which can group multiple jobs for simultaneous execution to improve overall performance and theoretically use less battery. Google has also changed how it handles implicit broadcasts; we covered this topic in some detail earlier this year. Applications will no longer be able to use wakelocks (a lock that keeps the phone awake and doing work) to keep a phone awake indefinitely. Once your process moves to the background, wakelocks will be released, allowing the phone to idle properly.
Why Google is Cleaning House
The following graph (released during Google I/O earlier this year) shows why Google is cracking down on background applications. The left-hand graph shows how long a device can last on battery with the screen off. As more apps are installed, overall battery life drops. By the 4-8 month mark the device has lost 8%percent of its battery. Meanwhile, the ratio of 700ms frames out of every thousand frames has jumped from 2.17 to 3.48.
This might not seem like a big deal. But human beings are sensitive to lag and the sudden jerks and starts that can plague a phone UI. In the grand scheme of things, 3-4 frames out of every thousand seems like a small error rate, but those 3-4 slow frames can dominate how people perceive UI performance. Google wants to crack down on this problem and push developers to use system resources more intelligently.
Keep in mind, however, that these gains and restrictions are being enforced on developers that target Oreo. If an application is meant for other versions of Android, the same restrictions aren’t in play. That’s significant because of how long it takes Android to roll out on new devices. Google may have launched Oreo already, but you won’t see it on shipping devices for months. That’s a problem Android has been dealing with for years, however, and not something new with Oreo.
Once the OS does gain a foothold, end users should be able to look forward to at least modestly improved performance and battery life in some areas — provided, of course, that your carrier offers an update to the OS. More details on background execution and implicit broadcast changes are available in this Medium post.
Now read: 25 Best Android Tips to Make Your Phone More Useful