Android 13 will send a notification reminder if an app has consumed too much battery in the past 24 hours

In Android 13 Developer Preview 2, released today, a new system notification has been introduced. Appears when your app has consumed a significant amount of your device’s battery in the past 24 hours. This new notification will appear in all apps running on Android 13 devices, regardless of the target SDK version.

When measuring your app’s impact on device battery life, the system takes into account the work your app is doing in several different places, including the following.

join us on telegram

  • Foreground services, even those with visible notifications
  • Work tasks, including accelerated work
  • Broadcast receiver
  • Background service
  • Your application’s cache

If your app shows this notification, it won’t reappear on the same device until at least 24 hours later. If the system detects that your app is running a foreground service for a long time — at least 20 hours in a 24-hour window — it sends the user a notification inviting them to interact with the foreground service (FGS) task manager.

This might all be a bit technical, but an oversimplified explanation is that Android 13 now monitors more and more aspects of an app’s background behavior. Not only that but also some front-end elements such as front-end services. These are services that perform actions that need to be noticed by the user and have a notification associated with them that cannot be dismissed until the service is stopped or removed from the foreground.

Examples of this type of behavior are a fitness tracking app because they are “exercising” and actively collecting data; or a multimedia player that plays with a foreground service and may display things like the current song and multimedia controls in a notification.

Leave a Comment