Android's long had problems managing apps running in the background. While Google offers guidelines about how devices running Android should handle background processes, manufacturers still take it upon themselves to tweak Android's systems in the name of battery efficiency, often breaking intended app behavior in the process. At Google I/O last week, Google made it clear it's still working on it, highlighting ongoing efforts to tackle the issue from multiple angles.

In a talk about background work best practices, Android Frameworks Software Engineer Jing Ji touched on the difficulties Google has faced in corralling manufacturers who want to optimize battery life in ways Android wasn't built to work around. "To accomplish this," Ji said, "we've seen device manufacturers introduce various app restrictions, and they are often undocumented. This can make it difficult for app developers whose foreground service, for example, could work as expected on one manufacturer's device but be killed unexpectedly on another."

He explains that Google's been working directly with manufacturers to foster consistency in background app restrictions and trying to build standardized, system-level battery-management features into Android that will make further optimization by OEMs unnecessary. Android 13 is going to have several tweaks to that end: it'll add the capability to track per-app battery consumption with more granularity, letting users see how much juice a given app is using when it's in the foreground, in the background, or running a foreground service (it'll even let you know when an app is wasting your battery in the background).

The JobScheduler API, meant to help, er, schedule jobs efficiently, is getting upgrades in Android 13 that Google says should help it schedule jobs to run when it is most helpful to the user. For example, the system will estimate when you're likely to open a given app to more efficiently schedule that app's prefetch jobs — things it should ideally do in the background, just before it's launched. JobScheduler is also getting better at knowing which jobs to stop when system resources are low or when the device starts to heat up, theoretically choosing those that'll impact user experience least.

At the same time, Google stresses that developers need to be building apps as efficiently as possible — to do their part by balancing their own apps' performance with overall system health.

Google's approach to solving Android's background apps has historically been pretty hands-off; while the company could impose stricter rules on third-party device manufacturers under penalty of losing GMS certification, it hasn't done so yet. It's not clear this latest wave of updated guidance and features will make an appreciable difference — but Google's continued acknowledgment of the strain the situation is putting on developers can only be a good sign. With any luck, Android's newest updates to resource management highlighted at I/O will help Google convince OEMs their background-task meddling isn't needed.