Skip to content

Most visited

Recently visited

navigation

Android O Behavior Changes

Along with new features and capabilities, Android O includes a variety of system and API behavior changes. This document highlights some of the key changes that you should understand and account for in your apps.

Most of these changes affect all apps, regardless of what version of Android they target. However, several changes only affect apps targeting Android O. To maximize clarity, this page is divided into two sections: Apps targeting all API levels and Apps targeting Android O.

Apps targeting all API levels

These behavior changes apply to all apps when they run on the Android O platform, regardless of the API level that they are targeting. All developers should review these changes and modify their apps to support them properly, where applicable to the app.

Background execution limits

As one of the changes that Android O introduces to improve battery life, when your app enters the cached state, with no active components, the system releases any wakelocks that the app holds.

In addition, to improve device performance, the system limits certain behaviors by apps that are not running in the foreground. Specifically:

By default, these restrictions only apply to apps that target O. However, users can enable these restrictions for any app from the Settings screen, even if the app has not targetted O.

For more information, see Background Execution Limits.

Android background location limits

In order to preserve battery, user experience, and system health, background apps receive location updates less frequently when used on a device running Android O. This behavior change affects all apps that receive location updates, including Google Play services.

These changes affect the following APIs:

Note: Background Location Limits in FLP and Geofencing are currently available through the Google Play Services Public Beta Program. During the next few weeks, support for this feature in FLP and Geofencing will roll out worldwide to devices running Android O.

Android O also includes the following changes to specific methods:

To ensure that your app runs as expected, complete the following steps:

For more information about these changes, see Background Location Limits.

App shortcuts

Android O includes the following changes to app shortcuts:

To learn more about changes to app shortcuts, see the Pinning Shortcuts and Widgets preview feature guide.

Locales and internationalization

Android 7.0 (API level 24) introduced the concept of being able to specify a default Category Locale, but some APIs continued to use the generic Locale.getDefault() method, without arguments, when they should have instead used default DISPLAY category Locale. In Android O, the following methods now use Locale.getDefault(Category.DISPLAY) instead of Locale.getDefault():

Locale.getDisplayScript(Locale) also falls back to Locale.getDefault() when the displayScript value specified for the Locale argument is not available.

Additional locale and internationalization-related changes are as follows:

Alert windows

If an app uses the SYSTEM_ALERT_WINDOW permission and uses one of the following window types to attempt to display alert windows above other apps and system windows:

...then these windows always appear beneath the windows that use the TYPE_APPLICATION_OVERLAY window type. If an app targets Android O, the app uses the TYPE_APPLICATION_OVERLAY window type to display alert windows.

For more information, see the Common window types for alert windows section within the behavior changes for Apps Built Against Android O.

Input and navigation

With the advent of Android apps on Chrome OS and other large form factors, such as tablets, we're seeing a resurgence of keyboard navigation use within Android apps. Within Android O, we've re-addressed using the keyboard as a navigation input device, resulting in a more reliable, predictable model for arrow- and tab-based navigation.

In particular, we've made the following changes to element focus behavior:

Also, all toolbar elements in Android O are automatically keyboard navigation clusters, making it easier for users to navigate into and out of each toolbar as a whole.

To learn more about how to improve support for keyboard navigation within your app, read the Supporting Keyboard Navigation guide.

Web form autofill

Now that the Android Autofill Framework provides built-in support for autofill functionality, the following methods related to WebView objects have changed for apps installed on devices running Android O:

WebSettings
WebViewDatabase
  • Calling clearFormData() no longer has any effect.
  • The hasFormData() method now returns false. Previously, this method returned true when the form contained data.

Accessibility

Accessibility services are now aware of all ClickableSpan instances within your app's TextView objects.

To learn more about how to make your app more accessible, see Accessibility.

Networking and HTTP(S) connectivity

Android O includes the following behavior changes to networking and HTTP(S) connectivity:

Bluetooth

Android O makes the following changes to the length of the data that the ScanRecord.getBytes() method retrieves:

Seamless Connectivity

Android O makes a number of improvements to Wi-Fi Settings to make it easier to choose the Wi-Fi network that offers the best user experience. Specific changes include:

This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.