

Alarm clock and calendar apps depend on the AlarmManager API for their core functionality, for example. When the system invokes the alarm at the set time, apps can basically do whatever work they want. Instead, apps are encouraged to use Android’s AlarmManager API, which lets apps schedule “alarms” that run at set times. Apps can’t tell the system exactly when to execute its work through WorkManager, because it wasn’t designed for that purpose. Sometimes, though, apps can’t rely on WorkManager to perform work, because the work that needs to be done has to be done at a very specific point in time. Knowing how and when to schedule background work is important for app developers to understand because most Android devices run on battery power. Work that’s scheduled this way will execute at some point in the future, the timing of which is determined by the information sent to the JobScheduler service when scheduling the work as well as device signals like the charging or network state. Google recommends using the WorkManager API to do most work in the background, which internally uses the system JobScheduler service to schedule tasks. while the app isn’t visible to the user) have a few options on Android. Background work and alarmsĪpps that want to perform work in the background (i.e. For example, Android 13 places new restrictions on which apps can schedule exact alarms, a change that is designed to improve battery life but may break functionality in apps that are unprepared.

Android 13 adds a number of app-facing behavioral changes and APIs that tweak how apps can do work in the background, but not all of these changes were mentioned by Google at I/O earlier this month.
