Google is committed to advancing racial equity for Black communities. See how.

Android 10 (API level 29) and higher place restrictions on when apps can start activities when the app is running in the background. These restrictions help minimize interruptions for the user and keep the user more in control of what's shown on their screen.

Note: For the purposes of starting activities, an app running a foreground service is still considered to be "in the background".

This guide presents notifications as an alternative for starting activities from the background. Then, this guide lists the specific cases where the restriction doesn't apply.

Display notifications instead

In nearly all cases, apps that are in the background should display time-sensitive notifications to provide urgent information to the user instead of directly starting an activity. Examples of when to use such notifications include handling an incoming phone call or an active alarm clock.

This notification-based alert and reminder system provides several advantages for users:

When using the device, the user is shown a heads-up notification that allows them to respond. The user maintains their current context and has control over the content that they see on the screen.

Time-sensitive notifications respect the user's Do Not Disturb rules. For example, users might permit calls only from specific contacts, or repeat callers, when Do Not Disturb is enabled.

When the device's screen is off, your full-screen intent is launched immediately.

In the device's Settings screen, the user can see which apps have recently sent notifications, including from specific notification channels. From this screen, the user can control their notification preferences.

Exceptions to the restriction

Apps running on Android 10 or higher can start activities only when one or more of the following conditions are met: