CINXE.COM
Android 8.0 Features and APIs | Android Developers
<!doctype html> <html lang="en" dir="ltr"> <head> <meta name="google-signin-client-id" content="721724668570-nbkv1cfusk7kk4eni4pjvepaus73b13t.apps.googleusercontent.com"> <meta name="google-signin-scope" content="profile email https://www.googleapis.com/auth/developerprofiles https://www.googleapis.com/auth/developerprofiles.award"> <meta property="og:site_name" content="Android Developers"> <meta property="og:type" content="website"><meta name="theme-color" content="#34a853"><meta charset="utf-8"> <meta content="IE=Edge" http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="manifest" href="/_pwa/android/manifest.json" crossorigin="use-credentials"> <link rel="preconnect" href="//www.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.googleapis.com" crossorigin> <link rel="preconnect" href="//apis.google.com" crossorigin> <link rel="preconnect" href="//www.google-analytics.com" crossorigin><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Google+Sans:400,500,600,700|Google+Sans+Text:400,400italic,500,500italic,600,600italic,700,700italic|Roboto+Mono:400,500,700&display=swap"> <link rel="stylesheet" href="//fonts.googleapis.com/css2?family=Material+Icons&family=Material+Symbols+Outlined&display=block"><link rel="stylesheet" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/css/app.css"> <link rel="stylesheet" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/css/dark-theme.css" disabled> <link rel="shortcut icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/favicon.svg"> <link rel="apple-touch-icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/touchicon-180.png"><link rel="canonical" href="https://developer.android.com/about/versions/oreo/android-8.0"><link rel="search" type="application/opensearchdescription+xml" title="Android Developers" href="https://developer.android.com/s/opensearch.xml"> <link rel="alternate" hreflang="en" href="https://developer.android.com/about/versions/oreo/android-8.0" /><link rel="alternate" hreflang="x-default" href="https://developer.android.com/about/versions/oreo/android-8.0" /><link rel="alternate" hreflang="ar" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=ar" /><link rel="alternate" hreflang="bn" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=bn" /><link rel="alternate" hreflang="zh-Hans" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=zh-cn" /><link rel="alternate" hreflang="zh-Hant" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=zh-tw" /><link rel="alternate" hreflang="fa" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=fa" /><link rel="alternate" hreflang="fr" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=fr" /><link rel="alternate" hreflang="de" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=de" /><link rel="alternate" hreflang="he" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=he" /><link rel="alternate" hreflang="hi" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=hi" /><link rel="alternate" hreflang="id" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=id" /><link rel="alternate" hreflang="it" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=it" /><link rel="alternate" hreflang="ja" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=ja" /><link rel="alternate" hreflang="ko" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=ko" /><link rel="alternate" hreflang="pl" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=pl" /><link rel="alternate" hreflang="pt-BR" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=pt-br" /><link rel="alternate" hreflang="ru" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=ru" /><link rel="alternate" hreflang="es-419" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=es-419" /><link rel="alternate" hreflang="th" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=th" /><link rel="alternate" hreflang="tr" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=tr" /><link rel="alternate" hreflang="vi" href="https://developer.android.com/about/versions/oreo/android-8.0?hl=vi" /><title>Android 8.0 Features and APIs | Android Developers</title> <meta property="og:title" content="Android 8.0 Features and APIs | Android Developers"><meta name="description" content="Highlights of what's new for developers in Android 8.0 Oreo."> <meta property="og:description" content="Highlights of what's new for developers in Android 8.0 Oreo."><meta property="og:url" content="https://developer.android.com/about/versions/oreo/android-8.0"><meta property="og:image" content="https://developer.android.com/static/images/social/android-developers.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="675"><meta property="og:locale" content="en"><meta name="twitter:card" content="summary_large_image"><script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "headline": "Android 8.0 Features and APIs" } </script> <link rel="stylesheet" href="/extras.css"></head> <body class="" template="page" theme="android-theme" type="article" appearance layout="docs" display-toc pending> <devsite-progress type="indeterminate" id="app-progress"></devsite-progress> <section class="devsite-wrapper"> <devsite-cookie-notification-bar></devsite-cookie-notification-bar><devsite-header role="banner"> <div class="devsite-header--inner nocontent"> <div class="devsite-top-logo-row-wrapper-wrapper"> <div class="devsite-top-logo-row-wrapper"> <div class="devsite-top-logo-row"> <button type="button" id="devsite-hamburger-menu" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Navigation menu button" visually-hidden aria-label="Open menu"> </button> <div class="devsite-product-name-wrapper"> <a href="/" class="devsite-site-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Site logo" track-type="globalNav" track-name="androidDevelopers" track-metadata-position="nav" track-metadata-eventDetail="nav"> <picture> <source srcset="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup-dark-theme.svg" media="(prefers-color-scheme: dark)" class="devsite-dark-theme" alt="Android Developers"> <img src="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup.svg" class="devsite-site-logo" alt="Android Developers"> </picture> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item "> </li> </ul> </span> </div> <div class="devsite-top-logo-row-middle"> <div class="devsite-header-upper-tabs"> <devsite-tabs class="upper-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Upper tabs"> <tab class="devsite-dropdown devsite-dropdown-full devsite-active "> <a href="https://developer.android.com/get-started" track-metadata-eventdetail="https://developer.android.com/get-started" class="devsite-tabs-content gc-analytics-event android-dropdown-tab" track-type="nav" track-metadata-position="nav - essentials" track-metadata-module="primary nav" aria-label="Essentials, selected" data-category="Site-Wide Custom Events" data-label="Tab: Essentials" track-name="essentials" > Essentials </a> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for Essentials" track-type="nav" track-metadata-eventdetail="https://developer.android.com/get-started" track-metadata-position="nav - essentials" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Essentials" track-name="essentials" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column android-dropdown android-dropdown-primary android-dropdown-studio"> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-title" role="heading" tooltip>Gemini in Android Studio</li> <li class="devsite-nav-description">Your AI development companion for Android development. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/gemini-in-android" track-type="nav" track-metadata-eventdetail="https://developer.android.com/gemini-in-android" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="gemini in android studio" tooltip class="button button-primary" > <div class="devsite-nav-item-title"> Learn more </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/studio" track-type="nav" track-metadata-eventdetail="https://developer.android.com/studio" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="gemini in android studio" tooltip class="button button-white" > <div class="devsite-nav-item-title"> Get Android Studio </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-launch"> <li class="devsite-nav-title" role="heading" tooltip>Get started</li> <li class="devsite-nav-description">Start by creating your first app. Go deeper with our training courses or explore app development on your own. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/get-started/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/get-started/overview" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Hello world </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/courses" track-type="nav" track-metadata-eventdetail="https://developer.android.com/courses" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Training courses </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/get-started/codelabs" track-type="nav" track-metadata-eventdetail="https://developer.android.com/get-started/codelabs" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Tutorials </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/kotlin" track-type="nav" track-metadata-eventdetail="https://developer.android.com/kotlin" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Kotlin for Android </div> </a> </li> <li class="devsite-nav-item"> <a href="https://play.google.com/console/about/guides/monetize/" track-type="nav" track-metadata-eventdetail="https://play.google.com/console/about/guides/monetize/" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Monetization with Play ↗️ </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-multiple-screens"> <li class="devsite-nav-title" role="heading" tooltip>Extend by device</li> <li class="devsite-nav-description">Build apps that give your users seamless experiences from phones to tablets, watches, and more. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/adaptive-apps" track-type="nav" track-metadata-eventdetail="https://developer.android.com/adaptive-apps" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Adaptive apps </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/wear" track-type="nav" track-metadata-eventdetail="https://developer.android.com/wear" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Wear OS </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/cars" track-type="nav" track-metadata-eventdetail="https://developer.android.com/cars" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Android for Cars </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/tv" track-type="nav" track-metadata-eventdetail="https://developer.android.com/tv" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Android TV </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/chrome-os" track-type="nav" track-metadata-eventdetail="https://developer.android.com/chrome-os" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> ChromeOS </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/multi-device-development" track-type="nav" track-metadata-eventdetail="https://developer.android.com/multi-device-development" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Cross-device SDK </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-platform"> <li class="devsite-nav-title" role="heading" tooltip>Build by category</li> <li class="devsite-nav-description">Learn to build for your use case by following Google's prescriptive and opinionated guidance. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/games" track-type="nav" track-metadata-eventdetail="https://developer.android.com/games" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Games </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/media" track-type="nav" track-metadata-eventdetail="https://developer.android.com/media" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Camera & Media </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/social-and-messaging" track-type="nav" track-metadata-eventdetail="https://developer.android.com/social-and-messaging" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Social & messaging </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/health-and-fitness" track-type="nav" track-metadata-eventdetail="https://developer.android.com/health-and-fitness" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Health & Fitness </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/productivity" track-type="nav" track-metadata-eventdetail="https://developer.android.com/productivity" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Productivity </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/work/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/work/overview" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Enterprise apps </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-stars"> <li class="devsite-nav-title" role="heading" tooltip>Get the latest</li> <li class="devsite-nav-description">Stay in touch with the latest releases throughout the year, join our preview programs, and give us your feedback. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/latest-updates" track-type="nav" track-metadata-eventdetail="https://developer.android.com/latest-updates" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Latest updates </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/latest-updates/experimental" track-type="nav" track-metadata-eventdetail="https://developer.android.com/latest-updates/experimental" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Experimental updates </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/studio/preview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/studio/preview" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Android Studio preview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/jetpack/androidx/versions" track-type="nav" track-metadata-eventdetail="https://developer.android.com/jetpack/androidx/versions" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Jetpack & Compose libraries </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/wearables/versions/4" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/wearables/versions/4" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Wear OS preview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design-for-safety/privacy-sandbox" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design-for-safety/privacy-sandbox" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Privacy Sandbox </div> </a> </li> </ul> </div> </div> </div> </tab> <tab class="devsite-dropdown devsite-dropdown-full "> <a href="https://developer.android.com/design" track-metadata-eventdetail="https://developer.android.com/design" class="devsite-tabs-content gc-analytics-event android-dropdown-tab" track-type="nav" track-metadata-position="nav - design & plan" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Design & Plan" track-name="design & plan" > Design & Plan </a> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for Design & Plan" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design" track-metadata-position="nav - design & plan" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Design & Plan" track-name="design & plan" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-layout"> <li class="devsite-nav-title" role="heading" tooltip>UI Design</li> <li class="devsite-nav-description">Design a beautiful user interface using Android best practices.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Design for Android </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/mobile" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/mobile" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Mobile </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/large-screens" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/large-screens" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Large screens (e.g., tablets) </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/widget" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/widget" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Widgets </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/wear" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/wear" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Wear OS </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/tv" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/tv" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Android TV </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-design"> <li class="devsite-nav-title" role="heading" tooltip>Architecture</li> <li class="devsite-nav-description">Design robust, testable, and maintainable app logic and services.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/topic/architecture/intro" track-type="nav" track-metadata-eventdetail="https://developer.android.com/topic/architecture/intro" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Introduction </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/topic/libraries/view-binding" track-type="nav" track-metadata-eventdetail="https://developer.android.com/topic/libraries/view-binding" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Libraries </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/navigation/navigation-principles" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/navigation/navigation-principles" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Navigation </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/topic/modularization" track-type="nav" track-metadata-eventdetail="https://developer.android.com/topic/modularization" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Modularization </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/testing/fundamentals" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/testing/fundamentals" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Testing </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-vitals"> <li class="devsite-nav-title" role="heading" tooltip>Quality</li> <li class="devsite-nav-description">Plan for app quality and align with Play store guidelines.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> Overview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality/core-value" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality/core-value" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> Core value </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality/user-experience" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality/user-experience" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> User experience </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality/technical" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality/technical" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> Technical quality </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality/privacy-and-security" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality/privacy-and-security" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> Security </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-security-2"> <li class="devsite-nav-title" role="heading" tooltip>Security</li> <li class="devsite-nav-description">Safeguard users against threats and ensure a secure Android experience.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/security" track-type="nav" track-metadata-eventdetail="https://developer.android.com/security" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="security" tooltip > <div class="devsite-nav-item-title"> Overview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/privacy-and-security/about" track-type="nav" track-metadata-eventdetail="https://developer.android.com/privacy-and-security/about" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="security" tooltip > <div class="devsite-nav-item-title"> Privacy </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/identity" track-type="nav" track-metadata-eventdetail="https://developer.android.com/identity" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="security" tooltip > <div class="devsite-nav-item-title"> Identity </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/security/fraud-prevention" track-type="nav" track-metadata-eventdetail="https://developer.android.com/security/fraud-prevention" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="security" tooltip > <div class="devsite-nav-item-title"> Fraud prevention </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-earth"> <li class="devsite-nav-title" role="heading" tooltip>Build for Billions</li> <li class="devsite-nav-description">Create the best experience for entry-level devices</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/build-for-billions" track-type="nav" track-metadata-eventdetail="https://developer.android.com/build-for-billions" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="build for billions" tooltip > <div class="devsite-nav-item-title"> Overview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/docs/quality-guidelines/build-for-billions" track-type="nav" track-metadata-eventdetail="https://developer.android.com/docs/quality-guidelines/build-for-billions" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="build for billions" tooltip > <div class="devsite-nav-item-title"> About new markets </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/androidgo" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/androidgo" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="build for billions" tooltip > <div class="devsite-nav-item-title"> Android (Go edition) </div> </a> </li> </ul> </div> </div> </div> </tab> <tab class="devsite-dropdown devsite-dropdown-full "> <a href="https://developer.android.com/develop" track-metadata-eventdetail="https://developer.android.com/develop" class="devsite-tabs-content gc-analytics-event android-dropdown-tab" track-type="nav" track-metadata-position="nav - develop" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Develop" track-name="develop" > Develop </a> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for Develop" track-type="nav" track-metadata-eventdetail="https://developer.android.com/develop" track-metadata-position="nav - develop" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Develop" track-name="develop" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column android-dropdown android-dropdown-primary android-dropdown-ai"> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-title" role="heading" tooltip>Build AI experiences</li> <li class="devsite-nav-description">Build AI-powered Android apps with Gemini APIs and more. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/ai" track-type="nav" track-metadata-eventdetail="https://developer.android.com/ai" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="build ai experiences" tooltip class="button button-primary" > <div class="devsite-nav-item-title"> Get started </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-flag"> <li class="devsite-nav-title" role="heading" tooltip>Core areas</li> <li class="devsite-nav-description">Get the samples and docs for the features you need.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/samples" track-type="nav" track-metadata-eventdetail="https://developer.android.com/samples" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Samples </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quick-guides" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quick-guides" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Try Quick Guidesᵇᵉᵗᵃ </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/develop/ui" track-type="nav" track-metadata-eventdetail="https://developer.android.com/develop/ui" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> User interfaces </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/permissions/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/permissions/overview" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Permissions </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/develop/background-work" track-type="nav" track-metadata-eventdetail="https://developer.android.com/develop/background-work" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Background work </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/data" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/data" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Data and files </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/develop#core-areas" track-type="nav" track-metadata-eventdetail="https://developer.android.com/develop#core-areas" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> All core areas ⤵️ </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-tools-2"> <li class="devsite-nav-title" role="heading" tooltip>Tools and workflow</li> <li class="devsite-nav-description">Use the IDE to write and build your app, or create your own pipeline.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/studio/write" track-type="nav" track-metadata-eventdetail="https://developer.android.com/studio/write" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Write and debug code </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/build/gradle-build-overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/build/gradle-build-overview" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Build projects </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/testing" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/testing" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Test your app </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/topic/performance/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/topic/performance/overview" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Performance </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/tools" track-type="nav" track-metadata-eventdetail="https://developer.android.com/tools" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Command-line tools </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/reference/tools/gradle-api" track-type="nav" track-metadata-eventdetail="https://developer.android.com/reference/tools/gradle-api" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Gradle plugin API </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-multiple-screens"> <li class="devsite-nav-title" role="heading" tooltip>Device tech</li> <li class="devsite-nav-description">Write code for form factors. Connect devices and share data.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/large-screens/get-started-with-large-screens" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/large-screens/get-started-with-large-screens" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Large screens (e.g., tablets) </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/wearables" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/wearables" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Wear OS </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/health-and-fitness/guides" track-type="nav" track-metadata-eventdetail="https://developer.android.com/health-and-fitness/guides" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Android Health </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/connectivity/cross-device-sdk/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/connectivity/cross-device-sdk/overview" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Cross-device SDK </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/cars" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/cars" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Android for Cars </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/tv" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/tv" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Android TV </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/chrome-os/intro" track-type="nav" track-metadata-eventdetail="https://developer.android.com/chrome-os/intro" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> ChromeOS </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-core-library"> <li class="devsite-nav-title" role="heading" tooltip>Libraries</li> <li class="devsite-nav-description">Browse API reference documentation with all the details.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/reference/packages" track-type="nav" track-metadata-eventdetail="https://developer.android.com/reference/packages" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Android platform </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/jetpack/androidx/explorer" track-type="nav" track-metadata-eventdetail="https://developer.android.com/jetpack/androidx/explorer" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Jetpack libraries </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/jetpack/androidx/releases/compose" track-type="nav" track-metadata-eventdetail="https://developer.android.com/jetpack/androidx/releases/compose" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Compose libraries </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/android/reference/packages" track-type="nav" track-metadata-eventdetail="https://developers.google.com/android/reference/packages" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Google Play services ↗️ </div> </a> </li> <li class="devsite-nav-item"> <a href="https://play.google.com/sdks" track-type="nav" track-metadata-eventdetail="https://play.google.com/sdks" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Google Play SDK index ↗️ </div> </a> </li> </ul> </div> </div> </div> </tab> <tab > <a href="https://developer.android.com/distribute" track-metadata-eventdetail="https://developer.android.com/distribute" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - google play" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Google Play" track-name="google play" > Google Play </a> </tab> <tab > <a href="https://developer.android.com/community" track-metadata-eventdetail="https://developer.android.com/community" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - community" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Community" track-name="community" > Community </a> </tab> </nav> </devsite-tabs> </div> <devsite-search enable-signin enable-search enable-suggestions enable-query-completion project-name="Android Developers" tenant-name="Android Developers" > <form class="devsite-search-form" action="https://developer.android.com/s/results" method="GET"> <div class="devsite-search-container"> <button type="button" search-open class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Open search"></button> <div class="devsite-searchbox"> <input aria-activedescendant="" aria-autocomplete="list" aria-label="Search" aria-expanded="false" aria-haspopup="listbox" autocomplete="off" class="devsite-search-field devsite-search-query" name="q" placeholder="Search" role="combobox" type="text" value="" > <div class="devsite-search-image material-icons" aria-hidden="true"> </div> <div class="devsite-search-shortcut-icon-container" aria-hidden="true"> <kbd class="devsite-search-shortcut-icon">/</kbd> </div> </div> </div> </form> <button type="button" search-close class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Close search"></button> </devsite-search> </div> <devsite-appearance-selector></devsite-appearance-selector> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> <a class="devsite-header-link devsite-top-button button gc-analytics-event" href="https://developer.android.com/studio" data-category="Site-Wide Custom Events" data-label="Site header link" > Android Studio </a> <devsite-user enable-profiles id="devsite-user"> <span class="button devsite-top-button" aria-hidden="true" visually-hidden>Sign in</span> </devsite-user> </div> </div> </div> <div class="devsite-collapsible-section "> <div class="devsite-header-background"> <div class="devsite-product-id-row" > <div class="devsite-product-description-row"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item "> <a href="https://developer.android.com/get-started" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Lower Header" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="" > Platform </a> </li> </ul> </div> </div> <div class="devsite-doc-set-nav-row"> <devsite-tabs class="lower-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Lower tabs"> <tab > <a href="https://developer.android.com/about" track-metadata-eventdetail="https://developer.android.com/about" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - overview" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Overview" track-name="overview" > Overview </a> </tab> <tab class="devsite-active"> <a href="https://developer.android.com/about/versions" track-metadata-eventdetail="https://developer.android.com/about/versions" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - releases" track-metadata-module="primary nav" aria-label="Releases, selected" data-category="Site-Wide Custom Events" data-label="Tab: Releases" track-name="releases" > Releases </a> </tab> <tab > <a href="https://developer.android.com/guide/platform" track-metadata-eventdetail="https://developer.android.com/guide/platform" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - technology" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Technology" track-name="technology" > Technology </a> </tab> </nav> </devsite-tabs> </div> </div> </div> </div> </devsite-header> <devsite-book-nav scrollbars > <div class="devsite-book-nav-filter" > <span class="filter-list-icon material-icons" aria-hidden="true"></span> <input type="text" placeholder="Filter" aria-label="Type to filter" role="searchbox"> <span class="filter-clear-button hidden" data-title="Clear filter" aria-label="Clear filter" role="button" tabindex="0"></span> </div> <nav class="devsite-book-nav devsite-nav nocontent" aria-label="Side menu"> <div class="devsite-mobile-header"> <button type="button" id="devsite-close-nav" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Close navigation" aria-label="Close navigation"> </button> <div class="devsite-product-name-wrapper"> <a href="/" class="devsite-site-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Site logo" track-type="globalNav" track-name="androidDevelopers" track-metadata-position="nav" track-metadata-eventDetail="nav"> <picture> <source srcset="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup-dark-theme.svg" media="(prefers-color-scheme: dark)" class="devsite-dark-theme" alt="Android Developers"> <img src="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup.svg" class="devsite-site-logo" alt="Android Developers"> </picture> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item "> </li> </ul> </span> </div> </div> <div class="devsite-book-nav-wrapper"> <div class="devsite-mobile-nav-top"> <ul class="devsite-nav-list"> <li class="devsite-nav-item"> <a href="/get-started" class="devsite-nav-title gc-analytics-event devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Essentials" track-name="essentials" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Essentials" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Essentials </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu "> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Essentials" track-name="essentials" > <span class="devsite-nav-text" tooltip menu="Essentials"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Essentials"> </span> </span> </li> </ul> <ul class="devsite-nav-responsive-tabs"> <li class="devsite-nav-item"> <a href="/about" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Overview" track-name="overview" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Overview </span> </a> </li> <li class="devsite-nav-item"> <a href="/about/versions" class="devsite-nav-title gc-analytics-event devsite-nav-has-children devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Releases" track-name="releases" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Releases" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip menu="_book"> Releases </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="_book"> </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/platform" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Technology" track-name="technology" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Technology" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Technology </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/design" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Design & Plan" track-name="design & plan" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Design & Plan" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Design & Plan </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu "> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Design & Plan" track-name="design & plan" > <span class="devsite-nav-text" tooltip menu="Design & Plan"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Design & Plan"> </span> </span> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/develop" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Develop" track-name="develop" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Develop" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Develop </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu "> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Develop" track-name="develop" > <span class="devsite-nav-text" tooltip menu="Develop"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Develop"> </span> </span> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/distribute" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Google Play" track-name="google play" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Play" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Play </span> </a> </li> <li class="devsite-nav-item"> <a href="/community" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Community" track-name="community" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Community" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Community </span> </a> </li> <li class="devsite-nav-item"> <a href="/studio" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android Studio" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android Studio </span> </a> </li> </ul> </div> <div class="devsite-mobile-nav-bottom"> <ul class="devsite-nav-list" menu="_book"> <li class="devsite-nav-item"><a href="/about/versions" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /about/versions" track-type="bookNav" track-name="click" track-metadata-eventdetail="/about/versions" ><span class="devsite-nav-text" tooltip>All Android releases</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Android 8</span> </div></li> <li class="devsite-nav-item"><a href="/about/versions/oreo" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /about/versions/oreo" track-type="bookNav" track-name="click" track-metadata-eventdetail="/about/versions/oreo" ><span class="devsite-nav-text" tooltip>Home</span></a></li> <li class="devsite-nav-item"><a href="/about/versions/oreo/android-8.0-migration" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /about/versions/oreo/android-8.0-migration" track-type="bookNav" track-name="click" track-metadata-eventdetail="/about/versions/oreo/android-8.0-migration" ><span class="devsite-nav-text" tooltip>Migrating to Android 8.0</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Features and APIs</span> </div></li> <li class="devsite-nav-item"><a href="/about/versions/oreo/android-8.0" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /about/versions/oreo/android-8.0" track-type="bookNav" track-name="click" track-metadata-eventdetail="/about/versions/oreo/android-8.0" ><span class="devsite-nav-text" tooltip>Overview</span></a></li> <li class="devsite-nav-item"><a href="/about/versions/oreo/android-8.1" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /about/versions/oreo/android-8.1" track-type="bookNav" track-name="click" track-metadata-eventdetail="/about/versions/oreo/android-8.1" ><span class="devsite-nav-text" tooltip>Android 8.1 Features and APIs</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Behavior changes</span> </div></li> <li class="devsite-nav-item"><a href="/about/versions/oreo/android-8.0-changes" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /about/versions/oreo/android-8.0-changes" track-type="bookNav" track-name="click" track-metadata-eventdetail="/about/versions/oreo/android-8.0-changes" ><span class="devsite-nav-text" tooltip>Overview</span></a></li> <li class="devsite-nav-item"><a href="/about/versions/oreo/background" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /about/versions/oreo/background" track-type="bookNav" track-name="click" track-metadata-eventdetail="/about/versions/oreo/background" ><span class="devsite-nav-text" tooltip>Background Execution Limits</span></a></li> <li class="devsite-nav-item"><a href="/about/versions/oreo/background-location-limits" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /about/versions/oreo/background-location-limits" track-type="bookNav" track-name="click" track-metadata-eventdetail="/about/versions/oreo/background-location-limits" ><span class="devsite-nav-text" tooltip>Background Location Limits</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Samples</span> </div></li> <li class="devsite-nav-item"><a href="/about/versions/oreo/android-8.0-samples" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /about/versions/oreo/android-8.0-samples" track-type="bookNav" track-name="click" track-metadata-eventdetail="/about/versions/oreo/android-8.0-samples" ><span class="devsite-nav-text" tooltip>Android 8.0 Samples</span></a></li> <li class="devsite-nav-item devsite-nav-divider devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>App compatibility</span> </div></li> <li class="devsite-nav-item"><a href="/guide/app-compatibility" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /guide/app-compatibility" track-type="bookNav" track-name="click" track-metadata-eventdetail="/guide/app-compatibility" ><span class="devsite-nav-text" tooltip>About app compatibility ⍈</span></a></li> <li class="devsite-nav-item"><a href="/guide/app-compatibility/test-debug" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /guide/app-compatibility/test-debug" track-type="bookNav" track-name="click" track-metadata-eventdetail="/guide/app-compatibility/test-debug" ><span class="devsite-nav-text" tooltip>Compatibility framework tools ⍈</span></a></li> <li class="devsite-nav-item"><a href="/guide/app-compatibility/restrictions-non-sdk-interfaces" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /guide/app-compatibility/restrictions-non-sdk-interfaces" track-type="bookNav" track-name="click" track-metadata-eventdetail="/guide/app-compatibility/restrictions-non-sdk-interfaces" ><span class="devsite-nav-text" tooltip>Restrictions on non-SDK interfaces ⍈</span></a></li> <li class="devsite-nav-item devsite-nav-divider devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>More</span> </div></li> <li class="devsite-nav-item"><a href="/about/dashboards" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /about/dashboards" track-type="bookNav" track-name="click" track-metadata-eventdetail="/about/dashboards" ><span class="devsite-nav-text" tooltip>Dashboards ⍈</span></a></li> </ul> <ul class="devsite-nav-list" menu="Essentials" aria-label="Side menu" hidden> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Gemini in Android Studio </span> </span> </li> <li class="devsite-nav-item"> <a href="/gemini-in-android" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Learn more" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Learn more </span> </a> </li> <li class="devsite-nav-item"> <a href="/studio" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Get Android Studio" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Get Android Studio </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Get started </span> </span> </li> <li class="devsite-nav-item"> <a href="/get-started/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Hello world" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Hello world </span> </a> </li> <li class="devsite-nav-item"> <a href="/courses" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Training courses" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Training courses </span> </a> </li> <li class="devsite-nav-item"> <a href="/get-started/codelabs" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Tutorials" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Tutorials </span> </a> </li> <li class="devsite-nav-item"> <a href="/kotlin" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Kotlin for Android" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Kotlin for Android </span> </a> </li> <li class="devsite-nav-item"> <a href="https://play.google.com/console/about/guides/monetize/" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Monetization with Play ↗️" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Monetization with Play ↗️ </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Extend by device </span> </span> </li> <li class="devsite-nav-item"> <a href="/adaptive-apps" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Adaptive apps" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Adaptive apps </span> </a> </li> <li class="devsite-nav-item"> <a href="/wear" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Wear OS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Wear OS </span> </a> </li> <li class="devsite-nav-item"> <a href="/cars" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android for Cars" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android for Cars </span> </a> </li> <li class="devsite-nav-item"> <a href="/tv" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android TV" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android TV </span> </a> </li> <li class="devsite-nav-item"> <a href="/chrome-os" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: ChromeOS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > ChromeOS </span> </a> </li> <li class="devsite-nav-item"> <a href="/multi-device-development" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Cross-device SDK" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Cross-device SDK </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Build by category </span> </span> </li> <li class="devsite-nav-item"> <a href="/games" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Games" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Games </span> </a> </li> <li class="devsite-nav-item"> <a href="/media" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Camera & Media" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Camera & Media </span> </a> </li> <li class="devsite-nav-item"> <a href="/social-and-messaging" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Social & messaging" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Social & messaging </span> </a> </li> <li class="devsite-nav-item"> <a href="/health-and-fitness" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Health & Fitness" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Health & Fitness </span> </a> </li> <li class="devsite-nav-item"> <a href="/productivity" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Productivity" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Productivity </span> </a> </li> <li class="devsite-nav-item"> <a href="/work/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Enterprise apps" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Enterprise apps </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Get the latest </span> </span> </li> <li class="devsite-nav-item"> <a href="/latest-updates" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Latest updates" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Latest updates </span> </a> </li> <li class="devsite-nav-item"> <a href="/latest-updates/experimental" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Experimental updates" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Experimental updates </span> </a> </li> <li class="devsite-nav-item"> <a href="/studio/preview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android Studio preview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android Studio preview </span> </a> </li> <li class="devsite-nav-item"> <a href="/jetpack/androidx/versions" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Jetpack & Compose libraries" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Jetpack & Compose libraries </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/wearables/versions/4" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Wear OS preview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Wear OS preview </span> </a> </li> <li class="devsite-nav-item"> <a href="/design-for-safety/privacy-sandbox" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Privacy Sandbox" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Privacy Sandbox </span> </a> </li> </ul> <ul class="devsite-nav-list" menu="Design & Plan" aria-label="Side menu" hidden> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > UI Design </span> </span> </li> <li class="devsite-nav-item"> <a href="/design/ui" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Design for Android" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Design for Android </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/mobile" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Mobile" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Mobile </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/large-screens" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Large screens (e.g., tablets)" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Large screens (e.g., tablets) </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/widget" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Widgets" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Widgets </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/wear" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Wear OS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Wear OS </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/tv" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android TV" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android TV </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Architecture </span> </span> </li> <li class="devsite-nav-item"> <a href="/topic/architecture/intro" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Introduction" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Introduction </span> </a> </li> <li class="devsite-nav-item"> <a href="/topic/libraries/view-binding" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Libraries" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Libraries </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/navigation/navigation-principles" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Navigation" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Navigation </span> </a> </li> <li class="devsite-nav-item"> <a href="/topic/modularization" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Modularization" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Modularization </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/testing/fundamentals" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Testing" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Testing </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Quality </span> </span> </li> <li class="devsite-nav-item"> <a href="/quality" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Overview </span> </a> </li> <li class="devsite-nav-item"> <a href="/quality/core-value" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Core value" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Core value </span> </a> </li> <li class="devsite-nav-item"> <a href="/quality/user-experience" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: User experience" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > User experience </span> </a> </li> <li class="devsite-nav-item"> <a href="/quality/technical" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Technical quality" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Technical quality </span> </a> </li> <li class="devsite-nav-item"> <a href="/quality/privacy-and-security" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Security" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Security </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Security </span> </span> </li> <li class="devsite-nav-item"> <a href="/security" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Overview </span> </a> </li> <li class="devsite-nav-item"> <a href="/privacy-and-security/about" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Privacy" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Privacy </span> </a> </li> <li class="devsite-nav-item"> <a href="/identity" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Identity" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Identity </span> </a> </li> <li class="devsite-nav-item"> <a href="/security/fraud-prevention" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Fraud prevention" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Fraud prevention </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Build for Billions </span> </span> </li> <li class="devsite-nav-item"> <a href="/build-for-billions" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Overview </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/quality-guidelines/build-for-billions" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: About new markets" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > About new markets </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/topics/androidgo" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android (Go edition)" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android (Go edition) </span> </a> </li> </ul> <ul class="devsite-nav-list" menu="Develop" aria-label="Side menu" hidden> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Build AI experiences </span> </span> </li> <li class="devsite-nav-item"> <a href="/ai" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Get started" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Get started </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Core areas </span> </span> </li> <li class="devsite-nav-item"> <a href="/samples" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Samples" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Samples </span> </a> </li> <li class="devsite-nav-item"> <a href="/quick-guides" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Try Quick Guidesᵇᵉᵗᵃ" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Try Quick Guidesᵇᵉᵗᵃ </span> </a> </li> <li class="devsite-nav-item"> <a href="/develop/ui" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: User interfaces" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > User interfaces </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/topics/permissions/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Permissions" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Permissions </span> </a> </li> <li class="devsite-nav-item"> <a href="/develop/background-work" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Background work" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Background work </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/topics/data" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Data and files" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Data and files </span> </a> </li> <li class="devsite-nav-item"> <a href="/develop#core-areas" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: All core areas ⤵️" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > All core areas ⤵️ </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Tools and workflow </span> </span> </li> <li class="devsite-nav-item"> <a href="/studio/write" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Write and debug code" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Write and debug code </span> </a> </li> <li class="devsite-nav-item"> <a href="/build/gradle-build-overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Build projects" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Build projects </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/testing" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Test your app" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Test your app </span> </a> </li> <li class="devsite-nav-item"> <a href="/topic/performance/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Performance" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Performance </span> </a> </li> <li class="devsite-nav-item"> <a href="/tools" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Command-line tools" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Command-line tools </span> </a> </li> <li class="devsite-nav-item"> <a href="/reference/tools/gradle-api" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Gradle plugin API" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Gradle plugin API </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Device tech </span> </span> </li> <li class="devsite-nav-item"> <a href="/guide/topics/large-screens/get-started-with-large-screens" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Large screens (e.g., tablets)" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Large screens (e.g., tablets) </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/wearables" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Wear OS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Wear OS </span> </a> </li> <li class="devsite-nav-item"> <a href="/health-and-fitness/guides" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android Health" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android Health </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/topics/connectivity/cross-device-sdk/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Cross-device SDK" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Cross-device SDK </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/cars" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android for Cars" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android for Cars </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/tv" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android TV" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android TV </span> </a> </li> <li class="devsite-nav-item"> <a href="/chrome-os/intro" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: ChromeOS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > ChromeOS </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Libraries </span> </span> </li> <li class="devsite-nav-item"> <a href="/reference/packages" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android platform" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android platform </span> </a> </li> <li class="devsite-nav-item"> <a href="/jetpack/androidx/explorer" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Jetpack libraries" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Jetpack libraries </span> </a> </li> <li class="devsite-nav-item"> <a href="/jetpack/androidx/releases/compose" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Compose libraries" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Compose libraries </span> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/android/reference/packages" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Play services ↗️" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Play services ↗️ </span> </a> </li> <li class="devsite-nav-item"> <a href="https://play.google.com/sdks" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Play SDK index ↗️" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Play SDK index ↗️ </span> </a> </li> </ul> </div> </div> </nav> </devsite-book-nav> <section id="gc-wrapper"> <main role="main" class="devsite-main-content" has-book-nav has-sidebar > <div class="devsite-sidebar"> <div class="devsite-sidebar-content"> <devsite-toc class="devsite-nav" role="navigation" aria-label="On this page" depth="2" scrollbars ></devsite-toc> <devsite-recommendations-sidebar class="nocontent devsite-nav"> </devsite-recommendations-sidebar> </div> </div> <devsite-content> <article class="devsite-article"> <div class="devsite-article-meta nocontent" role="navigation"> <ul class="devsite-breadcrumb-list" aria-label="Breadcrumb"> <li class="devsite-breadcrumb-item "> <a href="https://developer.android.com/" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="Android Developers" > Android Developers </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.android.com/get-started" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail="" > Essentials </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.android.com/about/versions" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="3" track-type="globalNav" track-name="breadcrumb" track-metadata-position="3" track-metadata-eventdetail="" > Releases </a> </li> </ul> <devsite-thumb-rating position="header"> </devsite-thumb-rating> </div> <h1 class="devsite-page-title" tabindex="-1"> Android 8.0 Features and APIs </h1> <devsite-feature-tooltip ack-key="AckCollectionsBookmarkTooltipDismiss" analytics-category="Site-Wide Custom Events" analytics-action-show="Callout Profile displayed" analytics-action-close="Callout Profile dismissed" analytics-label="Create Collection Callout" class="devsite-page-bookmark-tooltip nocontent" dismiss-button="true" id="devsite-collections-dropdown" dismiss-button-text="Dismiss" close-button-text="Got it"> <devsite-bookmark></devsite-bookmark> <span slot="popout-heading"> Stay organized with collections </span> <span slot="popout-contents"> Save and categorize content based on your preferences. </span> </devsite-feature-tooltip> <div class="devsite-page-title-meta"><devsite-view-release-notes></devsite-view-release-notes></div> <devsite-toc class="devsite-nav" depth="2" devsite-toc-embedded > </devsite-toc> <devsite-recommendations-dropdown class="nocontent"></devsite-recommendations-dropdown> <div class="devsite-article-body clearfix "> <p> Android 8.0 (API level 26) introduces a variety of new features and capabilities for users and developers. This document highlights what's new for developers. </p> <p>Make sure to also check out <a href="/about/versions/oreo/android-8.0-changes"> Android 8.0 Behavior Changes</a> to learn about areas where platform changes may affect your apps. </p> <h2 id="ux" data-text="User Experience" tabindex="-1">User Experience</h2> <h3 id="opip" data-text="Picture-in-Picture mode" tabindex="-1">Picture-in-Picture mode</h3> <div style="float:right;max-width:260px;padding:1.5em"> <video autoplay muted controls> <source src="/static/images/pip.mp4" type="video/mp4"> Alas, your browser doesn't support HTML5 video. That's OK! You can still <a href="/static/images/pip.mp4">download the video</a> and watch it with a video player. </video> <p class="img-caption dac-text-center"> Picture-in-picture in Android 8.0. </p> </div> <p> Android 8.0 (API level 26) allows activities to launch in <a href="/guide/topics/ui/picture-in-picture">picture-in-picture (PIP) mode</a>. PIP is a special type of multi-window mode mostly used for video playback. PIP mode was originally available for Android TV only; Android 8.0 makes the feature available on other Android devices. </p> <p> When an activity is in PIP mode, it is in the paused state, but should continue showing content. For this reason, you should make sure your app does not pause playback in its <code translate="no" dir="ltr"><a href="/reference/android/app/Activity#onPause()">onPause()</a></code> handler. Instead, you should pause video in <code translate="no" dir="ltr"><a href="/reference/android/app/Activity#onStop()">onStop()</a></code>, and resume playback in <code translate="no" dir="ltr"><a href="/reference/android/app/Activity#onStart()">onStart()</a></code>. For more information, see <a href="/guide/topics/ui/multi-window#lifecycle">Multi-Window Lifecycle</a>. </p> <p> To specify that your activity can use PIP mode, set <code translate="no" dir="ltr">android:supportsPictureInPicture</code> to true in the manifest. (Beginning with Android 8.0, PIP does not require the <code translate="no" dir="ltr">android:resizeableActivity</code> manifest attribute. However, you must set <code translate="no" dir="ltr">android:resizeableActivity</code> to `true` if your activity supports other <a href="/guide/topics/ui/multi-window#configuring">multi-window modes</a>.) </p> <p> Android 8.0 (API level 26) introduces a new object, <code translate="no" dir="ltr"><a href="/reference/android/app/PictureInPictureParams">PictureInPictureParams</a></code>, which you pass to PIP methods to specify how an activity should behave when it is in PIP mode. This object specifies properties such as the activity's preferred aspect ratio. </p> <p> The existing PIP methods described in <a href="/training/tv/playback/picture-in-picture">Adding Picture-in-picture</a> can now be used on all Android devices, not just on Android TV. In addition, Android 8.0 provides the following methods to support PIP mode: </p> <ul> <li><code translate="no" dir="ltr"><a href="/reference/android/app/Activity#enterPictureInPictureMode(android.app.PictureInPictureParams)">Activity.enterPictureInPictureMode(PictureInPictureParams args)</a></code>: Places the activity in picture-in-picture mode. The activity's aspect ratio and other configuration settings are specified by <var translate="no">args</var>. If any fields in <var translate="no">args</var> are empty, the system uses the values set the last time you called <code translate="no" dir="ltr"><a href="/reference/android/app/Activity#setPictureInPictureParams(android.app.PictureInPictureParams)">Activity.setPictureInPictureParams()</a></code>. <p> The specified activity is placed in a corner of the screen; the rest of the screen is filled with the previous activity that was on screen. The activity entering PIP mode goes into the paused state, but remains started. If the user taps the PIP activity, the system shows a menu for the user to interact with; no touch events reach the activity while it is in the PIP state. </p> </li> <li> <code translate="no" dir="ltr"><a href="/reference/android/app/Activity#setPictureInPictureParams(android.app.PictureInPictureParams)">Activity.setPictureInPictureParams()</a></code>: Updates an activity's PIP configuration settings. If the activity is currently in PIP mode, the settings are updated; this is useful if activity's aspect ratio changes. If the activity is not in PIP mode, these configuration settings are used regardless of the <code translate="no" dir="ltr">enterPictureInPictureMode()</code> method that you call. </li> </ul> <h3 id="notifications" data-text="Notifications" tabindex="-1">Notifications</h3> <p> In Android 8.0 (API level 26), we've redesigned notifications to provide an easier and more consistent way to manage notification behavior and settings. These changes include: </p> <ul> <div style="max-width:260px;float:right;padding:1.5em;"> <img src="/static/images/about/versions/oreo/notification-long-press.png" alt="A notification long-press menu in Android 8.0 (API level 26)." id="figure1" /> <p class="img-caption dac-text-center"> Users can long-press on app launcher icons to view notifications in Android 8.0. </p> </div> <li>Notification channels: Android 8.0 introduces notification channels that allow you to create a user-customizable channel for each type of notification you want to display. The user interface refers to notification channels as <em>notification categories</em>. To learn how to implement notification channels, see <a href="/guide/topics/ui/notifiers/notifications#ManageChannels">Managing notification channels</a>. </li> <li>Notification dots: Android 8.0 introduces support for displaying dots, or badges, on app launcher icons. Notification dots reflect the presence of notifications that the user has not yet dismissed or acted on. To learn how to work with notification dots, see <a href="/guide/topics/ui/notifiers/notifications#Badges">Notification badges</a>. </li> <li>Snoozing: Users can snooze notifications, which causes them to disappear for a period of time before reappearing. Notifications reappear with the same level of importance they first appeared with. Apps can remove or update a snoozed notification, but updating a snoozed notification does not cause it to reappear. </li> <li>Notification timeouts: You can set a timeout when creating a notification using <code translate="no" dir="ltr"><a href="/reference/android/app/Notification.Builder#setTimeoutAfter(long)">setTimeoutAfter()</a></code>. You can use this method to specify a duration after which a notification should be canceled. If required, you can cancel a notification before the specified timeout duration elapses. </li> <li>Notification settings: You can call <code translate="no" dir="ltr"><a href="/reference/android/app/Notification.Builder#setSettingsText(java.lang.CharSequence)">setSettingsText()</a></code> to set the text that appears when you create a link to your app's notification settings from a notification using the <code translate="no" dir="ltr"><a href="/reference/android/app/Notification#INTENT_CATEGORY_NOTIFICATION_PREFERENCES">Notification.INTENT_CATEGORY_NOTIFICATION_PREFERENCES</a></code> intent. The system may provide the following extras with the intent to filter the settings your app must display to users: <code translate="no" dir="ltr">EXTRA_CHANNEL_ID</code>, <code translate="no" dir="ltr">NOTIFICATION_TAG</code>, and <code translate="no" dir="ltr">NOTIFICATION_ID</code>. </li> <li>Notification dismissal: Users can dismiss notifications themselves, and apps can remove them programmatically. You can determine when a notification is dismissed and why it's dismissed by implementing the <code translate="no" dir="ltr"><a href="/reference/android/service/notification/NotificationListenerService#onNotificationRemoved(android.service.notification.StatusBarNotification)">onNotificationRemoved()</a></code> method from the <code translate="no" dir="ltr"><a href="/reference/android/service/notification/NotificationListenerService">NotificationListenerService</a></code> class. </li> <li>Background colors: You can set and enable a background color for a notification. You should only use this feature in notifications for ongoing tasks which are critical for a user to see at a glance. For example, you could set a background color for notifications related to driving directions, or a phone call in progress. You can also set the desired background color using <code translate="no" dir="ltr"><a href="/reference/android/app/Notification.Builder#setColor(int)">setColor()</a></code>. Doing so allows you to use <code translate="no" dir="ltr"><a href="/reference/android/app/Notification.Builder#setColorized(boolean)">setColorized()</a></code> to enable the use of a background color for a notification. </li> <li>Messaging style: In Android 8.0, notifications that use the <code translate="no" dir="ltr"><a href="/reference/android/app/Notification.MessagingStyle">MessagingStyle</a></code> class display more content in their collapsed form. You should use the <code translate="no" dir="ltr"><a href="/reference/android/app/Notification.MessagingStyle">MessagingStyle</a></code> class for notifications that are messaging-related. You can also use the <code translate="no" dir="ltr"><a href="/reference/android/app/Notification.MessagingStyle#addHistoricMessage(android.app.Notification.MessagingStyle.Message)">addHistoricMessage()</a></code> method to provide context to a conversation by adding historic messages to messaging-related notifications. </li> </ul> <h3 id="af" data-text="Autofill framework" tabindex="-1">Autofill framework</h3> <p> Account creation, login, and credit card transactions take time and are prone to errors. Users can easily get frustrated with apps that require these types of repetitive tasks. </p> <p> Android 8.0 (API level 26) makes filling out forms, such as login and credit card forms, easier with the introduction of the Autofill Framework. Existing and new apps work with Autofill Framework after the user opts in to autofill. </p> <p> You can take some steps to optimize how your app works with the framework. For more information, see <a href="/guide/topics/text/autofill">Autofill Framework Overview</a>. </p> <h3 id="df" data-text="Downloadable fonts" tabindex="-1">Downloadable fonts</h3> <p> Android 8.0 (API level 26) and Android Support Library 26 let you request fonts from a provider application instead of bundling fonts into the APK or letting the APK download fonts. This feature reduces your APK size, increases the app installation success rate, and allows multiple apps to share the same font.</p> <p> For more information about downloading fonts, refer to <a href="/guide/topics/ui/look-and-feel/downloadable-fonts">Downloadable Fonts</a>. </p> <h3 id="fix" data-text="Fonts in XML" tabindex="-1">Fonts in XML</h3> <p> Android 8.0 (API level 26) introduces a new feature, Fonts in XML, which lets you use fonts as resources. This means, there is no need to bundle fonts as assets. Fonts are compiled in <code translate="no" dir="ltr">R</code> file and are automatically available in the system as a resource. You can then access these fonts with the help of a new resource type, <code translate="no" dir="ltr">font</code>. </p> <p> The Support Library 26 provides full support to this feature on devices running API versions 14 and higher. </p> <p> For more information, about using fonts as resources and retrieving system fonts, see <a href="/guide/topics/ui/look-and-feel/fonts-in-xml">Fonts in XML</a>. </p> <h3 id="atv" data-text="Autosizing TextView" tabindex="-1">Autosizing TextView</h3> <p> Android 8.0 (API level 26) lets you set the size of your text expand or contract automatically based on the size of the TextView. This means, it is much easier to optimize the text size on different screens or with dynamic content. For more information, about autosizing TextView in Android 8.0, see <a href="/guide/topics/ui/look-and-feel/autosizing-textview">Autosizing TextView</a>. <p> <h3 id="ai" data-text="Adaptive icons" tabindex="-1">Adaptive icons</h3> <p> Android 8.0 (API level 26) introduces adaptive launcher icons. Adaptive icons support visual effects, and can display a variety of shapes across different device models. To learn how to create adaptive icons, see the <a href="/guide/practices/ui_guidelines/icon_design_adaptive">Adaptive Icons</a> guide. </p> <h3 id="cm" data-text="Color management" tabindex="-1">Color management</h3> <p> Android developers of imaging apps can now take advantage of new devices that have a wide-gamut color capable display. To display wide gamut images, apps will need to enable a flag in their manifest (per activity) and load bitmaps with an embedded wide color profile (AdobeRGB, Pro Photo RGB, DCI-P3, etc.). </p> <h3 id="wv" data-text="WebView APIs" tabindex="-1">WebView APIs</h3> <p>Android 8.0 provides several APIs to help you manage the <code translate="no" dir="ltr"><a href="/reference/android/webkit/WebView">WebView</a></code> objects that display web content in your app. These APIs, which improve your app's stability and security, include the following:</p> <ul> <li>Version API</li> <li>Google SafeBrowsing API</li> <li>Termination Handle API</li> <li>Renderer Importance API</li> </ul> <p>To learn more about how to use these APIs, see <a href="/guide/webapps/managing-webview">Managing WebViews</a>.</p> <p> The <code translate="no" dir="ltr"><a href="/reference/android/webkit/WebView">WebView</a></code> class now includes a Safe Browsing API to enhance the security of web browsing. For more information, see <a href="/guide/webapps/managing-webview#safe-browsing">Google Safe Browsing API.</a> </p> <h3 id="iapoas" data-text="Pinning shortcuts and widgets" tabindex="-1">Pinning shortcuts and widgets</h3> <p> Android 8.0 (API level 26) introduces in-app pinning of shortcuts and widgets. In your app, you can create pinned shortcuts and widgets for supported launchers, subject to user permission. </p> <p>For more information, see the <a href="/guide/topics/ui/shortcuts#pinning">Pinning Shortcuts and Widgets</a> feature guide. </p> <h3 id="max-aspect-ratio" data-text="Maximum screen aspect ratio" tabindex="-1">Maximum screen aspect ratio</h3> <p> Android 8.0 (API level 26) brings changes to how to configure an app's maximum aspect ratio. </p> <p> First, Android 8.0 introduces the <a href="/reference/android/R.attr#maxAspectRatio">maxAspectRatio</a> attribute, which you can use to set your app's maximum aspect ratio. In addition, in Android 8.0 and higher, an app's default maximum aspect ratio is the native aspect ratio of the device on which the app is running. </p> <p> For more information about declaring maximum aspect ratio, see <a href="/guide/practices/screens_support">Supporting Multiple Screens</a>. </p> <h3 id="mds" data-text="Multi-display support" tabindex="-1">Multi-display support</h3> <p> Beginning with Android 8.0 (API level 26), the platform offers enhanced support for multiple displays. If an activity supports multi-window mode and is running on a device with multiple displays, users can move the activity from one display to another. When an app launches an activity, the app can specify which display the activity should run on. </p> <p class="note"><strong>Note: </strong> If an activity supports multi-window mode, Android 8.0 automatically enables multi-display support for that activity. You should test your app to make sure it works adequately in a multi-display environment. </p> <p> Only one activity at a time can be in the resumed state, even if the app has multiple displays. The activity with focus is in the resumed state; all other visible activities are paused, but not stopped. For more information on the activity lifecycle when several activities are visible, see <a href="/guide/topics/ui/multi-window#lifecycle">Multi-Window Lifecycle</a>. </p> <p> When a user moves an activity from one display to another, the system resizes the activity and issues runtime changes as necessary. Your activity can handle the configuration change itself, or it can allow the system to destroy the process containing your activity and recreate it with the new dimensions. For more information, see <a href="/guide/topics/resources/runtime-changes">Handling Configuration Changes</a>. </p> <p> <code translate="no" dir="ltr"><a href="/reference/android/app/ActivityOptions">ActivityOptions</a></code> provides two new methods to support multiple displays: </p> <dl> <dt><code translate="no" dir="ltr"><a href="/reference/android/app/ActivityOptions#setLaunchDisplayId(int)">setLaunchDisplayId()</a></code></dt> <dd>Specifies which display the activity should be shown on when it is launched.</dd> <dt><code translate="no" dir="ltr"><a href="/reference/android/app/ActivityOptions#getLaunchDisplayId()">getLaunchDisplayId()</a></code></dt> <dd>Returns the activity's current launch display.</dd> </dl> <p> The adb shell is extended to support multiple displays. The <code translate="no" dir="ltr">shell start</code> command can now be used to launch an activity, and to specify the activity's target display: </p> <div></div><devsite-code><pre class="no-pretty-print" translate="no" dir="ltr" is-upgraded> adb shell start <activity_name> --display <display_id> </pre></devsite-code> <h3 id="ulmp" data-text="Unified layout margins and padding" tabindex="-1">Unified layout margins and padding</h3> <p>Android 8.0 (API level 26) makes it easier for you to specify situations where opposite sides of a <code translate="no" dir="ltr"><a href="/reference/android/view/View">View</a></code> element use the same margin or padding. Specifically, you can now use the following attributes in your layout XML files:</p> <ul> <li><a href="/reference/android/R.attr#layout_marginVertical"> <code translate="no" dir="ltr">layout_marginVertical</code></a>, which defines <a href="/reference/android/R.attr#layout_marginTop"> <code translate="no" dir="ltr">layout_marginTop</code></a> and <a href="/reference/android/R.attr#layout_marginBottom"> <code translate="no" dir="ltr">layout_marginBottom</code></a> at the same time.</li> <li><a href="/reference/android/R.attr#layout_marginHorizontal"> <code translate="no" dir="ltr">layout_marginHorizontal</code></a>, which defines <a href="/reference/android/R.attr#layout_marginLeft"> <code translate="no" dir="ltr">layout_marginLeft</code></a> and <a href="/reference/android/R.attr#layout_marginRight"> <code translate="no" dir="ltr">layout_marginRight</code></a> at the same time.</li> <li><a href="/reference/android/R.attr#paddingVertical"> <code translate="no" dir="ltr">paddingVertical</code></a>, which defines <a href="/reference/android/R.attr#paddingTop"> <code translate="no" dir="ltr">paddingTop</code></a> and <a href="/reference/android/R.attr#paddingBottom"> <code translate="no" dir="ltr">paddingBottom</code></a> at the same time.</li> <li><a href="/reference/android/R.attr#paddingHorizontal"> <code translate="no" dir="ltr">paddingHorizontal</code></a>, which defines <a href="/reference/android/R.attr#paddingLeft"> <code translate="no" dir="ltr">paddingLeft</code></a> and <a href="/reference/android/R.attr#paddingRight"> <code translate="no" dir="ltr">paddingRight</code></a> at the same time.</li> </ul> <p class="note"><b>Note:</b> If you customize your app's logic to <a href="/training/basics/supporting-devices/languages">support different languages and cultures</a>, including text direction, keep in mind that these attributes don't affect the values of <a href="/reference/android/R.attr#layout_marginStart"> <code translate="no" dir="ltr">layout_marginStart</code></a>, <a href="/reference/android/R.attr#layout_marginEnd"> <code translate="no" dir="ltr">layout_marginEnd</code></a>, <a href="/reference/android/R.attr#paddingStart"> <code translate="no" dir="ltr">paddingStart</code></a>, or <a href="/reference/android/R.attr#paddingEnd"> <code translate="no" dir="ltr">paddingEnd</code></a>. You can set these values yourself, in addition to the new vertical and horizontal layout attributes, to create layout behavior that depends on the text direction.</p> <h3 id="pc" data-text="Pointer capture" tabindex="-1">Pointer capture</h3> <p> Some apps, such as games, remote desktop, and virtualization clients, greatly benefit from getting control over the mouse pointer. Pointer capture is a new feature in Android 8.0 (API level 26) that provides such control by delivering all mouse events to a focused view in your app. </p> <p> Starting in Android 8.0, a <code translate="no" dir="ltr"><a href="/reference/android/view/View">View</a></code> in your app can request pointer capture and define a listener to process captured pointer events. The mouse pointer is hidden while in this mode. The view can release pointer capture when it doesn't need the mouse information anymore. The system can also release pointer capture when the view loses focus, for example, when the user opens another app. </p> <p> For information on how to use this feature in your app, see <a href="/training/gestures/movement#pointer-capture">Pointer capture</a>. </p> <h3 id="category" data-text="App categories" tabindex="-1">App categories</h3> <p>Android 8.0 (API level 26) allows each app to declare a category that it fits into, when relevant. These categories are used to cluster together apps of similar purpose or function when presenting them to users, such as in Data Usage, Battery Usage, or Storage Usage. You can define a category for your app by setting the <code translate="no" dir="ltr">android:appCategory</code> attribute in your <code translate="no" dir="ltr"><application></code> manifest tag.</p> <h3 id="tvlauncher" data-text="Android TV launcher" tabindex="-1">Android TV launcher</h3> <p>Android 8.0 (API level 26) includes a new content-centric, <a href="/training/tv/discovery/home-screen">Android TV home screen experience</a>, which is available with the Android TV emulator and Nexus Player device image for Android 8.0. The new home screen organizes video content in rows corresponding to channels, which are each populated with programs by an app on the system. Apps can publish multiple channels, and users can configure which channels that they wish to see on the home screen. The Android TV home screen also includes a Watch Next row, which is populated with programs from apps, based on the viewing habits of the user. Apps can also provide video previews, which are automatically played when a user focuses on a program. The APIs for populating channels and programs are part of the TvProvider APIs, which are distributed as a Android Support Library module with Android 8.0.</p> <h3 id="aset" data-text="AnimatorSet" tabindex="-1">AnimatorSet</h3> <p> Starting in Android 8.0 (API level 26), the <code translate="no" dir="ltr"><a href="/reference/android/animation/AnimatorSet">AnimatorSet</a></code> API now supports seeking and playing in reverse. Seeking lets you set the position of the animation set to a specific point in time. Playing in reverse is useful if your app includes animations for actions that can be undone. Instead of defining two separate animation sets, you can play the same one in reverse. </p> <h3 id="ian" data-text="Input and navigation" tabindex="-1">Input and navigation</h3> <h4 id="kbnc" data-text="Keyboard navigation clusters" tabindex="-1">Keyboard navigation clusters</h4> <p>If an activity in your app uses a complex view hierarchy, such as the one in Figure 2, consider organizing groups of UI elements into clusters for easier keyboard navigation among them. Users can press Meta+Tab, or Search+Tab on Chromebook devices, to navigate from one cluster to another. Good examples of clusters include: side panels, navigation bars, main content areas, and elements that could contain many child elements.</p> <figure id="fig-kb-nav-cluster" class="attempt-right"> <img src="/static/images/about/versions/oreo/keyboard-navigation-clusters.png" width="300" alt="An example activity that includes five navigation clusters that the user can navigate using the keyboard navigation cluster shortcut. The clusters appear in the following arrangement: top panel, left side panel, main content area, bottom panel, and floating action button." /> <figcaption><b>Figure 2.</b> Activity containing 5 navigation clusters</figcaption> </figure> <p>To make a <code translate="no" dir="ltr"><a href="/reference/android/view/View">View</a></code> or <code translate="no" dir="ltr"><a href="/reference/android/view/ViewGroup">ViewGroup</a></code> element a cluster, set the <a href="/reference/android/view/View#attr_android:keyboardNavigationCluster"> <code translate="no" dir="ltr">android:keyboardNavigationCluster</code></a> attribute to <code translate="no" dir="ltr">true</code> in the element's layout XML file, or pass <code translate="no" dir="ltr">true</code> into <code translate="no" dir="ltr"><a href="/reference/android/view/View#setKeyboardNavigationCluster(boolean)">setKeyboardNavigationCluster()</a></code> in your app's UI logic.</p> <p class="note"><b>Note:</b> Clusters cannot be nested, although non-nested clusters may appear at different levels of the hierarchy. If you attempt to nest clusters, the framework treats only the top-most <code translate="no" dir="ltr"><a href="/reference/android/view/ViewGroup">ViewGroup</a></code> element as a cluster.</p> <p>On devices that have touchscreens, you can set a cluster-designated <code translate="no" dir="ltr"><a href="/reference/android/view/ViewGroup">ViewGroup</a></code> object's <code translate="no" dir="ltr">android:touchscreenBlocksFocus</code> element to <code translate="no" dir="ltr">true</code> to allow cluster-only navigation into and out of that cluster. If you apply this configuration to a cluster, users cannot use the Tab key or arrow keys to navigate into or out of the cluster; they must press the cluster navigation keyboard combination instead.</p> <h4 id="vdf" data-text="View default focus" tabindex="-1">View default focus</h4> <p>In Android 8.0 (API level 26), you can assign the <code translate="no" dir="ltr"><a href="/reference/android/view/View">View</a></code> that should receive focus after a (re)created activity is resumed and the user presses a keyboard navigation key, such as the tab key. To apply this "focused by default" setting, set a <code translate="no" dir="ltr"><a href="/reference/android/view/View">View</a></code> element's <a href="/reference/android/view/View#attr_android:focusedByDefault"> <code translate="no" dir="ltr">android:focusedByDefault</code></a> attribute to <code translate="no" dir="ltr">true</code> in the layout XML file containing the UI element, or pass in <code translate="no" dir="ltr">true</code> to <code translate="no" dir="ltr"><a href="/reference/android/view/View#setFocusedByDefault(boolean)">setFocusedByDefault()</a></code> in your app's UI logic.</p> <h3 id="tts" data-text="Speech output" tabindex="-1">Speech output</h3> <p>Activities and services can use instances of <code translate="no" dir="ltr"><a href="/reference/android/speech/tts/TextToSpeech">TextToSpeech</a></code> to dictate and pronounce content. As of Android 8.0 (API level 26), your app can obtain more precise timing information about when a text-to-speech engine begins speaking individual synthesized words, as long as the engine provides this information. You can use this functionality to call attention to specific words as the text-to-speech engine speaks them.</p> <p>To use these text-to-speech engine improvements in your app, register an instance of <code translate="no" dir="ltr"><a href="/reference/android/speech/tts/UtteranceProgressListener">UtteranceProgressListener</a></code>. As part of the registration process, include a handler for the <code translate="no" dir="ltr"><a href="/reference/android/speech/tts/UtteranceProgressListener#onRangeStart(java.lang.String, int, int, int)">onRangeStart()</a></code> method.</p> <p>The text-to-speech engine calls <code translate="no" dir="ltr"><a href="/reference/android/speech/tts/SynthesisCallback#rangeStart(int, int, int)">rangeStart()</a></code> to record the point in time at which it expects audio playback of a specific range of text to start. When the audio for that text range starts playback, your app's <code translate="no" dir="ltr"><a href="/reference/android/speech/tts/UtteranceProgressListener#onRangeStart(java.lang.String, int, int, int)">onRangeStart()</a></code> method executes. Your app can then respond to this callback, such as by highlighting the text range that's associated with the utterance.</p> <p>For more information about tracking the playback progress of a text-to-speech engine, see the <code translate="no" dir="ltr"><a href="/reference/android/speech/tts/UtteranceProgressListener">UtteranceProgressListener</a></code> class reference.</p> <h2 id="sys" data-text="System" tabindex="-1">System</h2> <h3 id="strictmode" data-text="New StrictMode detectors" tabindex="-1">New StrictMode detectors</h3> <p>Android 8.0 (API level 26) adds three new StrictMode detectors to help identify potential bugs in your app:</p> <ul> <li><code translate="no" dir="ltr"><a href="/reference/android/os/StrictMode.ThreadPolicy.Builder#detectUnbufferedIo()">detectUnbufferedIo()</a></code> will detect when your app reads or writes data without buffering, which can drastically impact performance.</li> <li><code translate="no" dir="ltr"><a href="/reference/android/os/StrictMode.VmPolicy.Builder#detectContentUriWithoutPermission()">detectContentUriWithoutPermission()</a></code> will detect when your app accidentally forgets to grant permissions to another app when starting an Activity outside your app.</li> <li><code translate="no" dir="ltr"><a href="/reference/android/os/StrictMode.VmPolicy.Builder#detectUntaggedSockets()">detectUntaggedSockets()</a></code> will detect when your app performs network traffic without using <code translate="no" dir="ltr"><a href="/reference/android/net/TrafficStats#setThreadStatsTag(int)">setThreadStatsTag(int)</a></code> to tag your traffic for debugging purposes.</li> </ul> <h3 id="cache" data-text="Cached data" tabindex="-1">Cached data</h3> <p>Android 8.0 (API level 26) gives better guidance and behaviors around cached data. Each app is now given a disk space quota for cached data, as returned by <code translate="no" dir="ltr"><a href="/reference/android/os/storage/StorageManager#getCacheQuotaBytes(java.util.UUID)">getCacheQuotaBytes(UUID)</a></code>.</p> <p>When the system needs to free up disk space, it will start by deleting cached files from apps that are the most over their allocated quota. Thus, if you keep your cached data under your allocated quota, your cached files will be some of the last on the system to be cleared when necessary. When the system is deciding what cached files to delete inside your app, it will consider the oldest files first (as determined by modified time).</p> <p>There are also two new behaviors that you can enable on a per-directory basis to control how the system frees up your cached data:</p> <ul> <li><code translate="no" dir="ltr">StorageManager.setCacheBehaviorAtomic()</code> can be used to indicate that a directory and all of its contents should be deleted as a single atomic unit.</li> <li><code translate="no" dir="ltr"><a href="/reference/android/os/storage/StorageManager#setCacheBehaviorTombstone(java.io.File, boolean)">setCacheBehaviorTombstone(File, boolean)</a></code> can be used to indicate that instead of deleting files inside a directory, they should be truncated to be 0 bytes in length, leaving the empty file intact.</li> </ul> <p>Finally, when you need to allocate disk space for large files, consider using the new <code translate="no" dir="ltr"><a href="/reference/android/os/storage/StorageManager#allocateBytes(java.io.FileDescriptor, long)">allocateBytes(FileDescriptor, long)</a></code> API, which will automatically clear cached files belonging to other apps (as needed) to meet your request. When deciding if the device has enough disk space to hold your new data, call <code translate="no" dir="ltr"><a href="/reference/android/os/storage/StorageManager#getAllocatableBytes(java.util.UUID)">getAllocatableBytes(UUID)</a></code> instead of using <code translate="no" dir="ltr"><a href="/reference/java/io/File#getUsableSpace()">getUsableSpace()</a></code>, since the former will consider any cached data that the system is willing to clear on your behalf.</p> <h3 id="cpp" data-text="Content provider paging" tabindex="-1">Content provider paging</h3> <p> We've updated content providers to include support for loading a large dataset one page at a time. For example, a photo app with many thousands of images can query for a subset of the data to present in a page. Each page of results returned by a content provider is represented by a single Cursor object. Both a client and a provider must implement paging to make use of this feature. </p> <p> For detailed information about the changes to content providers, see <code translate="no" dir="ltr"><a href="/reference/android/content/ContentProvider">ContentProvider</a></code> and <code translate="no" dir="ltr"><a href="/reference/android/content/ContentProviderClient">ContentProviderClient</a></code>. </p> <h3 id="crr" data-text="Content refresh requests" tabindex="-1">Content refresh requests</h3> <p>The <code translate="no" dir="ltr"><a href="/reference/android/content/ContentProvider">ContentProvider</a></code> and <code translate="no" dir="ltr"><a href="/reference/android/content/ContentResolver">ContentResolver</a></code> classes now each include a <code translate="no" dir="ltr">refresh()</code> method, making it easier for clients to know whether the information they request is up-to-date.</p> <p>You can add custom content refreshing logic by extending <code translate="no" dir="ltr"><a href="/reference/android/content/ContentProvider">ContentProvider</a></code>. Make sure that you override the <code translate="no" dir="ltr"><a href="/reference/android/content/ContentProvider#refresh(android.net.Uri, android.os.Bundle, android.os.CancellationSignal)">refresh()</a></code> method to return <code translate="no" dir="ltr">true</code>, indicating to your provider's clients that you've attempted to refresh the data yourself.</p> <p>Your client app can explicitly request refreshed content by calling a different method, also called <code translate="no" dir="ltr"><a href="/reference/android/content/ContentResolver#refresh(android.net.Uri, android.os.Bundle, android.os.CancellationSignal)">refresh()</a></code>. When calling this method, pass in the URI of the data to refresh.</p> <p class="note"><b>Note:</b> Because you may be requesting data over a network, you should invoke <code translate="no" dir="ltr"><a href="/reference/android/content/ContentResolver#refresh(android.net.Uri, android.os.Bundle, android.os.CancellationSignal)">refresh()</a></code> from the client side only when there's a strong indication that the content is stale. The most common reason to perform this type of content refresh is in response to a <a href="/training/swipe/add-swipe-interface">swipe-to-refresh</a> gesture, explicitly requesting the current UI to display up-to-date content.</p> <h3 id="jobscheduler" data-text="JobScheduler improvements" tabindex="-1">JobScheduler improvements</h3> <p> Android 8.0 (API level 26) introduces a number of improvements to <code translate="no" dir="ltr"><a href="/reference/android/app/job/JobScheduler">JobScheduler</a></code>. These improvements make it easier for your app to comply with the new <a href="/about/versions/oreo/background">background execution limits</a>, since you can generally use scheduled jobs to replace the now-restricted background services or implicit broadcast receivers. </p> <p> Updates to <code translate="no" dir="ltr"><a href="/reference/android/app/job/JobScheduler">JobScheduler</a></code> include: </p> <ul> <li> You can now associate a work queue with a scheduled job. To add a work item to a job's queue, call <a href="/reference/android/app/job/JobScheduler#enqueue(android.app.job.JobInfo,%20android.app.job.JobWorkItem)"><code translate="no" dir="ltr">JobScheduler.enqueue()</code></a>. When the job is running, it can take pending work off the queue and process it. This functionality handles many of the use cases that previously would have called for starting a background service, particulary services that implement <code translate="no" dir="ltr"><a href="/reference/android/app/IntentService">IntentService</a></code>. </li> <li> <a href="/topic/libraries/support-library/revisions#26-0-0">Android Support Library 26.0.0</a> introduces a new <code translate="no" dir="ltr"><a href="/reference/android/support/v4/app/JobIntentService">JobIntentService</a></code> class, which provides the same functionality as <code translate="no" dir="ltr"><a href="/reference/android/app/IntentService">IntentService</a></code> but uses jobs instead of services when running on Android 8.0 (API level 26) or higher. </li> <li> You can now call <a href="/reference/android/app/job/JobInfo.Builder#setClipData(android.content.ClipData,%20int)"><code translate="no" dir="ltr">JobInfo.Builder.setClipData()</code></a> to associate a <code translate="no" dir="ltr"><a href="/reference/android/content/ClipData">ClipData</a></code> with a job. This option enables you to associate URI permission grants with a job, similarly to how these permissions can be propagated to <code translate="no" dir="ltr"><a href="/reference/android/content/Context#startService(android.content.Intent)">Context.startService()</a></code>. You can also use URI permission grants with intents on work queues. </li> <li> Scheduled jobs now support several new constraints: <dl> <dt><a href="/reference/android/app/job/JobInfo#isRequireStorageNotLow()"><code translate="no" dir="ltr">JobInfo.isRequireStorageNotLow()</code></a></dt> <dd>Job does not run if the device's available storage is low.</dd> <dt><a href="/reference/android/app/job/JobInfo#isRequireBatteryNotLow()"><code translate="no" dir="ltr">JobInfo.isRequireBatteryNotLow()</code></a></dt> <dd>Job does not run if the battery level is at or below the critical threshold; this is the level at which the device shows the <b>Low battery warning</b> system dialog.</dd> <dt><a href="/reference/android/app/job/JobInfo#NETWORK_TYPE_METERED"><code translate="no" dir="ltr">NETWORK_TYPE_METERED</code></a></dt> <dd>Job requires a metered network connection, like most cellular data plans.</dd> </dl> </li> </ul> <h3 id="data-store" data-text="Custom data store" tabindex="-1">Custom data store</h3> <p> Android 8.0 (API level 26) lets you provide a custom data store to your preferences, which can be useful if your app stores the preferences in a cloud or local database, or if the preferences are device-specific. For more information about implementing the data store, refer to <a href="/guide/topics/ui/settings">Custom Data Store</a>. </p> <h2 id="me" data-text="Media enhancements" tabindex="-1">Media enhancements</h2> <h3 id="media-vs" data-text="VolumeShaper" tabindex="-1">VolumeShaper</h3> <p>There is a new <code translate="no" dir="ltr"><a href="/reference/android/media/VolumeShaper">VolumeShaper</a></code> class. Use it to perform short automated volume transitions like fade-ins, fade-outs, and cross fades. See <a href="/guide/topics/media/volumeshaper">Controlling Amplitude with VolumeShaper</a> to learn more.</p> <h3 id="media-af" data-text="Audio focus enhancements" tabindex="-1">Audio focus enhancements</h3> <p>Audio apps share the audio output on a device by requesting and abandoning audio focus. An app handles changes in focus by starting or stopping playback, or ducking its volume. There is a new <code translate="no" dir="ltr"><a href="/reference/android/media/AudioFocusRequest">AudioFocusRequest</a></code> class. Using this class as the parameter of <code translate="no" dir="ltr"><a href="/reference/android/media/AudioManager#requestAudioFocus(android.media.AudioFocusRequest)">requestAudioFocus()</a></code>, apps have new capabilites when handling changes in audio focus: <a href="/guide/topics/media-apps/audio-focus#automatic-ducking">automatic ducking</a> and <a href="/guide/topics/media-apps/audio-focus#delayed-focus-gain">delayed focus gain</a>. </p> <h3 id="mm" data-text="Media metrics" tabindex="-1">Media metrics</h3> <p> A new <code translate="no" dir="ltr">getMetrics()</code> method returns a <code translate="no" dir="ltr"><a href="/reference/android/os/PersistableBundle">PersistableBundle</a></code> object containing configuration and performance information, expressed as a map of attributes and values. The <code translate="no" dir="ltr">getMetrics()</code> method is defined for these media classes: </p> <ul> <li><code translate="no" dir="ltr"><a href="/reference/android/media/MediaPlayer#getMetrics()">MediaPlayer.getMetrics()</a></code></li> <li><code translate="no" dir="ltr"><a href="/reference/android/media/MediaRecorder#getMetrics()">MediaRecorder.getMetrics()</a></code></li> <li><code translate="no" dir="ltr"><a href="/reference/android/media/MediaCodec#getMetrics()">MediaCodec.getMetrics()</a></code></li> <li><code translate="no" dir="ltr"><a href="/reference/android/media/MediaExtractor#getMetrics()">MediaExtractor.getMetrics()</a></code></li> </ul> <p> Metrics are collected separately for each instance and persist for the lifetime of the instance. If no metrics are available the method returns null. The actual metrics returned depend on the class. </p> <h3 id="mp" data-text="MediaPlayer" tabindex="-1">MediaPlayer</h3> <p>Starting in Android 8.0 (API level 26) MediaPlayer can playback <a href="/guide/topics/media/mediaplayer#drm">DRM-protected</a> material and <a href="/guide/topics/media/mediaplayer#encryption">HLS sample-level encrypted media</a>.</p> <p>Android 8.0 introduces a new overloaded <code translate="no" dir="ltr"><a href="/reference/android/media/MediaPlayer#seekTo(long, int)">seekTo()</a></code> command that provides fine-grained control when seeking to a frame. It includes a second parameter that specifies a seek mode:</p> <ul> <li><code translate="no" dir="ltr"><a href="/reference/android/media/MediaPlayer#SEEK_PREVIOUS_SYNC">SEEK_PREVIOUS_SYNC</a></code> moves the media position to a sync (or key) frame associated with a data source that is located right before or at the given time.</li> <li><code translate="no" dir="ltr"><a href="/reference/android/media/MediaPlayer#SEEK_NEXT_SYNC">SEEK_NEXT_SYNC</a></code> moves the media position to a sync (or key) frame associated with a data source that is located right after or at the given time.</li> <li><code translate="no" dir="ltr"><a href="/reference/android/media/MediaPlayer#SEEK_CLOSEST_SYNC">SEEK_CLOSEST_SYNC</a></code> moves the media position to a sync (or key) frame associated with a data source that is located closest to or at the given time.</li> <li><code translate="no" dir="ltr"><a href="/reference/android/media/MediaPlayer#SEEK_CLOSEST">SEEK_CLOSEST</a></code> moves the media position to a frame (<em>not necessarily a sync or key frame</em>) associated with a data source that is located closest to or at the given time.</li> </ul> <p>When seeking continuously, apps should use any of the <code translate="no" dir="ltr">SEEK_</code> modes rather than <code translate="no" dir="ltr"><a href="/reference/android/media/MediaPlayer#SEEK_CLOSEST">SEEK_CLOSEST</a></code>, which runs relatively slower but can be more precise.</p> <h3 id="mr" data-text="MediaRecorder" tabindex="-1">MediaRecorder</h3> <ul> <li>MediaRecorder now supports the MPEG2_TS format which is useful for streaming: <div> <div class="ds-selector-tabs"><section><h3 id="kotlin" data-text="Kotlin" tabindex="-1">Kotlin</h3> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="Kotlin"><span class="devsite-syntax-n">mediaRecorder</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-na">setOutputFormat</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-n">MediaRecorder</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-na">OutputFormat</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-na">MPEG_2_TS</span><span class="devsite-syntax-p">)</span></pre></devsite-code> </section><section><h3 id="java" data-text="Java" tabindex="-1">Java</h3> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="Java"><span class="devsite-syntax-n">mediaRecorder</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-na">setOutputFormat</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-n">MediaRecorder</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-na">OutputFormat</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-na">MPEG_2_TS</span><span class="devsite-syntax-p">);</span></pre></devsite-code> </section></div> </div> <p> see <code translate="no" dir="ltr"><a href="/reference/android/media/MediaRecorder.OutputFormat">MediaRecorder.OutputFormat</a></code></p> </li> <li>The <code translate="no" dir="ltr"><a href="/reference/android/media/MediaMuxer">MediaMuxer</a></code> can now handle any number of audio and video streams. You are no longer limited to one audio track and/or one video track. Use <code translate="no" dir="ltr"><a href="/reference/android/media/MediaMuxer#addTrack(android.media.MediaFormat)">addTrack()</a></code> to mix as many tracks as you like.</li> <li>The <code translate="no" dir="ltr"><a href="/reference/android/media/MediaMuxer">MediaMuxer</a></code> can also add one or more metadata tracks containing user-defined per-frame information. The format of the metadata is defined by your application. The metadata track is only supported for MP4 containers.</li> </ul> <p> Metadata can be useful for offline processing. For example, gyro signals from the sensor could be used to perform video stabilization. </p> <p> When adding a metadata track, the track's mime format must start with the prefix "application/". Writing metadata is the same as writing video/audio data except that the data does not come from a <code translate="no" dir="ltr">MediaCodec</code>. Instead, the app passes a <code translate="no" dir="ltr">ByteBuffer</code> with an associated timestamp to the <code translate="no" dir="ltr"><a href="/reference/android/media/MediaMuxer#writeSampleData(int, java.nio.ByteBuffer, android.media.MediaCodec.BufferInfo)">writeSampleData()</a></code> method. The timestamp must be in the same time base as the video and audio tracks. </p> <p> The generated MP4 file uses the <code translate="no" dir="ltr">TextMetaDataSampleEntry</code> defined in section 12.3.3.2 of the ISOBMFF to signal the metadata's mime format. When using <code translate="no" dir="ltr"><a href="/reference/android/media/MediaExtractor">MediaExtractor</a></code> to extract the file with metadata track, the mime format of the metadata will be extracted into <code translate="no" dir="ltr"><a href="/reference/android/media/MediaFormat">MediaFormat</a></code>. </p> <h3 id="imfa" data-text="Improved media file access" tabindex="-1">Improved media file access</h3> <p> The <a href="/guide/topics/providers/document-provider"> Storage Access Framework (SAF)</a> allows apps to expose a custom <code translate="no" dir="ltr"><a href="/reference/android/provider/DocumentsProvider">DocumentsProvider</a></code>, which can provide access to files in a data source to other apps. In fact, a documents provider can even provide access to files that reside on network storage or that use a protocol like <a href="https://en.wikipedia.org/wiki/Media_Transfer_Protocol">Media Transfer Protocol (MTP)</a>. </p> <p> However, accessing large media files from a remote data source introduces some challenges:</p> <ul> <li>Media players require seekable access to a file from a documents provider. In cases where a large media file resides on a remote data source, the documents provider must fetch all of the data in advance and create a snapshot file descriptor. The media player cannot play the file without the file descriptor, thus playback cannot begin until the documents provider finishes downloading the file.</li> <li>Media collection managers, such as photo apps, must traverse a series of access URIs to reach media that's stored on an external SD card via scoped folders. This access pattern makes mass operations on media—such as moving, copying, and deleting—quite slow.</li> <li>Media collection managers cannot determine a document's location given its URI. This makes it difficult for these types of apps to allow users to choose where to save a media file.</li> </ul> <p> Android 8.0 addresses each of these challenges by improving the Storage Access Framework.</p> <h4 id="custom-dp" data-text="Custom document providers" tabindex="-1">Custom document providers</h4> <p> Starting in Android 8.0, the Storage Access Framework allows <a href="/guide/topics/providers/create-document-provider">custom documents providers</a> to create seekable file descriptors for files residing in a remote data source. The SAF can open a file to get a native seekable file descriptor. The SAF then delivers discrete bytes requests to the documents provider. This feature allows a documents provider to return the exact range of bytes that a media player app has requested instead of caching the entire file in advance. </p> <p> To use this feature, you need to call the new <code translate="no" dir="ltr"><a href="/reference/android/os/storage/StorageManager#openProxyFileDescriptor(int, android.os.ProxyFileDescriptorCallback, android.os.Handler)">StorageManager.openProxyFileDescriptor()</a></code> method. The <code translate="no" dir="ltr"><a href="/reference/android/os/storage/StorageManager#openProxyFileDescriptor(int, android.os.ProxyFileDescriptorCallback, android.os.Handler)">openProxyFileDescriptor()</a></code> method accepts a <code translate="no" dir="ltr"><a href="/reference/android/os/ProxyFileDescriptorCallback">ProxyFileDescriptorCallback</a></code> object as a callback. The SAF invokes the callback any time a client application performs file operations on the file descriptor returned from the documents provider. </p> <h4 id="dda" data-text="Direct document access" tabindex="-1">Direct document access</h4> <p> As of Android 8.0 (API level 26), you can use the <code translate="no" dir="ltr"><a href="/reference/android/provider/MediaStore#getDocumentUri(android.content.Context, android.net.Uri)">getDocumentUri()</a></code> method to get a URI that references the same document as the given <code translate="no" dir="ltr">mediaUri</code>. However, because the returned URI is backed by a <code translate="no" dir="ltr"><a href="/reference/android/provider/DocumentsProvider">DocumentsProvider</a></code>, media collection managers can access the document directly, without having to traverse trees of scoped directories. As a result, the media managers can perform file operations on the document significantly more quickly. </p> <p class="caution"> <b>Caution:</b> The <code translate="no" dir="ltr"><a href="/reference/android/provider/MediaStore#getDocumentUri(android.content.Context, android.net.Uri)">getDocumentUri()</a></code> method only locates media files; it doesn't grant apps permission to access those files. To learn more about how to obtain access permission to media files, see the reference documentation. </p> <h4 id="ptd" data-text="Paths to documents" tabindex="-1">Paths to documents</h4> <p> When using the Storage Access Framework in Android 8.0 (API level 26), you can use the <code translate="no" dir="ltr">findDocumentPath()</code> method, available in both the <code translate="no" dir="ltr"><a href="/reference/android/provider/DocumentsContract#findDocumentPath(android.content.ContentResolver, android.net.Uri)">DocumentsContract</a></code> and <code translate="no" dir="ltr"><a href="/reference/android/provider/DocumentsProvider#findDocumentPath(java.lang.String, java.lang.String)">DocumentsProvider</a></code> classes, to determine the path from the root of a file system given a document's ID. The method returns this path in a <code translate="no" dir="ltr"><a href="/reference/android/provider/DocumentsContract.Path">DocumentsContract.Path</a></code> object. In cases where a file system has multiple defined paths to the same document, the method returns the path that is used most often to reach the document with the given ID. </p> <p> This functionality is particularly useful in the following scenarios: </p> <ul> <li>Your app uses a "save as" dialog that displays the location of a particular document. <li>Your app shows folders in a search results view and must load the child documents that are within a particular folder if the user selects that folder.</li> </ul> <p class="note"> <b>Note:</b> If your app has permission to access only some of the documents in the path, the return value of <code translate="no" dir="ltr">findDocumentPath()</code> includes only the folders and documents that your app can access. </p> <h3 id="mapb" data-text="Monitoring audio playback" tabindex="-1">Monitoring audio playback</h3> <p>The <code translate="no" dir="ltr"><a href="/reference/android/media/AudioManager">AudioManager</a></code> system service maintains a list of active <code translate="no" dir="ltr"><a href="/reference/android/media/AudioPlaybackConfiguration">AudioPlaybackConfiguration</a></code> objects, each of which contains information about a particular audio playback session. Your app can retrieve the set of currently-active configurations by calling <code translate="no" dir="ltr"><a href="/reference/android/media/AudioManager#getActivePlaybackConfigurations()">getActivePlaybackConfigurations()</a></code>.</p> <p>As of Android 8.0 (API level 26), you can register a callback that notifies your app when one or more <code translate="no" dir="ltr"><a href="/reference/android/media/AudioPlaybackConfiguration">AudioPlaybackConfiguration</a></code> objects has changed. To do so, call <code translate="no" dir="ltr"><a href="/reference/android/media/AudioManager#registerAudioPlaybackCallback(android.media.AudioManager.AudioPlaybackCallback, android.os.Handler)">registerAudioPlaybackCallback()</a></code>, passing in an instance of <code translate="no" dir="ltr"><a href="/reference/android/media/AudioManager.AudioPlaybackCallback">AudioManager.AudioPlaybackCallback</a></code>. The <code translate="no" dir="ltr">AudioManager.AudioPlaybackCallback</code> class contains the <code translate="no" dir="ltr"><a href="/reference/android/media/AudioManager.AudioPlaybackCallback#onPlaybackConfigChanged(java.util.List<android.media.AudioPlaybackConfiguration>)">onPlaybackConfigChanged()</a></code> method, which the system calls when the audio playback configuration changes. <h2 id="cs" data-text="Connectivity" tabindex="-1">Connectivity</h2> <h3 id="aware" data-text="Wi-Fi Aware" tabindex="-1">Wi-Fi Aware</h3> <p> Android 8.0 (API level 26) adds support for Wi-Fi Aware, which is based on the Neighbor Awareness Networking (NAN) specification. On devices with the appropriate Wi-Fi Aware hardware, apps and nearby devices can discover and communicate over Wi-Fi without an Internet access point. We're working with our hardware partners to bring Wi-Fi Aware technology to devices as soon as possible. For information on how to integrate Wi-Fi Aware into your app, see <a href="/guide/topics/connectivity/wifi-aware">Wi-Fi Aware</a>. </p> <h3 id="bt" data-text="Bluetooth" tabindex="-1">Bluetooth</h3> <p> Android 8.0 (API level 26) enriches the platform's Bluetooth support by adding the following features: </p> <ul> <li>Support for the AVRCP 1.4 standard, which enables song-library browsing. </li> <li>Support for the Bluetooth Low-Energy (BLE) 5.0 standard.</li> <li>Integration of the Sony LDAC codec into the Bluetooth stack.</li> </ul> <h3 id="cdp" data-text="Companion device pairing" tabindex="-1">Companion device pairing</h3> <p>Android 8.0 (API level 26) provides APIs that allow you to customize the pairing request dialog when trying to pair with companion devices over Bluetooth, BLE, and Wi-Fi. For more information, see <a href="/guide/topics/connectivity/companion-device-pairing">Companion Device Pairing</a>.</p> <p>For more information about using Bluetooth on Android, see the <a href="/guide/topics/connectivity/bluetooth">Bluetooth</a> guide. For changes to Bluetooth that are specific to Android 8.0 (API level 26), see the <a href="/about/versions/oreo/behavior-changes#bt">Bluetooth</a> section of the <a href="/about/versions/oreo/behavior-changes">Android 8.0 Behavior Changes</a> page. </p> <h2 id="sh" data-text="Sharing" tabindex="-1">Sharing</h2> <h3 id="smsh" data-text="Smart sharing" tabindex="-1">Smart sharing</h3> <p> Android 8.0 (API level 26) learns about users' personalized sharing preferences and better understands for each type of content which are the right apps to share with. For example, if a user takes a photo of a receipt, Android 8.0 can suggest an expense-tracking app; if the user takes a selfie, a social media app can better handle the image. Android 8.0 automatically learns all these patterns according to users' personalized preferences. </p> <p> Smart sharing works for types of content other than <code translate="no" dir="ltr">image</code>, such as <code translate="no" dir="ltr">audio</code>, <code translate="no" dir="ltr">video</code>, <code translate="no" dir="ltr">text</code>, <code translate="no" dir="ltr">URL</code>, etc. </p> <p> To enable Smart sharing, add an <code translate="no" dir="ltr"><a href="/reference/java/util/ArrayList">ArrayList</a></code> of up to three string annotations to the intent that shares the content. The annotations should describe the major components or topics in the content. The following code example shows how to add annotations to the intent: </p> <div> <div class="ds-selector-tabs"><section><h3 id="kotlin" data-text="Kotlin" tabindex="-1">Kotlin</h3> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="Kotlin"><span class="devsite-syntax-kd">val</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nv">annotations</span><span class="devsite-syntax-p">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">ArrayList<String></span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">arrayListOf</span><span class="devsite-syntax-p">(</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-s">"topic1"</span><span class="devsite-syntax-p">,</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-s">"topic2"</span><span class="devsite-syntax-p">,</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-s">"topic3"</span> <span class="devsite-syntax-p">)</span> <span class="devsite-syntax-n">intent</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-na">putStringArrayListExtra</span><span class="devsite-syntax-p">(</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">Intent</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-na">EXTRA_CONTENT_ANNOTATIONS</span><span class="devsite-syntax-p">,</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">annotations</span> <span class="devsite-syntax-p">)</span></pre></devsite-code> </section><section><h3 id="java" data-text="Java" tabindex="-1">Java</h3> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="Java"><span class="devsite-syntax-n">ArrayList<String></span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">annotations</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-k">new</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">ArrayList</span><><span class="devsite-syntax-p">();</span> <span class="devsite-syntax-n">annotations</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-na">add</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s">"topic1"</span><span class="devsite-syntax-p">);</span> <span class="devsite-syntax-n">annotations</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-na">add</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s">"topic2"</span><span class="devsite-syntax-p">);</span> <span class="devsite-syntax-n">annotations</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-na">add</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s">"topic3"</span><span class="devsite-syntax-p">);</span> <span class="devsite-syntax-n">intent</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-na">putStringArrayListExtra</span><span class="devsite-syntax-p">(</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">Intent</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-na">EXTRA_CONTENT_ANNOTATIONS</span><span class="devsite-syntax-p">,</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">annotations</span> <span class="devsite-syntax-p">);</span></pre></devsite-code> </section></div> </div> <p> For detailed information about Smart sharing annotations, see <code translate="no" dir="ltr"><a href="/reference/android/content/Intent#EXTRA_CONTENT_ANNOTATIONS">EXTRA_CONTENT_ANNOTATIONS</a></code>. </p> <h3 id="sts" data-text="Text classifier" tabindex="-1">Text classifier</h3> <p>On compatible devices, apps can use a new Text Classifier to check whether a string matches a known classifier entity type and get suggested selection alternatives. Entities recognized by the system include addresses, URLs, telephone numbers, and email addresses. For more information, see <code translate="no" dir="ltr"><a href="/reference/android/view/textclassifier/TextClassifier">TextClassifier</a></code>.</p> <h2 id="a11y" data-text="Accessibility" tabindex="-1">Accessibility</h2> <!-- Anchors preserved for compatibility --> <a id="ld"></a> <a id="ab"></a> <a id="iva"></a> <a id="fg"></a> <a id="wlh"></a> <a id="sosrv"></a> <a id="ht"></a> <a id="cgd"></a> <p>Android 8.0 (API level 26) supports several new accessibility features for developers who create their own accessibility services:</p> <ul> <li>A new volume category for adjusting <a href="/guide/topics/ui/accessibility/services#volume">accessibility volume</a>.</li> <li><a href="/guide/topics/ui/accessibility/services#fingerprint">Fingerprint gestures</a> as an input mechanism.</li> <li><a href="/guide/topics/ui/accessibility/services#multilingual-tts">Multilingual text to speech</a> capabilities.</li> <li>A hardware-based <a href="/guide/topics/ui/accessibility/services#shortcut">accessibility shortcut</a> for quickly accessing a preferred accessibility service.</li> <li>Support for <a href="/guide/topics/ui/accessibility/services#continued-gestures">continued gestures</a>, or programmatic sequences of strokes.</li> <li>An <a href="/guide/topics/ui/accessibility/services#button">accessibility button</a> for invoking one of several enabled accessibility features (available only on devices that use a software-rendered navigation area).</li> <li><a href="/guide/topics/ui/accessibility/services#one-sided-range">Standardized one-sided range values</a>.</li> <li>Several features for <a href="/guide/topics/ui/accessibility/services#process-text">processing text</a> more easily, including hint text and locations of on-screen text characters.</li> </ul> To learn more about how to make your app more accessible, see <a href="/guide/topics/ui/accessibility">Accessibility</a>.</p> <h2 id="sp" data-text="Security & Privacy" tabindex="-1">Security & Privacy</h2> <h3 id="perms" data-text="Permissions" tabindex="-1">Permissions</h3> <p>Android 8.0 (API level 26) introduces several new permissions related to telephony:</p> <ul> <li>The <a href="/reference/android/Manifest.permission#ANSWER_PHONE_CALLS"> <code translate="no" dir="ltr">ANSWER_PHONE_CALLS</code></a> permission allows your app to answer incoming phone calls programmatically. To handle an incoming phone call in your app, you can use the <code translate="no" dir="ltr"><a href="/reference/android/telecom/TelecomManager#acceptRingingCall()">acceptRingingCall()</a></code> method.</li> <li>The <a href="/reference/android/Manifest.permission#READ_PHONE_NUMBERS"> <code translate="no" dir="ltr">READ_PHONE_NUMBERS</code></a> permission grants your app read access to the phone numbers stored in a device.</li> </ul> <p>These permission are both classified as <a href="/guide/topics/permissions/requesting#normal-dangerous">dangerous</a> and are both part of the <a href="/reference/android/Manifest.permission_group#PHONE"><code translate="no" dir="ltr">PHONE</code></a> permission group.</p> <h3 id="naa" data-text="New account access and discovery APIs" tabindex="-1">New account access and discovery APIs</h3> <p> Android 8.0 (API level 26) introduces several improvements to how apps get access to user accounts. For the accounts that they manage, authenticators can use their own policy to decide whether to hide accounts from, or reveal accounts to, an app. The Android system tracks applications which can access a particular account. </p> <p> In previous versions of Android, apps that wanted to track the list of user accounts had to get updates about all accounts, including accounts with unrelated types. Android 8.0 adds the <code translate="no" dir="ltr"><a href="/reference/android/accounts/AccountManager#addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean, java.lang.String[])">addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean, java.lang.String[])</a></code> method, which lets apps specify a list of account types for which account changes should be received. </p> <h4 id="api-changes" data-text="API changes" tabindex="-1">API changes</h4> <p> AccountManager provides six new methods to help authenticators manage which apps can see an account: </p> <ul> <li><code translate="no" dir="ltr"><a href="/reference/android/accounts/AccountManager#setAccountVisibility(android.accounts.Account, java.lang.String, int)">setAccountVisibility(android.accounts.Account, java.lang.String, int)</a></code>: Sets the level of visibility for a specific user account and package combination. </li> <li> <code translate="no" dir="ltr"><a href="/reference/android/accounts/AccountManager#getAccountVisibility(android.accounts.Account, java.lang.String)">getAccountVisibility(android.accounts.Account, java.lang.String)</a></code>: Gets the level of visibility for a specific user account and package combination. </li> <li> <code translate="no" dir="ltr"><a href="/reference/android/accounts/AccountManager#getAccountsAndVisibilityForPackage(java.lang.String, java.lang.String)">getAccountsAndVisibilityForPackage(java.lang.String, java.lang.String)</a></code>: Allows authenticators to get the accounts and levels of visibility for a given package. </li> <li> <code translate="no" dir="ltr"><a href="/reference/android/accounts/AccountManager#getPackagesAndVisibilityForAccount(android.accounts.Account)">getPackagesAndVisibilityForAccount(android.accounts.Account)</a></code>: Allows authenticators to get stored visibility values for a given account. </li> <li> <code translate="no" dir="ltr"><a href="/reference/android/accounts/AccountManager#addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle, java.util.Map<java.lang.String, java.lang.Integer>)">addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle, java.util.Map<java.lang.String, java.lang.Integer>)</a></code>: Allows authenticators to initialize the visibility values of an account. </li> <li> <code translate="no" dir="ltr"><a href="/reference/android/accounts/AccountManager#addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean, java.lang.String[])">addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean, java.lang.String[])</a></code>: Adds an <code translate="no" dir="ltr"><a href="/reference/android/accounts/OnAccountsUpdateListener">OnAccountsUpdateListener</a></code> listener to the <code translate="no" dir="ltr"><a href="/reference/android/accounts/AccountManager">AccountManager</a></code> object. The system calls this listener whenever the list of accounts on the device changes. </li> </ul> <p> Android 8.0 (API level 26) introduces two special Package Name values to specify visibility levels for applications which were not set using the <code translate="no" dir="ltr"><a href="/reference/android/accounts/AccountManager#setAccountVisibility(android.accounts.Account, java.lang.String, int)">setAccountVisibility(android.accounts.Account, java.lang.String, int)</a></code> method. The <code translate="no" dir="ltr"><a href="/reference/android/accounts/AccountManager#PACKAGE_NAME_KEY_LEGACY_VISIBLE">PACKAGE_NAME_KEY_LEGACY_VISIBLE</a></code> visibility value is applied to apps that have the <code translate="no" dir="ltr"><a href="/reference/android/Manifest.permission#GET_ACCOUNTS">GET_ACCOUNTS</a></code> permission, and target versions of Android lower than Android 8.0, or whose signatures match the authenticator targeting any Android version. <code translate="no" dir="ltr"><a href="/reference/android/accounts/AccountManager#PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE">PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE</a></code> provides a default visibility value for apps which were not set previously and for which <code translate="no" dir="ltr"><a href="/reference/android/accounts/AccountManager#PACKAGE_NAME_KEY_LEGACY_VISIBLE">PACKAGE_NAME_KEY_LEGACY_VISIBLE</a></code> is not applicable. </p> <p> For more information about the new account access and discovery APIs, see the reference for <code translate="no" dir="ltr"><a href="/reference/android/accounts/AccountManager">AccountManager</a></code> and <code translate="no" dir="ltr"><a href="/reference/android/accounts/OnAccountsUpdateListener">OnAccountsUpdateListener</a></code>. </p> <h2 id="test" data-text="Testing" tabindex="-1">Testing</h2> <h3 id="instr" data-text="Instrumentation testing" tabindex="-1">Instrumentation testing</h3> <p>Android 8.0 (API level 26) provides the following pieces of additional support for your app's instrumentation tests.</p> <h4 id="run-against-non-default-app-processes" data-text="Run against non-default app processes" tabindex="-1">Run against non-default app processes</h4> <p>You can now specify that a particular instrumentation test should run against a process outside your app's default process. This configuration is useful if your app contains multiple activities that run in different processes.</p> <p>To define non-default process instrumentation, navigate to your manifest file, then to the desired <a href="/guide/topics/manifest/instrumentation-element"> <code translate="no" dir="ltr"><instrumentation></code></a> element. Add the <code translate="no" dir="ltr">android:targetProcess</code> attribute, and set its value to one of the following:</p> <ul> <li>The name of a particular process.</li> <li>A comma-separated list of process names.</li> <li>A wildcard (<code translate="no" dir="ltr">"*"</code>), which allows the instrumentation to run against any launched process that executes code in the package specified in the <code translate="no" dir="ltr">android:targetPackage</code> attribute.</li> </ul> <p>While your instrumentation test is executing, you can check which process it's testing by calling <code translate="no" dir="ltr"><a href="/reference/android/app/Instrumentation#getProcessName()">getProcessName()</a></code>.</p> <h4 id="report-results-during-a-test" data-text="Report results during a test" tabindex="-1">Report results during a test</h4> <p>You can now report results while your instrumentation test is executing, rather than afterward, by calling <code translate="no" dir="ltr"><a href="/reference/android/app/Instrumentation#addResults(android.os.Bundle)">addResults()</a></code>.</p> <h3 id="mit" data-text="Mock intents for tests" tabindex="-1">Mock intents for tests</h3> <p>To make it easier to create isolated, independent UI tests for your app's activities, Android 8.0 (API level 26) introduces the <code translate="no" dir="ltr"><a href="/reference/android/app/Instrumentation.ActivityMonitor#onStartActivity(android.content.Intent)">onStartActivity()</a></code> method. You override this method in a custom subclass of the <code translate="no" dir="ltr"><a href="/reference/android/app/Instrumentation.ActivityMonitor">Instrumentation.ActivityMonitor</a></code> class to handle a particular intent that your test class invokes.</p> <p>When your test class invokes the intent, the method returns a stub <code translate="no" dir="ltr"><a href="/reference/android/app/Instrumentation.ActivityResult">Instrumentation.ActivityResult</a></code> object instead of executing the intent itself. By using this mock intent logic in your tests, you can focus on how your activity prepares and handles the intent that you pass to a different activity or to an entirely different app.</p> <h2 id="rt" data-text="Runtime & Tools" tabindex="-1">Runtime & Tools</h2> <h3 id="art" data-text="Platform optimizations" tabindex="-1">Platform optimizations</h3> <p> Android 8.0 (API level 26) brings runtime and other optimizations to the platform that result in a number of performance improvements. These optimizations include concurrent-compaction garbage collection, more efficient use of memory, and code locality. </p> <p> These optimizations result in faster boot times, as well as better performance in both the OS and apps. </p> <h3 id="java" data-text="Updated Java language support" tabindex="-1">Updated Java language support</h3> <p>Android 8.0 (API level 26) adds support for several additional OpenJDK Java APIs:</p> <ul> <li><code translate="no" dir="ltr"><a href="/reference/java/time/package-summary">java.time</a></code> from OpenJDK 8.</li> <li><code translate="no" dir="ltr"><a href="/reference/java/nio/file/package-summary">java.nio.file</a></code> and <code translate="no" dir="ltr"><a href="/reference/java/lang/invoke/package-summary">java.lang.invoke</a></code> from OpenJDK 7.</li> </ul> <p>To learn more about the classes and methods within these newly-added packages, see the API reference documentation.</p> <p> If you want to <a href="/studio/preview/features/java8-support"> use Java 8 language features</a> in Android Studio, you should <a href="/studio/preview">download the latest preview version</a>. </p> <h3 id="icu4j" data-text="Updated ICU4J Android Framework APIs" tabindex="-1">Updated ICU4J Android Framework APIs</h3> <p>Android 8.0 (API level 26) extends the <a href="/guide/topics/resources/icu4j-framework">ICU4J Android Framework APIs</a>—which is a subset of the ICU4J APIs—for app developers to use under the <code translate="no" dir="ltr">android.icu</code> package. These APIs use localization data present on the device, so you can reduce your APK footprint by not compiling the ICU4J libraries in your APK. </p> <p class="table-caption"><strong>Table 1.</strong> ICU, CLDR, and Unicode versions used in Android.</p> <table> <tr> <th>Android API level</th> <th>ICU version</th> <th>CLDR version</th> <th>Unicode version</th> </tr> <tr> <td>Android 7.0 (API level 24), Android 7.1 (API level 25)</td> <td>56</td> <td>28</td> <td>8.0</td> </tr> <tr> <td>Android 8.0 (API level 26)</td> <td>58.2</td> <td>30.0.3</td> <td>9.0</td> </tr> </table> <p> For more information about internationalization on Android, including ICU4J support, see <a href="/guide/topics/resources/internationalization"> Internationalization on Android</a>. <h2 id="ae" data-text="Android enterprise" tabindex="-1">Android enterprise</h2> <p>New enterprise features and APIs have been introduced for devices running Android 8.0 (API level 26). Highlights include the following:</p> <ul> <li> Work profiles on fully managed devices let enterprises separate work from personal data, while managing both. </li> <li> API delegation allows device owners and profile owners to assign app management to other applications. </li> <li> User experience improvements in the provisioning flow (including new customization options) reduce the setup time. </li> <li> New controls over Bluetooth, Wi-Fi, backup, and security let enterprises manage more of the device. Network activity logging help enterprises track down problems. </li> </ul> <p>To learn more about these and other new Android enterprise APIs and features, see <a href="/work/versions/Android-8.0">Android in the Enterprise</a>.</p> <devsite-hats-survey class="nocontent" hats-id="VxqvKSur40kxBYCLVTd0SSGykbno" listnr-id="5207477"></devsite-hats-survey> </div> <devsite-recommendations display="in-page" hidden yield> </devsite-recommendations> <devsite-thumb-rating position="footer"> </devsite-thumb-rating> <devsite-recommendations id="recommendations-link" yield></devsite-recommendations> <div class="devsite-floating-action-buttons"> </div> </article> <devsite-content-footer class="nocontent"> <p>Content and code samples on this page are subject to the licenses described in the <a href="/license">Content License</a>. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.</p> <p>Last updated 2024-05-20 UTC.</p> </devsite-content-footer> <devsite-notification > </devsite-notification> <div class="devsite-content-data"> <template class="devsite-content-data-template"> [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-05-20 UTC."],[],[]] </template> </div> </devsite-content> </main> <devsite-footer-promos class="devsite-footer"> <nav class="devsite-footer-promos nocontent" aria-label="Promotions"> <ul class="devsite-footer-promos-list"> <li class="devsite-footer-promo"> <a href="//x.com/AndroidDev" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer X Promo" > <picture> <source class="devsite-dark-theme" srcset="https://developer.android.com/_static/android/images/logo-x_dt.svg" media="(prefers-color-scheme: dark)" loading="lazy" alt="X"> <img class="devsite-footer-promo-icon" src="/_static/android/images/logo-x.svg" loading="lazy" alt="X"> </picture> <span class="devsite-footer-promo-label"> X </span> </a> <div class="devsite-footer-promo-description">Follow @AndroidDev on X</div> </li> <li class="devsite-footer-promo"> <a href="//www.youtube.com/user/androiddevelopers" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer YouTube Promo" > <picture> <source class="devsite-dark-theme" srcset="https://developer.android.com/_static/android/images/logo-youtube_dt.svg" media="(prefers-color-scheme: dark)" loading="lazy" alt="YouTube"> <img class="devsite-footer-promo-icon" src="//www.gstatic.com/images/icons/material/product/2x/youtube_48dp.png" loading="lazy" alt="YouTube"> </picture> <span class="devsite-footer-promo-label"> YouTube </span> </a> <div class="devsite-footer-promo-description">Check out Android Developers on YouTube</div> </li> <li class="devsite-footer-promo"> <a href="//www.linkedin.com/showcase/androiddev" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer LinkedIn Promo" > <picture> <source class="devsite-dark-theme" srcset="https://developer.android.com/_static/android/images/logo-linkedin_dt.svg" media="(prefers-color-scheme: dark)" loading="lazy" alt="LinkedIn"> <img class="devsite-footer-promo-icon" src="/_static/android/images/logo-linkedin.svg" loading="lazy" alt="LinkedIn"> </picture> <span class="devsite-footer-promo-label"> LinkedIn </span> </a> <div class="devsite-footer-promo-description">Connect with the Android Developers community on LinkedIn</div> </li> </ul> </nav> </devsite-footer-promos> <devsite-footer-linkboxes class="devsite-footer"> <nav class="devsite-footer-linkboxes nocontent" aria-label="Footer links"> <ul class="devsite-footer-linkboxes-list"> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">More Android</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="//www.android.com" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Android </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//www.android.com/enterprise/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Android for Enterprise </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//www.android.com/security-center/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Security </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//source.android.com" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Source </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/news" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > News </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//android-developers.googleblog.com/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 6)" > Blog </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/podcasts" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 7)" > Podcasts </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Discover</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/games" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Gaming </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/ml" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Machine Learning </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/health-and-fitness" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Health & Fitness </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/media" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Camera & Media </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/privacy" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > Privacy </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/training/connectivity/5g" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 6)" > 5G </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Android Devices</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/large-screens" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Large screens </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/wear" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Wear OS </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/chrome-os" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > ChromeOS devices </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/cars" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Android for cars </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/tv" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > Android TV </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Releases</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/15" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Android 15 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/14" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Android 14 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/13" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Android 13 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/12" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Android 12 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/11" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > Android 11 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/10" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 6)" > Android 10 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/pie" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 7)" > Pie </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Documentation and Downloads</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/studio/intro" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Android Studio guide </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/guide" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Developers guides </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/reference" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > API reference </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/studio" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Download Studio </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/ndk" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > Android NDK </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Support</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="//issuetracker.google.com/issues/new?component=190923&template=841312" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Report platform bug </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//issuetracker.google.com/issues/new?component=192697" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Report documentation bug </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//support.google.com/googleplay/android-developer" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Google Play support </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://g.co/userresearch/androiddeveloperfooter" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Join research studies </a> </li> </ul> </li> </ul> </nav> </devsite-footer-linkboxes> <devsite-footer-utility class="devsite-footer"> <div class="devsite-footer-utility nocontent"> <nav class="devsite-footer-sites" aria-label="Other Google Developers websites"> <a href="https://developers.google.com/" class="devsite-footer-sites-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google Developers Link"> <picture> <source srcset="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup-google-for-developers-dark-theme.svg" media="(prefers-color-scheme: none)" class="devsite-dark-theme" loading="lazy" alt="Google Developers"> <img class="devsite-footer-sites-logo" src="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup-google-for-developers.svg" loading="lazy" alt="Google Developers"> </picture> </a> <ul class="devsite-footer-sites-list"> <li class="devsite-footer-sites-item"> <a href="//developer.android.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Android Link" > Android </a> </li> <li class="devsite-footer-sites-item"> <a href="//developer.chrome.com/home" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Chrome Link" > Chrome </a> </li> <li class="devsite-footer-sites-item"> <a href="//firebase.google.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Firebase Link" > Firebase </a> </li> <li class="devsite-footer-sites-item"> <a href="//cloud.google.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google Cloud Platform Link" > Google Cloud Platform </a> </li> <li class="devsite-footer-sites-item"> <a href="//developers.google.com/products/" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer All products Link" > All products </a> </li> </ul> </nav> <nav class="devsite-footer-utility-links" aria-label="Utility links"> <ul class="devsite-footer-utility-list"> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="//policies.google.com/privacy" data-category="Site-Wide Custom Events" data-label="Footer Privacy link" > Privacy </a> </li> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="/license" data-category="Site-Wide Custom Events" data-label="Footer License link" > License </a> </li> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="/distribute/marketing-tools/brand-guidelines" data-category="Site-Wide Custom Events" data-label="Footer Brand guidelines link" > Brand guidelines </a> </li> <li class="devsite-footer-utility-item glue-cookie-notification-bar-control"> <a class="devsite-footer-utility-link gc-analytics-event" href="#" data-category="Site-Wide Custom Events" data-label="Footer Manage cookies link" aria-hidden="true" > Manage cookies </a> </li> <li class="devsite-footer-utility-item devsite-footer-utility-button"> <span class="devsite-footer-utility-description">Get news and tips by email</span> <a class="devsite-footer-utility-link gc-analytics-event" href="/updates" data-category="Site-Wide Custom Events" data-label="Footer Subscribe link" > Subscribe </a> </li> </ul> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> </nav> </div> </devsite-footer-utility> <devsite-panel></devsite-panel> </section></section> <devsite-sitemask></devsite-sitemask> <devsite-snackbar></devsite-snackbar> <devsite-tooltip ></devsite-tooltip> <devsite-heading-link></devsite-heading-link> <devsite-analytics> <script type="application/json" analytics>[]</script> <script type="application/json" tag-management>{"at": "True", "ga4": [{"id": "G-QFRN08RN6E", "purpose": 0}], "ga4p": [{"id": "G-QFRN08RN6E", "purpose": 0}], "gtm": [{"id": "GTM-KMSWPCJ", "purpose": 0}], "parameters": {"internalUser": "False", "language": {"machineTranslated": "False", "requested": "en", "served": "en"}, "pageType": "article", "projectName": "Android Developers", "signedIn": "False", "tenant": "android", "recommendations": {"sourcePage": "", "sourceType": 0, "sourceRank": 0, "sourceIdenticalDescriptions": 0, "sourceTitleWords": 0, "sourceDescriptionWords": 0, "experiment": ""}, "experiment": {"ids": ""}}}</script> </devsite-analytics> <devsite-badger></devsite-badger> <android-fully-clickable target=" .android-case-study .devsite-landing-row-item, .android-grouped-resources .devsite-landing-row-item, .android-grouped-resources-primary .devsite-landing-row-item, .android-grouped-resources-secondary .devsite-landing-row-item, .android-guide-cards .devsite-landing-row-item, .android-illustrated-resources-index .devsite-landing-row-item, .android-illustrated-resources-primary .devsite-landing-row-item, .android-illustrated-resources-secondary .devsite-landing-row-item, .android-illustrated-resources-secondary-small .devsite-landing-row-item, .android-illustrated-resources-tertiary .devsite-landing-row-item, .android-illustrated-resources-tertiary-small .devsite-landing-row-item, .android-promo .devsite-landing-row-item, .android-quick-link, .android-samples .devsite-card-wrapper, .fully-clickable" watch=".android-samples, devsite-content"></android-fully-clickable> <script nonce="9m0BVG0q6ssL18CYOX70NpA4M3MpLe"> (function(d,e,v,s,i,t,E){d['GoogleDevelopersObject']=i; t=e.createElement(v);t.async=1;t.src=s;E=e.getElementsByTagName(v)[0]; E.parentNode.insertBefore(t,E);})(window, document, 'script', 'https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/js/app_loader.js', '[3,"en",null,"/js/devsite_app_module.js","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android","https://android-dot-devsite-v2-prod.appspot.com",null,null,["/_pwa/android/manifest.json","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/images/video-placeholder.svg","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/favicon.svg","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup.svg","https://fonts.googleapis.com/css?family=Google+Sans:400,500,600,700|Google+Sans+Text:400,400italic,500,500italic,600,600italic,700,700italic|Roboto+Mono:400,500,700&display=swap"],1,null,[1,6,8,12,14,17,21,25,50,52,63,70,75,76,80,87,91,92,93,97,98,100,101,102,103,104,105,107,108,109,110,112,113,117,118,120,122,124,125,126,127,129,130,131,132,133,134,135,136,138,140,141,147,148,149,151,152,156,157,158,159,161,163,164,168,169,170,179,180,182,183,186,191,193,196],"AIzaSyAP-jjEJBzmIyKR4F-3XITp8yM9T1gEEI8","AIzaSyB6xiKGDR5O3Ak2okS4rLkauxGUG7XP0hg","developer.android.com","AIzaSyAQk0fBONSGUqCNznf6Krs82Ap1-NV6J4o","AIzaSyCCxcqdrZ_7QMeLCRY20bh_SXdAYqy70KY",null,null,null,["Concierge__enable_pushui","EngEduTelemetry__enable_engedu_telemetry","Cloud__enable_free_trial_server_call","CloudShell__cloud_code_overflow_menu","Search__enable_page_map","Profiles__enable_public_developer_profiles","Analytics__enable_clearcut_logging","Cloud__enable_cloudx_experiment_ids","MiscFeatureFlags__enable_project_variables","MiscFeatureFlags__enable_explain_this_code","Cloud__enable_cloudx_ping","Profiles__require_profile_eligibility_for_signin","Cloud__enable_cloud_facet_chat","Profiles__enable_complete_playlist_endpoint","CloudShell__cloud_shell_button","MiscFeatureFlags__developers_footer_dark_image","MiscFeatureFlags__developers_footer_image","Profiles__enable_recognition_badges","BookNav__enable_tenant_cache_key","MiscFeatureFlags__enable_dark_theme","Profiles__enable_release_notes_notifications","Search__enable_ai_eligibility_checks","Cloud__enable_llm_concierge_chat","TpcFeatures__enable_required_headers","Profiles__enable_awarding_url","Profiles__enable_page_saving","Experiments__reqs_query_experiments","Profiles__enable_developer_profiles_callout","Search__enable_dynamic_content_confidential_banner","DevPro__enable_developer_subscriptions","Significatio__enable_by_tenant","MiscFeatureFlags__enable_variable_operator","Profiles__enable_completecodelab_endpoint","Profiles__enable_dashboard_curated_recommendations","Search__enable_suggestions_from_borg","TpcFeatures__enable_mirror_tenant_redirects","MiscFeatureFlags__emergency_css","Search__enable_ai_search_summaries","Cloud__enable_cloud_dlp_service","Cloud__enable_cloud_shell_fte_user_flow","MiscFeatureFlags__enable_view_transitions","DevPro__enable_cloud_innovators_plus","Cloud__enable_legacy_calculator_redirect","Profiles__enable_profile_collections","MiscFeatureFlags__enable_firebase_utm","Cloud__enable_cloud_shell"],null,null,"AIzaSyBLEMok-5suZ67qRPzx0qUtbnLmyT_kCVE","https://developerscontentserving-pa.googleapis.com","AIzaSyCM4QpTRSqP5qI4Dvjt4OAScIN8sOUlO-k","https://developerscontentsearch-pa.googleapis.com",2,4,null,"https://developerprofiles-pa.googleapis.com",[3,"android","Android Developers","developer.android.com",null,"android-dot-devsite-v2-prod.appspot.com",null,null,[null,1,null,null,null,null,null,null,null,null,null,[1],null,null,null,null,null,null,[1],[1,null,null,[1,20],"/recommendations"],null,null,null,[1,null,1],[1,1,null,1,1]],null,[18,null,null,null,null,null,"/images/lockup.svg","/images/touchicon-180.png",null,null,null,null,null,null,null,null,null,null,null,null,null,1,null,null,null,"/images/lockup-dark-theme.svg",[]],[],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[6,1,14,15,20,22,23,28,29,37,43],null,[[null,null,1],[1,1]],[[null,null,null,null,null,null,null,[["G-QFRN08RN6E"],null,null,[["G-QFRN08RN6E",1]]],null,null,null,null,1],null,[[1,1],[2,2]]],null,4,null,null,null,null,null,null,null,null,null,null,null,null,null,"android.devsite.google"],null,"pk_live_5170syrHvgGVmSx9sBrnWtA5luvk9BwnVcvIi7HizpwauFG96WedXsuXh790rtij9AmGllqPtMLfhe2RSwD6Pn38V00uBCydV4m"]') </script> <devsite-a11y-announce></devsite-a11y-announce> </body> </html>