tag:blogger.com,1999:blog-67557096430449471792026-03-15T04:07:23.417-07:00Android Developers BlogThe official Android Developers blog covering the latest news on app development tools, platform updates, training, and documentation for developers across every Android device.Birnahttp://www.blogger.com/profile/04044883525253664551[email protected]Blogger1980125tag:blogger.com,1999:blog-6755709643044947179.post-64140507938557627522026-03-13T10:00:00.000-07:002026-03-13T13:01:00.703-07:00Room 3.0 - Modernizing the Room<meta content="https://blogger.googleusercontent.com/img/a/AVvXsEg8gcR_wvFw952Oay_MFUwk5Pj9dK-Ja003RfUpedOtoxkHBzHMlZmf345lm1zjvyrnb6-UNyQDEPSkxL6PvGoypZU4mwZelZ8m71og7VrAciosPaZhVDk624K9b7EftFseuGtQ8xmR9C0IZf_-dMrKBqi_-q_kvSlTVtwHMFeJXpACwMfR7Pz-Z5f7uNo" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></meta> <img src="https://blogger.googleusercontent.com/img/a/AVvXsEg8gcR_wvFw952Oay_MFUwk5Pj9dK-Ja003RfUpedOtoxkHBzHMlZmf345lm1zjvyrnb6-UNyQDEPSkxL6PvGoypZU4mwZelZ8m71og7VrAciosPaZhVDk624K9b7EftFseuGtQ8xmR9C0IZf_-dMrKBqi_-q_kvSlTVtwHMFeJXpACwMfR7Pz-Z5f7uNo" style="display: none;" /><div><span><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><i><span style="font-family: inherit;">Posted by Daniel Santiago Rivera, Software Engineer</span></i></span></span></div><div><span><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><i><span style="font-family: inherit;"><br /></span></i></span></span></div><div><span><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><i><span style="font-family: inherit;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjRf3SI7fdOOau6mzOYnSqRng5ILGrQh96vj_efpOe9uzu7vo2weii05IoKa0KyycxPcjkbMSGTzRwY53LQEZ6n_4KdZYoUCedMWRyOMtJ8fEnnHg1nZHGhLhl4wvj7zWOXfEIQKIrP9-fp-TTmbBC3KhEmJrZCUG4mUGz7nbCbCMRksmcd96WiKJL7suw" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="476" data-original-width="1600" src="https://blogger.googleusercontent.com/img/a/AVvXsEjRf3SI7fdOOau6mzOYnSqRng5ILGrQh96vj_efpOe9uzu7vo2weii05IoKa0KyycxPcjkbMSGTzRwY53LQEZ6n_4KdZYoUCedMWRyOMtJ8fEnnHg1nZHGhLhl4wvj7zWOXfEIQKIrP9-fp-TTmbBC3KhEmJrZCUG4mUGz7nbCbCMRksmcd96WiKJL7suw=s16000" /></a></div><br /><br /></span></i></span></span></div><br /><br />The first alpha of Room 3.0 has been released! Room 3.0 is a major breaking version of the library that focuses on Kotlin Multiplatform (KMP) and adds support for JavaScript and WebAssembly (WASM) on top of the existing Android, iOS and JVM desktop support. <br /><br />In this blog we outline the breaking changes, the reasoning behind Room 3.0, and the various things you can do to migrate from Room 2.0.<div><br /><span style="font-family: inherit; font-size: x-large;">Breaking changes</span><br /><br />Room 3.0 includes the following breaking API changes: <br /><br /><ul style="text-align: left;"><li><b>Dropping SupportSQLite APIs:</b> Room 3.0 is fully backed by the <a href="https://developer.android.com/kotlin/multiplatform/sqlite#sqlite-driver">androidx.sqlite driver APIs</a>. The SQLiteDriver APIs are KMP-compatible and removing Room’s dependency on Android's API simplifies the API surface for Android since it avoids having two possible backends.</li></ul><br /><ul style="text-align: left;"><li><b>No more Java code generation:</b> Room 3.0 exclusively generates Kotlin code. This aligns with the evolving Kotlin-first paradigm but also simplifies the codebase and development process, enabling faster iterations.</li></ul><br /><ul style="text-align: left;"><li><b>Focus on KSP:</b> We are also dropping support for Java Annotation Processing (AP) and KAPT. Room 3.0 is solely a KSP (Kotlin Symbol Processing) processor, allowing for better processing of Kotlin codebases without being limited by the Java language.</li></ul><br /><ul style="text-align: left;"><li><b>Coroutines first:</b> Room 3.0 embraces Kotlin coroutines, making its APIs coroutine-first. Coroutines is the KMP-compatible asynchronous framework and making Room be asynchronous by nature is a critical requirement for supporting web platforms.</li></ul></div><div><br /><span style="font-family: inherit; font-size: x-large;">A new package</span><br /><br />To prevent compatibility issues with existing Room 2.x implementations and for libraries with transitive dependencies to Room (for example, WorkManager), Room 3.0 resides in a new package which means it also has a new maven group and artifact ids. For example, <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">androidx.room:room-runtime</span>&nbsp;has become <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">androidx.room3:room3-runtime</span>&nbsp;and classes such as <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">androidx.room.RoomDatabase</span>&nbsp;will now be located at <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">android.room3.RoomDatabase</span>.</div><div><br /><span style="font-family: inherit; font-size: x-large;">Kotlin and Coroutines First</span><br /><br />With no more Java code generation, Room 3.0 also requires KSP and the Kotlin compiler even if the codebase interacting with Room is in Java. It is recommended to have a multi-module project where Room usage is concentrated and the Kotlin Gradle Plugin and KSP can be applied without affecting the rest of the codebase.<br /><br />Room 3.0 also requires Coroutines and more specifically DAO functions have to be suspending unless they are returning a reactive type, such as a Flow. Room 3.0 disallows blocking DAO functions. See the <a href="https://developer.android.com/kotlin/coroutines">Coroutines on Android documentation</a> on getting started integrating Coroutines into your application.</div><div><br /><span style="font-family: inherit; font-size: x-large;">Migration to SQLiteDriver APIs</span><br /><br />With the shift away from SupportSQLite, apps will need to migrate to the SQLiteDriver APIs. This migration is essential to leveraging the full benefits of Room 3.0, including allowing the use of the bundled SQLite library via the <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 14.6667px; white-space-collapse: preserve;">BundledSQLiteDriver</span>. You can start migrating to the driver APIs today with Room 2.7.0+. We strongly encourage you to avoid any further usage of SupportSQLite. If you migrate your Room integrations to SQLiteDriver APIs, then the transition to Room 3.0 is easier since the package change mostly involves updating symbol references (imports) and might require minimal changes to call-sites.</div><div><br />For a brief overview of the SQLiteDriver APIs, check out the <a href="https://developer.android.com/kotlin/multiplatform/sqlite#sqlite-driver">SQLiteDriver APIs documentation</a>.<br /><br />For more details on how to migrate Room to use SQLiteDriver APIs, check out the official <a href="https://developer.android.com/kotlin/multiplatform/room#migrate-from-support-sqlite">documentation to migrate from SupportSQLite</a>.</div><div><br /><span style="font-family: inherit; font-size: x-large;">Room SupportSQLite wrapper</span><br /><br />We understand completely removing SupportSQLite might not be immediately feasible for all projects. To ease this transition, Room 2.8.0, the latest version of the Room 2.0 series, introduced a new artifact called <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">androidx.room:room-sqlite-wrapper</span>. This artifact offers a compatibility API that allows you to convert a <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 14.6667px; white-space-collapse: preserve;">RoomDatabase</span>&nbsp;into a <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 14.6667px; white-space-collapse: preserve;">SupportSQLiteDatabase</span>, even if the SupportSQLite APIs in the database have been disabled due to a <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 14.6667px; white-space-collapse: preserve;">SQLiteDriver </span>being installed. This provides a temporary bridge for developers who need more time to fully migrate their codebase. This artifact continues to exist in Room 3.0 as <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">androidx.room3:room3-sqlite-wrapper </span>to enable the migration to Room 3.0 while still supporting critical SupportSQLite usage.</div><div><br />For example, invocations of&nbsp;<span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">Database.openHelper.writableDatabase </span>can be replaced by&nbsp;<span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">roomDatabase.getSupportWrapper()</span>&nbsp;and a wrapper would be provided even if <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">setDriver()</span>&nbsp;is called on Room’s builder.</div><div><br />For more details check out the <a href="https://developer.android.com/kotlin/multiplatform/room#migrate-room-sqlite-wrapper">room-sqlite-wrapper documentation</a>.</div><div><br /><span style="font-family: inherit; font-size: x-large;">Room and SQLite Web Support</span><br /><br />Support for the Kotlin Multiplatform targets JS and WasmJS and brings some of the most significant API changes. Specifically, many APIs in Room 3.0 are suspend functions since proper support for web storage is asynchronous. The SQLiteDriver APIs have also been updated to support the Web and a new web asynchronous driver is available in <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 14.6667px; white-space-collapse: preserve;">androidx.sqlite:sqlite-web</span>. It is a <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API">Web Worker</a> based driver that enables persisting the database in the Origin private file system (OPFS).</div><div><br />For more details on how to set up Room for the Web check out the <a href="https://developer.android.com/jetpack/androidx/releases/room3#3.0.0-alpha01">Room 3.0 release notes</a>.<br /><br /></div><div><span style="font-family: inherit; font-size: x-large;">Custom DAO Return Types</span><br /><br />Room 3.0 introduces the ability to add custom integrations to Room similar to RxJava and Paging. Through a new annotation API called <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">@DaoReturnTypeConverter</span>&nbsp;you can create your own integration such that Room’s generated code becomes accessible at runtime, this enables&nbsp;&nbsp;<span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">@Dao </span>functions having their custom return types without having to wait for the Room team to add the support. Existing integrations are migrated to use this functionality and thus will now require for those who rely on it to add the converters to the <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">@Database</span>&nbsp;or <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">@Dao</span>&nbsp;definitions.</div><div><br />For example, the Paging converter will be located in the <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">android.room3:room3-paging </span>artifact and it's called <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">PagingSourceDaoReturnTypeConverter</span>. Meanwhile for <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">LiveData</span>&nbsp;the converter is in <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">android.room3:room3-livedata</span>&nbsp;and is called <span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; white-space-collapse: preserve;">LiveDataReturnTypeConverter</span>.</div><div><br />For more details check out the DAO Return Type Converters section in the <a href="https://developer.android.com/jetpack/androidx/releases/room3#3.0.0-alpha01">Room 3.0 release notes</a>.<br /><br /></div><div><span style="font-family: inherit; font-size: x-large;">Maintenance mode of Room 2.x</span><br /><br />Since the development of Room will be focused on Room 3, the current Room 2.x version enters maintenance mode. This means that no major features will be developed but patch releases (2.8.1, 2.8.2, etc.) will still occur with bug fixes and dependency updates. The team is committed to this work until Room 3 becomes stable.<br /><br /></div><div><span style="font-family: inherit; font-size: x-large;">Final thoughts</span><br /><br />We are incredibly excited about the potential of Room 3.0 and the opportunities it unlocks for the Kotlin ecosystem. Stay tuned for more updates as we continue this journey!<br /></div>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-72850831206257060232026-03-13T06:00:00.000-07:002026-03-13T09:02:37.416-07:00TikTok reduces code size by 58% and improves app performance for new features with Jetpack Compose<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8Z60YCSMY9q_UJiIs8kRtosnM1KKnKAebXEJ3dxmHmGOIFLcnaLDMWEYNs8v__mDZ0IU6zc5oYqcp0XFlfci4QHz22QQC3ZWQCnSjMjcMb-WJl5cR7-TK9Veca0tT__RlpTlEMdSHykoADDTmMTfbYdAUU2pMFzORNKwTQRXkhIP8vLo_aEPeb7s91kE/s1280/AANDDM_TikTokCompose_Header%20(1).png" property="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8Z60YCSMY9q_UJiIs8kRtosnM1KKnKAebXEJ3dxmHmGOIFLcnaLDMWEYNs8v__mDZ0IU6zc5oYqcp0XFlfci4QHz22QQC3ZWQCnSjMjcMb-WJl5cR7-TK9Veca0tT__RlpTlEMdSHykoADDTmMTfbYdAUU2pMFzORNKwTQRXkhIP8vLo_aEPeb7s91kE/s1280/AANDDM_TikTokCompose_Header%20(1).png"></meta><name content="IMG" twitter:image=""><p style="font-style: italic;"><em>Posted by Ajesh R Pai, Developer Relations Engineer &amp; Ben Trengrove, Developer Relations Engineer</em></p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8Z60YCSMY9q_UJiIs8kRtosnM1KKnKAebXEJ3dxmHmGOIFLcnaLDMWEYNs8v__mDZ0IU6zc5oYqcp0XFlfci4QHz22QQC3ZWQCnSjMjcMb-WJl5cR7-TK9Veca0tT__RlpTlEMdSHykoADDTmMTfbYdAUU2pMFzORNKwTQRXkhIP8vLo_aEPeb7s91kE/s1280/AANDDM_TikTokCompose_Header%20(1).png" style="clear: left; float: left; font-style: italic; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="720" data-original-width="1280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8Z60YCSMY9q_UJiIs8kRtosnM1KKnKAebXEJ3dxmHmGOIFLcnaLDMWEYNs8v__mDZ0IU6zc5oYqcp0XFlfci4QHz22QQC3ZWQCnSjMjcMb-WJl5cR7-TK9Veca0tT__RlpTlEMdSHykoADDTmMTfbYdAUU2pMFzORNKwTQRXkhIP8vLo_aEPeb7s91kE/s16000/AANDDM_TikTokCompose_Header%20(1).png" /></a></p><span style="font-family: inherit;"><span id="docs-internal-guid-c2ee2dcc-7fff-9b3c-e6d4-e0dff1cda8ae"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><a href="https://play.google.com/store/apps/details?id=com.zhiliaoapp.musically&amp;" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">TikTok</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> is a global short-video platform known for its massive user base and innovative features. The team is constantly releasing updates, experiments, and new features for their users. Faced with the challenge of maintaining velocity while managing technical debt, the TikTok Android team turned to </span><a href="https://developer.android.com/compose" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Jetpack Compose</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span id="docs-internal-guid-45011a77-7fff-0d0b-a6b6-9997c9eb4244"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The team wanted to enable faster, higher-quality iteration of product requirements. By leveraging Compose, the team sought to improve engineering efficiency by writing less code and reducing cognitive load, while also achieving better performance and stability. </span></span></p><div><span id="docs-internal-guid-f8f1e788-7fff-4161-60ea-09e36f8c01b6"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Streamlining complex UI to accelerate developer productivity</span></span></span></div><div><span id="docs-internal-guid-4a74ae24-7fff-ec85-2545-703dedad706f" style="font-family: inherit;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">TikTok pages are often more complex than they appear, containing numerous layered conditional requirements. This complexity often resulted in difficult-to-maintain, sub-optimally structured View hierarchies and excessive View nesting, which caused performance degradation due to an increased number of measure passes.</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-04088b7f-7fff-b3ee-201b-50b01201810e"></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Compose offered a direct solution to this structural problem. </span></p></span></div><div><span id="docs-internal-guid-38fa3967-7fff-29d6-837a-13e64321a1d7"></span><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Furthermore, Compose’s </span><a href="https://developer.android.com/develop/ui/compose/performance/phases" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">measurement strategy</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> helps reduce </span><a href="https://developer.android.com/topic/performance/rendering/optimizing-view-hierarchies#double" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: italic; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">double taxation</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, making measure performance easier to optimize.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span id="docs-internal-guid-b0643245-7fff-175f-9ece-994e856f2bc3"></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">To improve developer productivity, TikTok’s central Design System team provides a component library for teams working on different app features.&nbsp; The team observed that Development in Compose is simple; leveraging small composables is highly effective, while incorporating large UI blocks with conditional logic is both straightforward and has minimal overhead.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><div class="separator" style="clear: both; text-align: center;"><span id="docs-internal-guid-191bb6b1-7fff-13bd-dccb-767aac30e0d5"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA5bTNaPSetoHYdXSt87tK8sN4vcWlLcSNZgpJa_Y80EIBUGvkHpny1TMzC3UGGCc3O5-TyON2MwzFtdVvX1zXVG1b3ql8Pbc5jmLnlFvaNcv8kte8wRwGeUYOzhjtGgIo1QK9Umk8hClhZ9HUzE7PcSJNXa-ivQyLwD2IeT6YJR8nWWyoalFCl1FZNmc/s1280/AANDDM_TikTokCompose_Quote%20(1).png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA5bTNaPSetoHYdXSt87tK8sN4vcWlLcSNZgpJa_Y80EIBUGvkHpny1TMzC3UGGCc3O5-TyON2MwzFtdVvX1zXVG1b3ql8Pbc5jmLnlFvaNcv8kte8wRwGeUYOzhjtGgIo1QK9Umk8hClhZ9HUzE7PcSJNXa-ivQyLwD2IeT6YJR8nWWyoalFCl1FZNmc/s16000/AANDDM_TikTokCompose_Quote%20(1).png" /></a></div><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span id="docs-internal-guid-0d8802ec-7fff-4d3e-5cec-1172303c0d67"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Building a path forward through strategic migration</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: center; vertical-align: baseline; white-space-collapse: preserve;">By strategically adopting Jetpack Compose, TikTok was able to stay on top of technical debt, while also continuing to focus on creating great experiences for their users. The ability of Compose to handle conditional logic cleanly and streamline composition allowed the team to </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-align: center; vertical-align: baseline; white-space-collapse: preserve;">achieve up to a 78% reduction in page loading time on new or fully rewritten pages. </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: center; vertical-align: baseline; white-space-collapse: preserve;">This improvement was 20–30% in smaller cases, and 70–80% for full rewrites and new features. They also were able to </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-align: center; vertical-align: baseline; white-space-collapse: preserve;">reduce their code size by 58%</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: center; vertical-align: baseline; white-space-collapse: preserve;">,</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-align: center; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: center; vertical-align: baseline; white-space-collapse: preserve;">when compared to the same feature built in Views. </span><span style="white-space-collapse: preserve;">The team has further shared a couple of learnings:&nbsp;&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">TikTok team’s overall strategy was to incrementally migrate specific user journeys. This gave them an opportunity to migrate, confirm measurable benefits, then scale to more screens. They started with using Compose to simplify the overall structure in the QR code feature and saw the improvements. The team later expanded the migration to the Login and Sign-up experiences.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The team shared some additional learnings:&nbsp;&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">While checking performance during migration, the TikTok team found that using many small</span><span style="background-color: transparent; color: #6aa84f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/ComposeView" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">ComposeViews</span></a><span style="background-color: transparent; color: #6aa84f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">to replace elements inside a single </span><a href="https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView.ViewHolder" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">ViewHolder</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, caused composition overhead. They achieved better results by expanding the migration to use one single ComposeView for the entire ViewHolder.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">When migrating a Fragment inside ViewPager, which has custom height logic and conditional logic to hide and show ui based on experiments, the performance wasn’t impacted. In this case, migrating the ViewPager to Composable performed better than migrating the Fragment.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="font-family: inherit;"><span id="docs-internal-guid-023e08df-7fff-2263-45b1-eb5bdef8fc12"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Jun Shen really likes that Compose "reduces the amount of code required for feature development, improves testability, and accelerates delivery". The team plans to steadily increase Compose adoption, making it their preferred framework in the long term. Jetpack Compose proved to be a powerful solution for improving both their developer experience and production metrics at scale.</span></span></p><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 14pt; text-align: left;"><span id="docs-internal-guid-640ead5f-7fff-78f4-9477-4647d84e6543" style="font-weight: normal;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Get Started with Jetpack Compose</span></span></span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span id="docs-internal-guid-69785354-7fff-a59a-b543-9031d037006b"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Learn more about how </span><a href="https://developer.android.com/compose" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Jetpack Compose </span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">can help your team. </span></span></span></p></span></div></div></span></span><p style="font-style: italic;"></p></name>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-65944976957774205242026-03-11T13:02:00.001-07:002026-03-11T16:19:06.064-07:00Level Up: Test Sidekick and prepare for upcoming program milestones<meta content="https://blogger.googleusercontent.com/img/a/AVvXsEhHqPM2-RBM5j3cV3eESiQZ3eXq48YuwIq9h6IPFnanzV_FvkHTbTJPmQYC4LnXXTlIi44lD1xrRa2Iewr2TjbBbuQRkVe4ifLqKp0bL532NPC-MbNHQ_71Dy_Iz6YzAqqaL7MS5ZY1EipwhR9wfmsMRTQM8x4E2uIjC3o302FoAxifgxNTRADw4OBZabE" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></meta> <img src="https://blogger.googleusercontent.com/img/a/AVvXsEhHqPM2-RBM5j3cV3eESiQZ3eXq48YuwIq9h6IPFnanzV_FvkHTbTJPmQYC4LnXXTlIi44lD1xrRa2Iewr2TjbBbuQRkVe4ifLqKp0bL532NPC-MbNHQ_71Dy_Iz6YzAqqaL7MS5ZY1EipwhR9wfmsMRTQM8x4E2uIjC3o302FoAxifgxNTRADw4OBZabE" style="display: none;" /><div class="separator"></div><name content="IMG" twitter:image=""><p><span><span face="&quot;Google Sans&quot;, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><i></i></span></span></p><div class="separator" style="clear: both; text-align: justify;"><i style="text-align: left; white-space-collapse: preserve;">Posted by Maru Ahues Bouza, PM Director, Games on Google Play</i></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhPiaEGrykHBl7WXNcPWhTCF0JfOOnhqYGUAMFW0tsUtUaiyOwqTMgLdDha8pwu3715ITpQNfaeGoc315T8eor5dBFDsXaBiiwQB8mXjf-rVMCdltiirly2WHpWsdfTX9LMHwESG6tyiDFByUW5HugC3rThlyF97BX1sFw0x45_kAi-ijEbG1s-GAEyCHI" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="1253" data-original-width="4209" src="https://blogger.googleusercontent.com/img/a/AVvXsEhPiaEGrykHBl7WXNcPWhTCF0JfOOnhqYGUAMFW0tsUtUaiyOwqTMgLdDha8pwu3715ITpQNfaeGoc315T8eor5dBFDsXaBiiwQB8mXjf-rVMCdltiirly2WHpWsdfTX9LMHwESG6tyiDFByUW5HugC3rThlyF97BX1sFw0x45_kAi-ijEbG1s-GAEyCHI=s16000" /></a></div><br /><br /><br /><br /><br /><span id="docs-internal-guid-d80a8b48-7fff-127d-2630-18731d28c907"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Last September, we shared our vision for the future of Google Play Games grounded in a core belief: the best way to drive your game’s success is to deliver a </span><a href="https://blog.google/products-and-platforms/platforms/google-play/curation-update-september-2025/" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">world-class player experience</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. We launched the </span><a href="https://play.google.com/console/about/levelup/" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Google Play Games Level Up</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> program to recognize and reward great gaming experiences, while providing you with a powerful toolkit and new promotional opportunities to grow your games.&nbsp;&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">The momentum since our announcement has been incredibly positive, with more than 600 million gamers now using Play Games Services every month. Developers are also finding success, with one-third of all game installs on the Play Store now coming from editorially-driven organic discovery. In fact, in 2025, </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Level Up features have driven over 2.5 billion incremental acquisitions for featured games, in addition to an average uplift of 25% in installs during the featuring windows</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">&nbsp;&nbsp;&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Today, we're inviting you to start testing Play Games Sidekick to keep your players in the action, sharing new Play Console updates to optimize your reach, and helping you prepare for our upcoming program milestones.</span></span></p></span><p></p><div style="text-align: left;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;"><br /></span></span></span></div><div style="text-align: left;"><span id="docs-internal-guid-496e5b99-7fff-73af-339d-56bd75972499"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">Boost retention and immersion with Play Games Sidekick</span></span></span></div><div style="text-align: left;"><span style="font-family: inherit; white-space-collapse: preserve;"><br /></span></div><div style="text-align: left;"><span style="font-family: inherit; white-space-collapse: preserve;">Play Games Sidekick is a helpful in-game overlay that gives players instant access to relevant gaming information—like rewards, offers, achievements, and quest progress— keeping them immersed while driving higher engagement for developers.&nbsp; It serves as a seamless bridge to the highly visible "You" tab, connecting your game to 160 million monthly active users already engaging there and doubles as an active gaming companion that enhances the player experience with helpful, AI-generated Game Tips.</span></div><p></p></name><div><name content="IMG" twitter:image=""><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhgliaPtU36k4b-7W7xcXYiWDTTPYZ-lqkXKLZ5xZ4BKSceFaS6thnQ81sF0AI1g-3L9azg1KEmwovns6qUYmZyClqcZwhigSsERTFvCVc5FjOX2-RhS4SoQ0cP2GaseLcvbN86J26rzL4IgAeydgf7mCl15lyLvZfmInWW35ww93rRsAcGZPb4ninRwEM" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="608" data-original-width="1080" src="https://blogger.googleusercontent.com/img/a/AVvXsEhgliaPtU36k4b-7W7xcXYiWDTTPYZ-lqkXKLZ5xZ4BKSceFaS6thnQ81sF0AI1g-3L9azg1KEmwovns6qUYmZyClqcZwhigSsERTFvCVc5FjOX2-RhS4SoQ0cP2GaseLcvbN86J26rzL4IgAeydgf7mCl15lyLvZfmInWW35ww93rRsAcGZPb4ninRwEM=s16000" /></a></div><div class="separator" style="clear: both; text-align: left;"><span id="docs-internal-guid-bd40bc46-7fff-7bc5-989b-da699c726847"><span style="font-family: inherit;"><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Deep Rock Galactic: Survivor keeps players in the action </span><span style="font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">with Play Games Sidekick </span></div></span></span></div><div class="separator" style="clear: both; text-align: left;"><span><span face="&quot;Google Sans&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></div><span id="docs-internal-guid-8a77e67e-7fff-6b59-00d4-bb9f834d0425"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Today, Sidekick </span><a href="https://play.google.com/store/apps/editorial?id=mc_games_editorialmd_gdc_sidekick_fcp" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">officially debuts in over 90 games</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, with the experience expanding to all Level Up titles later this year. But you don’t need to wait for the broader rollout to get your game ready. You can now</span><a href="https://developer.android.com/games/pgs/play-games-sidekick#sidekick-beta" style="text-decoration-line: none;"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">enable Sidekick through Play Console</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> to preview and test how your players will interact with features like Achievements, Streaks, Play Points Coupons, and Game Tips.&nbsp; Upon completing your testing, be sure to push Sidekick for production to ensure your game meets the Level Up user experience guidelines.&nbsp; </span></span></span></name></div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi3Oo-tJ4o55mkvY8Dbama3Tv2qh7ddFzmJMm2jRpgzf3LlpJ35YJn0rwXdW6I5KD5K1YArfp11mU1b3BXGYUzpoDhYw8pWkY8W_fact_5m-T_fxCbBDvniaevhTfAgsLKqc8Wr_fWITI1v9wJcwBG99gmyApc9EX7d5hvR0KVRrW2VLwzOckMuBGUv-NA" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1169" data-original-width="1440" height="519" src="https://blogger.googleusercontent.com/img/a/AVvXsEi3Oo-tJ4o55mkvY8Dbama3Tv2qh7ddFzmJMm2jRpgzf3LlpJ35YJn0rwXdW6I5KD5K1YArfp11mU1b3BXGYUzpoDhYw8pWkY8W_fact_5m-T_fxCbBDvniaevhTfAgsLKqc8Wr_fWITI1v9wJcwBG99gmyApc9EX7d5hvR0KVRrW2VLwzOckMuBGUv-NA=w640-h519" width="640" /></a></div><div style="text-align: center;"><span style="font-style: italic; white-space-collapse: preserve;"><span style="font-family: inherit;">Enable Play Games Sidekick in Play Console to begin testing</span></span></div></div><div style="text-align: center;"><br /></div><div><span><b><span style="font-family: inherit; font-size: x-large;"><br /></span></b></span></div><div><span id="docs-internal-guid-0acee31a-7fff-f1af-cba7-3c4eb9d60ca7"><b><span style="font-family: inherit; font-size: x-large;">Optimize reach and operations with new Play Console updates</span></b></span></div><div><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></span></span></div><div><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">We are also rolling out two new Play Console updates to help you optimize your reach and streamline operations: </span></span></span></div><div><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></span></span></div><div><span id="docs-internal-guid-7f236cc3-7fff-2dd6-c580-986688aa194a"><span style="font-family: inherit;"><ul style="text-align: left;"><li><span id="docs-internal-guid-7f236cc3-7fff-2dd6-c580-986688aa194a"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Pre-reg device breakdowns:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> To aid launch decisions, you can now analyze the </span><a href="https://play.google.com/console/developers/app/devices/dashboard" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">device distribution of your pre-registered audience</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> by key device attributes including Android version, RAM and SoC. This enables you to optimize game performance, minimum specs, and marketing spend for the players already waiting for your game. </span></span></li></ul></span></span></div><div style="text-align: left;"><p></p><p></p><p></p><div><span style="white-space-collapse: preserve;"><br /></span></div></div><div><name content="IMG" twitter:image=""><span><span face="&quot;Google Sans&quot;, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><div class="separator" style="clear: both; font-size: 11pt; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhpGp_HUeKg8-QqeGHxAMoKuvGAkcKDKlNxwZYDphfEyDvb6_c9eDwHnoI9DVGx6YRAa4wKvostFCYpO_rtajNBuQEAtaT2IQ016TCks63QuVslph8f3KBvAbLlfbDk6QRl-Uj6tjDQltnVfwlcp_GKhBnALPCwtVRkobCAlWiw2-d3H17FDRTRsKMrCiY" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="608" data-original-width="1080" height="360" src="https://blogger.googleusercontent.com/img/a/AVvXsEhpGp_HUeKg8-QqeGHxAMoKuvGAkcKDKlNxwZYDphfEyDvb6_c9eDwHnoI9DVGx6YRAa4wKvostFCYpO_rtajNBuQEAtaT2IQ016TCks63QuVslph8f3KBvAbLlfbDk6QRl-Uj6tjDQltnVfwlcp_GKhBnALPCwtVRkobCAlWiw2-d3H17FDRTRsKMrCiY=w640-h360" width="640" /></a></div><span id="docs-internal-guid-466f6ae7-7fff-0b34-5ddf-ede1dda47c68"><div style="text-align: center;"><span style="font-style: italic;"><span style="font-family: inherit;">Identify launch-day risks and optimize performance for your players </span></span></div><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><div style="font-style: italic; text-align: center;"><span style="font-family: inherit;">with new pre-registration device breakdowns</span></div><div style="font-style: italic; text-align: center;"><span style="font-family: inherit;"><br /></span></div><div style="text-align: left;"><ul style="font-style: italic; text-align: left;"><li><span id="docs-internal-guid-a6fd208f-7fff-9573-3c68-9b0344860389"><span style="font-family: inherit;"><span style="font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">Real-time feedback:&nbsp; </span><span style="font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">With</span><a href="https://play.google.com/console/about/levelupplus/" style="text-decoration-line: none;"><span style="color: black; font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #1155cc; font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">Level Up+</span></a><span style="background-color: white; font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">, </span><span style="font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">our tier for high-performing games, qualifying titles can unlock</span><a href="https://play.google.com/console/about/programs/promotionalcontent/" style="text-decoration-line: none;"><span style="color: black; font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #1155cc; font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">promotional content</span></a><span style="font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> featuring and tools like deep-links and audience targeting. While submissions must meet Play’s</span><a href="https://support.google.com/googleplay/android-developer/answer/12929944" style="text-decoration-line: none;"><span style="color: black; font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #1155cc; font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">quality guidelines</span></a><span style="font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">, you no longer have to wait 24 hours to learn about issues. You can now get immediate feedback on quality whenever possible.</span></span></span></li></ul><div><br /></div><div><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;"><span style="font-family: inherit; font-size: x-large;"><br /></span></span></span></div><div><span id="docs-internal-guid-c9aca957-7fff-b02d-9086-b1657270ae84"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;"><span style="font-family: inherit; font-size: x-large;">Your 2026 checklist: Securing your Level Up benefits</span></span></span></div><div><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><br /></span></div><div><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Today, all games on Google Play qualify for Google Play Games Level Up. However, in order to maintain access to Level Up benefits like Play Points offers, expanded APK size limits, Play Store collections and campaigns consideration, or access to high-visibility surfaces like You tab and Sidekick, you’ll need to </span><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">ensure your game meets user experience guidelines by their upcoming milestones:&nbsp;</span></div><div><span style="font-family: inherit;"><br /></span></div><div><span style="font-family: inherit;">By July 2026:&nbsp;</span></div><div style="text-align: left;"><span id="docs-internal-guid-1307cf82-7fff-128c-e8dd-9c498729b411"><span style="font-family: inherit;"><ul style="text-align: left;"><ul><li><span id="docs-internal-guid-1307cf82-7fff-128c-e8dd-9c498729b411"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">Integrate </span><span id="docs-internal-guid-7420fd60-7fff-e84e-f525-47d094969d01"><a href="https://developer.android.com/games/pgs/play-games-sidekick" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;"><span style="font-family: inherit;">Play Games Sidekick</span></span></a></span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> to offer a quick and easy entry point to access rewards, offers, and achievements through an in-game overlay.</span></span></li><li><span id="docs-internal-guid-1307cf82-7fff-128c-e8dd-9c498729b411"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">Implement </span><a href="https://developer.android.com/games/pgs/achievements" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">achievements</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> with Play Games Services, to support authentication with the modern Gamer Profile, and to keep players engaged across the lifespan of your game.</span></span></li></ul></ul><div><span>&nbsp;</span></div><div>By November 2026:</div></span></span></div></div></span></span></span></span></name></div><div><name content="IMG" twitter:image=""><span id="docs-internal-guid-0c9cdbdb-7fff-b0a4-2314-a4866ffa78bf"><span style="font-family: inherit;"><ul style="text-align: left;"><ul><li><name content="IMG" twitter:image=""><span id="docs-internal-guid-0c9cdbdb-7fff-b0a4-2314-a4866ffa78bf"><b style="font-weight: bold;">Implement&nbsp;<span id="docs-internal-guid-09ad9a3d-7fff-7e26-f6c4-70a3bf7d4bca" style="font-weight: normal;"><a href="https://developer.android.com/games/pgs/savedgames" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">cloud save</span></span></a></span></b>&nbsp;to enable progress sync across devices. </span></name></li></ul></ul></span><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Last week, </span><a href="https://android-developers.googleblog.com/2026/03/a-new-era-for-choice-and-openness.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">we announced that we’re working on an expanded Level Up program</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> that builds on our successful foundation to further improve gaming experiences. The update will introduce new requirements that will unlock additional benefits like lower service fees. Engaging with the program now ensures your work is strategically aligned with these future updates. We’ll share more details in the coming months.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">In the meantime, the path to your first program milestone begins today. By prioritizing these </span></span><a href="https://play.google.com/console/about/levelup/#user-experience-guidelines" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">user experience guidelines</span></span></a><span style="white-space-collapse: preserve;"><span style="font-family: inherit;"> now, you’re investing in the long-term value of your game and ensuring it’s built to thrive for every player. Head over to Play Console to start testing Sidekick and take the next step in your Level Up journey.</span></span></p></span></name></div>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-41779462980802953172026-03-11T13:02:00.000-07:002026-03-11T16:17:00.173-07:00Expanding our stage for PC and paid titles <meta content="https://blogger.googleusercontent.com/img/a/AVvXsEg6KHrDYp7F3Kk_iyF8JjavlleRAoBbKovhQ56XptIG4vRMsOKbJ6m23h-6paC4NrRrT_1Lc1jaXzOoJilIK3N0TNdhX6b7XLO_dPg-FmqxGxhGRBK7kLrGZP8Q0mKxku-592Yu_pCSG8xijIl0y2_nXrZ61llwg2qG5bx0WJ5EyGT3VQHR30Vm4LJAHp4" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></meta> <img src="https://blogger.googleusercontent.com/img/a/AVvXsEg6KHrDYp7F3Kk_iyF8JjavlleRAoBbKovhQ56XptIG4vRMsOKbJ6m23h-6paC4NrRrT_1Lc1jaXzOoJilIK3N0TNdhX6b7XLO_dPg-FmqxGxhGRBK7kLrGZP8Q0mKxku-592Yu_pCSG8xijIl0y2_nXrZ61llwg2qG5bx0WJ5EyGT3VQHR30Vm4LJAHp4" style="display: none;" /><p><i>&nbsp;</i><i>Posted by Aurash Mahbod, VP and GM, Games on Google Play</i></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQCnW_W5brtfrRBx87MJQvsKy_acuTekwnqekWqZk79j9keauWbJpxUX6vxc9zZgGySW9KlcwqsXtVVTdivw6zSgRFA58a4-aDHS70x39WxYx3xwrpw_qf1iZlyaWQkDnh5ZfivECG2-ytZmMEZbB_3wq5Pjaf4WDEn5w0B96DLEPXUyh_vN9Hhmp_QvA/s7194/Blog-Banner%20NO%20IP%20(1).png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="2141" data-original-width="7194" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQCnW_W5brtfrRBx87MJQvsKy_acuTekwnqekWqZk79j9keauWbJpxUX6vxc9zZgGySW9KlcwqsXtVVTdivw6zSgRFA58a4-aDHS70x39WxYx3xwrpw_qf1iZlyaWQkDnh5ZfivECG2-ytZmMEZbB_3wq5Pjaf4WDEn5w0B96DLEPXUyh_vN9Hhmp_QvA/s16000/Blog-Banner%20NO%20IP%20(1).png" /></a></div><br /><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Google Play is proud to be the home of over 200,000 games—many of which defined the mobile-first era. But as cross-platform becomes the standard for players, we are evolving our ecosystem to match the scale of your ambitions. In recent years, we focused on elevating Android gaming quality while significantly </span><a href="https://android-developers.googleblog.com/2025/03/making-google-play-best-place-to-grow-pc-games.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">deepening our support for native PC titles</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p><p><span id="docs-internal-guid-3c4a8c60-7fff-5ffe-8019-122d303b193d"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">We know that maximizing your game’s reach across different platforms is complex. The </span><a href="https://android-developers.googleblog.com/2026/03/level-up-your-game.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Level Up program</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">serves as your strategic roadmap, helping you prioritize optimizations that drive great experiences on Android. Building on this foundation, we’re doubling down on our investment to make Play the most accessible home for </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">every</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">category of play</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. We’re adding new tools for paid games and making the PC game discovery to purchase seamless. Keep reading to learn more about how we’re creating a </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">bigger stage for your games</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span></span></span></p><p><span><span style="font-family: inherit;"></span></span></p><div class="separator" style="clear: both; text-align: center;"><span><span style="font-family: inherit;"><iframe allowfullscreen="" class="BLOG_video_class" height="450" src="https://www.youtube.com/embed/tuXjvBXjkw8" width="100%" youtube-src-id="tuXjvBXjkw8"></iframe></span></span></div><span><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></span><p></p><p><span id="docs-internal-guid-10ad9e78-7fff-adeb-991b-3196a2590f9c"></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;"><b>Scale your discovery across mobile and PC platforms</b></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Building a bigger stage starts with making your games easier to find—and easier to buy—no matter which device your players prefer. We’re expanding your reach by bringing cross-platform discovery directly to the mobile storefront.&nbsp;</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-align: left;"><li aria-level="1" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">With the new </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">PC section </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">in the Games tab, your PC titles gain high visibility placement among our most active mobile players.&nbsp;</span></span></p></li><li><span id="docs-internal-guid-9ed00bbc-7fff-f4ca-7f9a-6d30835317d1"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">The </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">PC badge </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">ensures your cross-platform investment is recognized. This creates more opportunities to acquire players on mobile and transition them seamlessly to your high-fidelity PC experience.</span></span></span></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span><span style="font-family: inherit;"></span></span></p><div class="separator" style="clear: both; text-align: center;"><span><span style="font-family: inherit;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipoz7AMpBS0gGND0i0wEXa0OfUNfblztjHAYD131yP9Q4igZXsbd_bw1JQvDPznDmJ9u7_FBg1_RbgxwU2qITXy0ChjotQacgowE2b_U5X3nJDypjL5Qw506X9uNNOJE8hGQan_LmhhfbTL8gBVoq8ly2DuyRYg9psw6m1P3g5uvDpsz6jyncukSx8HNE/s960/wishlist%20white%2016x9%20(2).gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="540" data-original-width="960" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipoz7AMpBS0gGND0i0wEXa0OfUNfblztjHAYD131yP9Q4igZXsbd_bw1JQvDPznDmJ9u7_FBg1_RbgxwU2qITXy0ChjotQacgowE2b_U5X3nJDypjL5Qw506X9uNNOJE8hGQan_LmhhfbTL8gBVoq8ly2DuyRYg9psw6m1P3g5uvDpsz6jyncukSx8HNE/s16000/wishlist%20white%2016x9%20(2).gif" /></a></span></span></div><span><span style="font-family: inherit;"><span id="docs-internal-guid-c5efb680-7fff-cc34-1618-ffe873dfcf5a"><div style="text-align: center;"><i style="font-family: &quot;Google Sans&quot;, sans-serif; font-size: 11pt; white-space-collapse: preserve;">PC in the Games tab and PC badging expands your game’s reach</i></div></span></span></span><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-4f00b0f5-7fff-4c99-2782-4d6057953739"></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">With ‘</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">buy once play anywhere</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">’ pricing, we’re making it easier to sell your games across different devices.&nbsp; If you choose to opt-in your mobile game for Google Play Games on PC, you can now offer a single price that covers both mobile and PC versions. We’re rolling out this feature in EAP with select games including </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Brotato: Premium</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.&nbsp;</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">For PC-only games, players can now complete the </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">full purchase journey on Google Play Games on PC</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> with the same trusted security and privacy standards they expect from Google Play.&nbsp;</span></span></p></li></ul><div><span style="white-space-collapse: preserve;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihc5_oMa2rIG6t681thpgdTzE_Wl6uTG4kFdVYKYHQfMGm1-qZatla37FsxIJKyOzM_e17U2_nY6PCIqvw90VXRK-x1V3Nu-fBPDtkU-xKJQAdc257cQBFD5YQ7u6cfHRrTELB4WFBRSA5RvIrL4k8aaTIyumn1ZRLJjbzoKSPotxna-xOB64yL4KeiIM/s960/Buy%20Once%20Play%20Anywhere%20(1)%20(1).gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="540" data-original-width="960" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihc5_oMa2rIG6t681thpgdTzE_Wl6uTG4kFdVYKYHQfMGm1-qZatla37FsxIJKyOzM_e17U2_nY6PCIqvw90VXRK-x1V3Nu-fBPDtkU-xKJQAdc257cQBFD5YQ7u6cfHRrTELB4WFBRSA5RvIrL4k8aaTIyumn1ZRLJjbzoKSPotxna-xOB64yL4KeiIM/s16000/Buy%20Once%20Play%20Anywhere%20(1)%20(1).gif" /></a></div><span id="docs-internal-guid-b69aa441-7fff-24e9-196a-1c6cb9e91eb0"><div style="text-align: center;"><i style="font-family: &quot;Google Sans&quot;, sans-serif; font-size: 11pt; white-space-collapse: preserve;">'</i><i style="font-family: &quot;Google Sans&quot;, sans-serif; font-size: 11pt; white-space-collapse: preserve;">Buy</i><i style="font-family: &quot;Google Sans&quot;, sans-serif; font-size: 11pt; white-space-collapse: preserve;"> once play anywhere’ pricing to sell your games across devices</i></div></span><span style="white-space-collapse: preserve;"><br /></span></div><div><span id="docs-internal-guid-8cec9260-7fff-a07d-4d09-8f18ec18dad7"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;"><b>Lower the purchase barrier with Game Trials&nbsp;</b></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">To help you convert high-intent buyers with less friction, we’re introducing </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Game Trials</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, a feature that enables players to experience your game for a limited time before making a purchase on mobile. Accessible directly from your game’s store listing, Game Trials provides a fast-track for players to start exploring your world with a single tap. Game trials are now in testing with select titles and we’ll roll it out to more titles soon.&nbsp;</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">To ensure this is </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">low maintenance</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> for you, Game Trials is added directly into your Android App Bundle. This enables you to offer a high quality trial without the burden of a separate codebase or a demo version of your app.&nbsp;</span></span></p></li><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">Play ensures trials are </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">secure and seamless</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">. Game Trials are once per user and protects your game while the trial is active. When it ends, players can purchase your game and keep their progress.&nbsp;</span></span></p></li><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">We’re also working on tools that will give you more </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">control</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">—such as specifying a custom time limit or an in-game event to conclude the trial.&nbsp;</span></span></p></li></ul><div><span style="white-space-collapse: preserve;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj-xQhowj-kUiN_9ZjibkD3uThK0gg3Migv1uPiAbcQ8h_LA7kWcB-jbLjxlYLhKFmJxblqg5Ry6RZsd4LcRqH4wcKHYwJ1UTZhKIiN-AH_A4P2syCwQn-9c-xQPcZlqkjsqkGqNP6DpiEG4tut3rDxrLTnfW_0auCmC-H67jNnE4DHRcdMpzCrX_HIsXM" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="540" data-original-width="960" height="360" src="https://blogger.googleusercontent.com/img/a/AVvXsEj-xQhowj-kUiN_9ZjibkD3uThK0gg3Migv1uPiAbcQ8h_LA7kWcB-jbLjxlYLhKFmJxblqg5Ry6RZsd4LcRqH4wcKHYwJ1UTZhKIiN-AH_A4P2syCwQn-9c-xQPcZlqkjsqkGqNP6DpiEG4tut3rDxrLTnfW_0auCmC-H67jNnE4DHRcdMpzCrX_HIsXM" width="640" /></a></div></div><div><span style="white-space-collapse: preserve;"><br /></span></div><div style="text-align: center;"><span id="docs-internal-guid-e3a67817-7fff-cf89-ac44-a2118f6463ce"><span face="&quot;Google Sans&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><i>Game Trial for DREDGE to help convert high-intent buyers</i></span></span></div></span></div><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;"><b>Diversify your revenue with a dedicated player community on Play Pass</b></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit; font-size: x-large;"><b><span id="docs-internal-guid-b221101e-7fff-4471-933b-a9e754398e55"></span></b></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Play Pass</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> is another way to diversify revenue and grow your player audience. It has been a strong launchpad for indie hits such as </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Isle of Arrows</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Slay the Spire</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, and </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Dead Cells</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. With Play Pass, you can reach highly dedicated players seeking a more curated gaming experience, free of ads and in-app purchases. To help you deepen engagement, paid titles on Play Pass can now opt in to </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Google Play Games on PC</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #222222; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">— making it easy for players to find and play your games on a larger screen. </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Later this year, you can nominate your game through a streamlined opt-in process directly in Play Console.&nbsp;&nbsp;&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: inherit;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0mu1B2Nb7dkiusLT0_4QLzlJ8Eqzv0bI6r6iz10XGBXKbo9K87qv9FuhYhXXkmyUqrTLSMJ5xcIfHO1Me9pdHK9SVtJY5lNtUrjUOJfm9DNIf4ZrW_CwdgrrYrq4fgaOkGuQGwjnOGmVGPh00giL8z-c8kCD-0XMPzhphuN4ddQzn7B8NcUblllqkG5Y/s1313/Blog-Quote%2001.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="732" data-original-width="1313" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0mu1B2Nb7dkiusLT0_4QLzlJ8Eqzv0bI6r6iz10XGBXKbo9K87qv9FuhYhXXkmyUqrTLSMJ5xcIfHO1Me9pdHK9SVtJY5lNtUrjUOJfm9DNIf4ZrW_CwdgrrYrq4fgaOkGuQGwjnOGmVGPh00giL8z-c8kCD-0XMPzhphuN4ddQzn7B8NcUblllqkG5Y/s16000/Blog-Quote%2001.jpg" /></a></span></div><span style="font-family: inherit;"><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh11Inautn7skXE7Q4zL7DObdhyphenhyphenKiGNdFV2GUYafSdYJZ71g9rGKepZdtDeJfA3zJkavYiIRXWYQy5thyphenhyphenE9SwdfbvLAkK88UFtVIajWdmQUg2KyE75mD1yPD5HMxWrV60rdvJOcTWnfY3Cj0l0b5DULmZsuuVrlNev1y5ldl78dys-Jf2Dra38FCQ1z534/s1313/Blog-Quote%2002.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="732" data-original-width="1313" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh11Inautn7skXE7Q4zL7DObdhyphenhyphenKiGNdFV2GUYafSdYJZ71g9rGKepZdtDeJfA3zJkavYiIRXWYQy5thyphenhyphenE9SwdfbvLAkK88UFtVIajWdmQUg2KyE75mD1yPD5HMxWrV60rdvJOcTWnfY3Cj0l0b5DULmZsuuVrlNev1y5ldl78dys-Jf2Dra38FCQ1z534/s16000/Blog-Quote%2002.jpg" /></a></div><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;"><b>Drive long term sales with Wishlists and Discounts</b></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-62a34d75-7fff-af6d-e6cc-ce216d51d69b"></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Wishlists </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">and </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Discounts</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> are one of the most effective ways to capture player intent and drive long term sales. To support players at every stage of their purchase journey, we’re integrating them directly into Play. Players can save titles to their wishlist and manage them from library settings. To keep your game top-of-mind, players will receive automated notifications for your latest discounts — starting with mobile and expanding soon to PC games.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: inherit;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFTQuI3Clp4krABi-bTQPP8pQDG-Kitr-EiGY1XonSqDmg1QaBd5Uep6WIRw-MfIIbEryR_g1WO-SMQZVP7uwR2DlRuOlcZb-onSuemn0v-xsgKpmYP5acMPziNuSaSW9PP45eB_DQ7tJ8oK5pVKe24WuQLFMyd_VW_hF3RCOXNiU8Sevv6rOz72UZX5g/s1920/Wishlist%20with%20Monument%20Valley.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFTQuI3Clp4krABi-bTQPP8pQDG-Kitr-EiGY1XonSqDmg1QaBd5Uep6WIRw-MfIIbEryR_g1WO-SMQZVP7uwR2DlRuOlcZb-onSuemn0v-xsgKpmYP5acMPziNuSaSW9PP45eB_DQ7tJ8oK5pVKe24WuQLFMyd_VW_hF3RCOXNiU8Sevv6rOz72UZX5g/s16000/Wishlist%20with%20Monument%20Valley.gif" /></a></span></div><span style="font-family: inherit;"><span id="docs-internal-guid-d6b8ee2d-7fff-e6e6-abc8-50422f50198a"><div style="text-align: center;"><i style="font-family: &quot;Google Sans&quot;, sans-serif; font-size: 11pt; white-space-collapse: preserve;">Wishlist and discount notifications drives long term sales, rolling out today</i></div></span></span><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;"><b>How leading studios are finding a new path to success on Play</b></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-7b2a5427-7fff-3d01-a2f7-4da42a9d0570"></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">We’re thrilled to welcome </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Sledding Game</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">9 Kings</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Potion Craft, Moonlight Peaks, an</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">d </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Low Budget Repairs</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to Play <a href="#fn1" id="ref1">[1]</a></span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. It marks an exciting expansion of our catalog and a step forward in our mission to build a bigger gaming ecosystem for all developers. This growth is fueled by our developer community, whose feedback continues to shape our roadmap and help us better support your success.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span><span style="font-family: inherit;"></span></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: inherit;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha3kVPg47UJYqtY29ksPkEzo6qi7FProXJo9cRnfDA5npCh3WA3PyN2nefsixaXArpA3H3Fv0eKoE-CvVCujeFvwMHH3aAYps0VTA6sNwrQvMFf4eXcSDWffYHJXd8Mqzz7Gn-hNkLFUx7mXhoHq7jJWQkE7AblV26U2ZYYqnawYC2VHNen1KoLF4kDFU/s960/New%20Game%20Title%20Cards%20(1).gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="540" data-original-width="960" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha3kVPg47UJYqtY29ksPkEzo6qi7FProXJo9cRnfDA5npCh3WA3PyN2nefsixaXArpA3H3Fv0eKoE-CvVCujeFvwMHH3aAYps0VTA6sNwrQvMFf4eXcSDWffYHJXd8Mqzz7Gn-hNkLFUx7mXhoHq7jJWQkE7AblV26U2ZYYqnawYC2VHNen1KoLF4kDFU/s16000/New%20Game%20Title%20Cards%20(1).gif" /></a></span></div><div class="separator" style="clear: both; text-align: center;"><span style="font-family: inherit;"><i style="font-family: &quot;Google Sans&quot;, sans-serif; font-size: 11pt; white-space-collapse: preserve;">Sledding Game, 9 Kings, Potion Craft, Moonlight Peaks, and Low Budget Repairs is coming to Play. </i></span></div><span style="white-space-collapse: preserve;"><div style="text-align: center;"><br /></div></span><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">That mission brings us to GDC and the </span><a href="https://gdconf.com/awards-overview/" style="font-family: inherit; text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Independent Games Festival (IGF) Awards</span></a>&nbsp;<a href="#fn2" id="ref2">[2]</a><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, where the next generation of games awaits! This year, we’re inviting you to come along for the ride as we go backstage to chat with the finalists and winners, sharing the moments of triumph and the creative stories behind their development. </span><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Not joining us at GDC?</span><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> You can take the next step in your journey to </span><a href="https://play.google.com/console/about/programs/new-to-play/" style="font-family: inherit; text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">launch your game on Google Play today</span></a><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJelMM88HZbMdWGbSZ52u5ygHJDWNuhIWwS8BdFmtbTmcvvgoDcJNRGTC98wWbMD5karacY2GSQxa7-iW4lOdin72SG0Lj83tL864yVkNGaecQ0L1Yn6K9niZAOAYvjQzO2F1kzPhz5gQepMCIYZQgOf9sUldapGHwYh_UwbnG0SeiF6vOYZjy9cGV6H4/s1313/Blog-Quote%2003.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="732" data-original-width="1313" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJelMM88HZbMdWGbSZ52u5ygHJDWNuhIWwS8BdFmtbTmcvvgoDcJNRGTC98wWbMD5karacY2GSQxa7-iW4lOdin72SG0Lj83tL864yVkNGaecQ0L1Yn6K9niZAOAYvjQzO2F1kzPhz5gQepMCIYZQgOf9sUldapGHwYh_UwbnG0SeiF6vOYZjy9cGV6H4/s16000/Blog-Quote%2003.jpg" /></a></div><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-size: x-small;">1.&nbsp;</span><span face="Arial, sans-serif" style="font-size: 10pt; white-space-collapse: preserve;">Sledding Game, 9 Kings, Potion Craft, and Moonlight Peaks are coming to Google Play in 2026. Low Budget Repairs is scheduled for release in 2027. <a href="#ref1" id="fn1">[Back]</a></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-size: x-small;"><span face="Arial, sans-serif" style="white-space-collapse: preserve;">2.</span><span face="Arial, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">&nbsp;</span></span><span face="Arial, sans-serif" style="font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Independent Games Festival (IGF) Awards is hosted by Game Developers Conference (GDC) and requires a valid </span><a href="https://gdconf.com/passes-pricing/" style="text-decoration-line: none;"><span face="Arial, sans-serif" style="color: #1155cc; font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">GDC pass</span></a><span face="Arial, sans-serif" style="font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> for entry. <a href="#ref2" id="fn2">[Back]</a></span></p>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-48697955245034081702026-03-10T16:00:00.000-07:002026-03-11T07:31:00.292-07:00Boosting Android Performance: Introducing AutoFDO for the Kernel<meta content="https://blogger.googleusercontent.com/img/a/AVvXsEgZ9Foucs6Tse-xYRusArQZXBRqo2gVKjuSkRthBVzaZHwTsmAO0Tdr2be4dc7eiztwjYkJu-ovH81l3Mo6kCIcAf6fy0Gqm2_oFSLu_rvJxqjOOw4AOv75z7JR0aDGeyVHttbgptofW06086khahzQoRD70yxFFE04XL8SLgIqZkor9JYQj8mClhJprDM" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></meta> <img src="https://blogger.googleusercontent.com/img/a/AVvXsEgZ9Foucs6Tse-xYRusArQZXBRqo2gVKjuSkRthBVzaZHwTsmAO0Tdr2be4dc7eiztwjYkJu-ovH81l3Mo6kCIcAf6fy0Gqm2_oFSLu_rvJxqjOOw4AOv75z7JR0aDGeyVHttbgptofW06086khahzQoRD70yxFFE04XL8SLgIqZkor9JYQj8mClhJprDM" style="display: none;" /><name content="IMG" twitter:image=""><p><i></i></p><div class="separator" style="clear: both; text-align: justify;"><i style="text-align: left;">Posted by&nbsp;<span face="&quot;Google Sans&quot;, sans-serif" style="color: #1b1c1d; white-space-collapse: preserve;">Yabin Cui, </span><span face="&quot;Google Sans&quot;, sans-serif" style="color: #1b1c1d; white-space-collapse: preserve;">Software Engineer</span></i></div><p><span face="&quot;Google Sans&quot;, sans-serif" style="color: #1b1c1d; font-size: 11pt; white-space-collapse: preserve;"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgZouspJuAK1hiYB3SOpSV12Vtx5kkLWWeeLorM6lwTCDx2sIzLyK4meq7iB-E764EDli1XgiDWaD7FjeXDsRGr5WecURE2EVV4ieHCHRwvHFOnNlTPhYMDcdeFKm5PBF4_VGTJOG5XjJf9BzF2wvVzdxo34vOhJgz6LnIBaNa0wea-IVrCGRfFI4dhfpo" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="2507" data-original-width="8419" src="https://blogger.googleusercontent.com/img/a/AVvXsEgZouspJuAK1hiYB3SOpSV12Vtx5kkLWWeeLorM6lwTCDx2sIzLyK4meq7iB-E764EDli1XgiDWaD7FjeXDsRGr5WecURE2EVV4ieHCHRwvHFOnNlTPhYMDcdeFKm5PBF4_VGTJOG5XjJf9BzF2wvVzdxo34vOhJgz6LnIBaNa0wea-IVrCGRfFI4dhfpo=s16000" /></a></div><br /><br /></name><p></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><br /><br /><span style="font-family: inherit;"><span style="font-family: inherit;">We are the Android LLVM toolchain team. One of our top priorities is to improve Android performance through optimization techniques in the LLVM ecosystem. We are constantly searching for ways to make Android faster, smoother, and more efficient.&nbsp;</span>While much of our optimization work happens in userspace, the kernel remains the heart of the system. Today, we’re excited to share how we are bringing <a href="https://research.google/pubs/autofdo-automatic-feedback-directed-optimization-for-warehouse-scale-applications/">Automatic Feedback-Directed Optimization (AutoFDO)</a> to the Android kernel to deliver significant performance wins for users.</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><br /></span></p><h1 style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="color: #1f1f1f; white-space: pre;"><span style="font-family: inherit; font-size: x-large;">What is AutoFDO?</span></span></h1><span style="font-family: inherit;"><span style="font-family: inherit;"><div><span style="font-family: inherit;"><span style="font-family: inherit;"><br /></span></span></div>During a standard software build, the compiler makes thousands of small decisions, such as whether to inline a function and which branch of a conditional is likely to be taken, based on static code hints.</span>While these heuristics are useful, they don't always accurately predict code execution during real-world phone usage.<br /><br />AutoFDO changes this by using real-world execution patterns to guide the compiler. These patterns represent the most common instruction execution paths the code takes during actual use, captured by recording the CPU's branching history. While this data can be collected from fleet devices, for the kernel we synthesize it in a lab environment using representative workloads, such as running the top 100 most popular apps. We use a sampling profiler to capture this data, identifying which parts of the code are 'hot' (frequently used) and which are 'cold'.&nbsp;</span>When we rebuild the kernel with these profiles, the compiler can make much smarter optimization decisions tailored to actual Android workloads.<br /><br /><span style="font-family: inherit;">To understand the impact of this optimization, consider these key facts:<br /></span><ul style="text-align: left;"><li><span style="font-family: inherit;">On Android, the kernel accounts for about 40% of CPU time.</span></li><li><span style="font-family: inherit;">We are already using AutoFDO to optimize native executables and libraries in the userspace, achieving about 4% cold app launch improvement and a 1% boot time reduction.</span></li></ul><h3 style="text-align: left;"><span style="color: #1f1f1f; white-space: pre;"><span style="font-family: inherit; font-size: x-large;">Real-World Performance Wins</span></span></h3><p></p>We have seen impressive improvements across key Android metrics by leveraging profiles from controlled lab environments. These profiles were collected using app crawling and launching, and measured on Pixel devices across the 6.1, 6.6, and 6.12 kernels.<br /><br />The most noticeable improvements are listed below. Details on the AutoFDO profiles for these kernel versions can be found in the respective Android kernel repositories for <a href="https://android.googlesource.com/kernel/common/+/refs/heads/android16-6.12/gki/aarch64/afdo/">android16-6.12</a> and <a href="https://android.googlesource.com/kernel/common/+/refs/heads/android15-6.6/android/gki/aarch64/afdo/">android15-6.6</a> kernels.<div><br /><div class="separator" style="clear: both; text-align: center;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; margin-left: 1em; margin-right: 1em; vertical-align: baseline;"><span face="&quot;Work Sans&quot;, sans-serif" style="color: #1f1f1f; font-size: medium; font-weight: 700; white-space-collapse: preserve;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjtci3mLCc_GGuPr1gfSePimxXfUI1grqA9t7P2sFkCxJOKrrUV15xaF_PigMi7faJ_pFeN5hWYh5Rprptb1SiNDNVVvIl-a96BDw14nPyRU233gW2pK5xUU9OsLY5AauTDdAWjzHnQ_Xv78pb-v8Q4FxuDOnFAhhCqgDNCt-IFGLLufruRg3RdXBFiigs" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1811" data-original-width="3037" height="382" src="https://blogger.googleusercontent.com/img/a/AVvXsEjtci3mLCc_GGuPr1gfSePimxXfUI1grqA9t7P2sFkCxJOKrrUV15xaF_PigMi7faJ_pFeN5hWYh5Rprptb1SiNDNVVvIl-a96BDw14nPyRU233gW2pK5xUU9OsLY5AauTDdAWjzHnQ_Xv78pb-v8Q4FxuDOnFAhhCqgDNCt-IFGLLufruRg3RdXBFiigs=w640-h382" width="640" /></a></div><br /><br /></span></span></div><h1 style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span id="docs-internal-guid-7bcaac6d-7fff-0bbd-d33e-1f1fef657e40"></span></h1><div class="separator" style="clear: both; text-align: center;"><br /></div><p></p>These aren't just theoretical numbers. They translate to a snappier interface, faster app switching, extended battery life, and an overall more responsive device for the end user.<div class="separator" style="clear: both;"><span id="docs-internal-guid-6dc00779-7fff-a6b4-49e8-8d561c2d0948"><h1 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 24pt;"><span face="&quot;Work Sans&quot;, sans-serif" style="color: #1f1f1f; font-size: x-large; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">How It Works: The Pipeline</span></h1></span>Our deployment strategy involves a sophisticated pipeline to ensure profiles stay relevant and performance remains stable.</div><div class="separator" style="clear: both;"><br /><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="margin-left: 1em; margin-right: 1em;"><img src="https://blogger.googleusercontent.com/img/a/AVvXsEjoL1JktZ8i47JLyp1xsBdgJbunmtCLZp-e41Qg8TgaBI7__jAvRXd3XYc-86HSm3e1ZqouHNSWr26hljLdJ_nO7H1UYS918D_93Iw2xxf0oYoX_5tnvYMd0-fCyXWQfNXwymh-nf0ikBwU4_1tHLN2MxTF5sWwh8NLYG63CsLYtHqWbsNkL8KCLBPj-gI=w640-h360" /></div></div><div style="text-align: center;"><span><br /></span></div></div><span id="docs-internal-guid-674f415f-7fff-2e15-e912-2f8ec5467c4a"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"></p><h4 style="text-align: left;"><span style="font-family: inherit; font-size: large;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Step 1: Profile Collection</span></span></h4><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">While we rely on our internal test fleet to profile userspace binaries, we shifted to a controlled lab environment for the </span><a href="https://source.android.com/docs/core/architecture/kernel/generic-kernel-image" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Generic Kernel Image (GKI)</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. Decoupling profiling from the device release cycle allows for flexible, immediate updates independent of deployed kernel versions. Crucially, tests confirm that this lab-based data delivers performance gains comparable to those from real-world fleets.</span></span><p></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-align: left;"><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Tools &amp; Environment:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> We flash test devices with the latest kernel image and use </span><a href="https://android.googlesource.com/platform/system/extras/+/refs/heads/android16-qpr2-release/simpleperf/doc/" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">simpleperf</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> to capture instruction execution streams. This process relies on hardware capabilities to </span><a href="https://android.googlesource.com/platform/prebuilts/simpleperf/+/refs/heads/mirror-goog-main-prebuilts/doc/collect_etm_data_for_autofdo.md" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">record branching history</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">, specifically utilizing </span><a href="https://developer.arm.com/documentation/102856/0100/Embedded-Trace-Extension?lang=en" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;"> </span><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">ARM Embedded Trace Extension (ETE)</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> and </span><a href="https://developer.arm.com/documentation/102856/0100/Trace-Buffer-Extension" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">ARM Trace Buffer Extension (TRBE)</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> on Pixel devices.</span></span></div></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Workloads: </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">We construct a representative workload using the top 100 most popular apps from the </span><a href="https://android.googlesource.com/platform/test/app_compat/csuite/" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">Android App Compatibility Test Suite (C-Suite)</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">. To capture the most accurate data, we focus on:</span></span></div></li><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="2" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><a href="https://developer.android.com/topic/performance/vitals/launch-time" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">App Launching</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> Optimizing for the most visible user delays</span></span></div></li><li aria-level="2" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><a href="https://developer.android.com/studio/test/other-testing-tools/app-crawler" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">AI-Driven App Crawling</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> Simulating contiguous, evolving user interactions</span></span></div></li><li aria-level="2" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">System-Wide Monitoring:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> Capturing not only foreground app activities, but also critical background workloads and inter-process communications</span></span></div></li></ul><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Validation:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> This synthesized workload shows an </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">85% similarity</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> to execution patterns collected from our internal fleet.</span></span></div></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><div style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Targeted Data:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> By repeating these tests sufficiently, we capture high-fidelity execution patterns that accurately represent real-world user interaction with the most popular applications. Furthermore, this extensible framework allows us to seamlessly integrate additional workloads and benchmarks to broaden our coverage.</span></span></div></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"></p><h4 style="text-align: left;"><span style="font-family: inherit; font-size: large;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Step 2: Profile Processing</span></span></h4><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">We post-process the raw trace data to ensure it is clean, effective, and ready for the compiler.</span></span><p></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-align: left;"><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Aggregation:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> We consolidate data from multiple test runs and devices into a single system view.</span></span></div></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Conversion: </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">We </span><a href="https://android.googlesource.com/platform/prebuilts/simpleperf/+/refs/heads/mirror-goog-main-prebuilts/doc/collect_etm_data_for_autofdo.md#a-complete-example_kernel" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">convert</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> raw traces into the AutoFDO profile format, filtering out unwanted symbols as needed.</span></span></div></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><div style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Profile Trimming:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> We trim profiles to remove data for "cold" functions, allowing them to use standard optimization. This prevents regressions in rarely used code and avoids unnecessary increases in binary size.</span></span></div></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"></p><h4 style="text-align: left;"><span style="font-family: inherit; font-size: large;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Step 3: Profile Testing</span></span></h4><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Before deployment, profiles undergo rigorous verification to ensure they deliver consistent performance wins without stability risks.</span></span><p></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-align: left;"><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Profile &amp; Binary Analysis:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> We strictly compare the new profile's content (including hot functions, sample counts, and profile size) against previous versions. We also use the profile to build a new kernel image, analyzing binaries to ensure that changes to the text section are consistent with expectations.</span></span></div></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><div style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Performance Verification:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> We run targeted benchmarks on the new kernel image. This confirms that it maintains the performance improvements established by previous baselines.</span></span></div></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"></p><h4 style="text-align: left;"><span style="font-family: inherit; font-size: large;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Continuous Updates</span></span></h4><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Code naturally "drifts" over time, so a static profile would eventually lose its effectiveness. To maintain peak performance, we run the pipeline continuously to drive regular updates:</span></span><p></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-align: left;"><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Regular Refresh:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> We refresh profiles in </span><a href="https://source.android.com/docs/core/architecture/kernel/android-common" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">Android kernel LTS branches</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> ahead of each GKI release, ensuring every build includes the latest profile data.</span></span></div></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><div style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Future Expansion:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> We are currently delivering these updates to the <span style="color: #188038;">android16-6.12</span> and <span style="color: #188038;">android15-6.6</span> branches and will expand support to newer GKI versions, such as the upcoming </span></span><span style="color: #188038; text-wrap-mode: wrap;">android17-6.18.</span></div></li></ul></span><span style="font-family: inherit;"><div><span id="docs-internal-guid-8a798ebc-7fff-0d6a-2784-1b52cbf704dc"><div><h1 style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Work Sans, sans-serif" style="color: #1f1f1f; font-size: x-large;"><span style="font-family: inherit; white-space-collapse: preserve;"><b>Ensuring Stability</b></span></span></h1></div><div style="text-align: left;"><span id="docs-internal-guid-d43d1853-7fff-f35f-1799-ab58dc3a1260"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">A common question with profile-guided optimization is whether it introduces stability risks. Because AutoFDO primarily influences compiler heuristics, such as function inlining and code layout, rather than altering the source code's logic, it preserves the functional integrity of the kernel. This technology has already been proven at scale, serving as a standard optimization for Android platform libraries, ChromeOS, and Google’s own server infrastructure for years.</span></span></span></div><div style="text-align: left;"><span><span face="&quot;Work Sans&quot;, sans-serif" style="color: #1f1f1f; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></div><div><span id="docs-internal-guid-226a7529-7fff-3807-ba5d-0ed126851919"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">To further guarantee consistent behavior, we apply a "conservative by default" strategy. Functions not captured in our high-fidelity profiles are optimized using standard compiler methods. This ensures that the "cold" or rarely executed parts of the kernel behave exactly as they would in a standard build, preventing performance regressions or unexpected behaviors in corner cases.</span></span></p><h1 style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span face="Work Sans, sans-serif" style="color: #1f1f1f; font-size: x-large;"><span style="white-space-collapse: preserve;"><b>Looking Ahead</b></span></span></h1><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">We are currently deploying AutoFDO across the </span><span style="color: #188038; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">android16-6.12</span><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> and </span><span style="color: #188038; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">android15-6.6</span><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> branches. Beyond this initial rollout, we see several promising avenues to further enhance the technology:</span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Expanded Reach:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> We look forward to deploying AutoFDO profiles to newer GKI kernel versions and additional build targets beyond the current </span><span style="color: #188038; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">aarch64</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> support.</span></span></p></li><li aria-level="1" dir="ltr" style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">GKI Module Optimization:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> Currently, our optimization is focused on the main kernel binary (</span><span style="color: #188038; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">vmlinux</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">). Expanding AutoFDO to GKI modules could bring performance benefits to a larger portion of the kernel subsystem.</span></span></p></li><li aria-level="1" dir="ltr" style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Vendor Module Support:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> We are also interested in supporting AutoFDO for vendor modules built using the </span><a href="https://android.googlesource.com/kernel/build/+/refs/heads/main/kleaf/docs/ddk/main.md" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">Driver Development Kit (DDK)</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">. With support already available in our build system (</span><a href="https://android.googlesource.com/kernel/build/+/refs/heads/main/kleaf/docs/kleaf.md" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">Kleaf</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">) and profiling tools (</span><a href="https://android.googlesource.com/platform/prebuilts/simpleperf/+/refs/heads/mirror-goog-main-prebuilts/doc/collect_etm_data_for_autofdo.md#A-complete-example_kernel-module-using-DDK" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">simpleperf</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">), this allows vendors to apply these same optimization techniques to their specific hardware drivers.</span></span></p></li><li aria-level="1" dir="ltr" style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Broader Profile Coverage:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> There is potential to collect profiles from a wider range of Critical User Journeys (CUJs) to optimize them.</span></span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">By bringing AutoFDO to the Android kernel, we’re ensuring that the very foundation of the OS is optimized for the way you use your device every day.</span></span></p><div><span face="&quot;Work Sans&quot;, sans-serif" style="color: #1f1f1f; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div></span></div></span></div><p></p></span></div>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-3698730813535025922026-03-05T10:03:00.000-08:002026-03-06T07:48:49.662-08:00Instagram and Facebook deliver instant playback and boost user engagement with Media3 PreloadManager<meta content="https://blogger.googleusercontent.com/img/a/AVvXsEhXB1ZjhWJDefiDDfvJ95aSz_iWOvSXzkQVz1evjcKv55c3vJxaH7FOB0Uc59fze9dDoT2Z72nnWwC3uArzCP6M4Utl7_rZBJ-yhp13TUprrloyEc3UkixW8QDs1HVFrSqGTlXeumIzX06hR20HHqQFCk929EoEeN89Vxi37T7RKO-tDtzyeptShh7Ps7Y" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></meta><name content="IMG" twitter:image=""><p><i><span style="font-family: inherit;"></span></i></p><div class="separator" style="clear: both; text-align: justify;"><i style="text-align: left;"><span style="font-family: inherit;">Posted by&nbsp;<span style="white-space-collapse: preserve;">Mayuri Khinvasara Khabya, Developer Relations Engineer<span style="font-family: inherit;"> </span></span></span></i><em style="background-color: white; box-sizing: inherit; color: #202124; text-align: left;"><span style="font-family: inherit;">(<a href="https://www.linkedin.com/in/mayurikhinvasara" style="box-sizing: inherit; color: #1769e0; outline: 0px; text-decoration-color: rgb(23, 105, 224); text-decoration-line: initial; word-break: break-word;" target="_blank">LinkedIn</a>&nbsp;and&nbsp;<a href="https://x.com/mayuri_k" style="box-sizing: inherit; color: #1769e0; outline: 0px; text-decoration-color: rgb(23, 105, 224); text-decoration-line: initial; word-break: break-word;" target="_blank">X</a>)</span></em></div><p></p><div class="separator" style="clear: both; text-align: center;"><img src="https://blogger.googleusercontent.com/img/a/AVvXsEjvqIJhh25TyRVuCZCT-R3zfl9dQJus8N-NBHrgYMi-QjkC9KeuxbL4yI8hyehLJJUTa09306fj53Em4BrpTY81jLJfw_eNKR5oaU5LuAb_X9t2m329xwu5bi-bDqE0ergu5AXCPFjeRNJZial6lnuMk8AtA-Nh9J2EZYiQlM8WU5ja_1Z3em1ki1KIILI=s16000" /></a></div></name><div><name content="IMG" twitter:image=""><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">In the dynamic world of social media, user attention is won or lost quickly. Meta apps (Facebook and Instagram) are among the world's largest social platforms and serve billions of users globally. For Meta, delivering videos seamlessly isn't just a feature, it's the core of their user experience. Short-form videos, particularly Facebook Newsfeed and Instagram Reels, have become a primary driver of engagement. They enable creative expression and rapid content consumption; connecting and entertaining people around the world.&nbsp;</span></span></p><div style="text-align: left;"><br /></div><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">This blog post takes you through the journey of how Meta transformed video playback for billions by delivering true instant playback.</span></span></p><div style="text-align: left;"><br /></div><span style="font-family: inherit; font-size: large;"><b>The latency gap in short form videos</b></span><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Short-form videos lead to highly fast paced interactions as users quickly scroll through their feeds. Delivering a seamless transition between videos in an ever-changing feed introduces unique hurdles for instantaneous playback. Hence we need solutions that go beyond traditional disk caching and standard reactive playback strategies.</span></span></p><div style="text-align: left;"><span style="font-family: inherit; font-size: large;"><br /></span></div><span style="font-family: inherit; font-size: large;"><b>The path forward with Media3 PreloadManager</b></span><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">To address the shifts in consumption habits from rise in short form content and the limitations of traditional long form playback architecture, Jetpack Media3 introduced </span><a href="https://developer.android.com/media/media3/exoplayer/preloading-media/preloadmanager/create" style="text-decoration-line: none;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">PreloadManager</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. This component allows developers to move beyond disk caching, offering granular control and customization to keep media ready in memory before the user hits play. Read this </span><a href="https://android-developers.googleblog.com/2025/09/introducing-preloading-with-media3.html" style="text-decoration-line: none;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">blog series</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> to understand technical details about media playback with PreloadManager.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></p><span style="font-family: inherit; font-size: x-large;"><b>How Meta achieved true instant playback</b></span></name></div><div><br /></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit; font-size: large;"><b>Existing Complexities</b></span><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Previously, Meta used a combination of warmup (to get players ready) and prefetch (to cache content on disk) for video delivery. While these methods helped improve network efficiency, they introduced significant challenges. Warmup required instantiating multiple player instances sequentially, which consumed significant memory and limited preloading to only a few videos. This high resource demand meant that a more scalable robust solution could be applied to deliver the instant playback expected on modern, fast-scrolling social feeds.</span></span></p><span style="font-family: inherit; font-size: large;"><b><br />Integrating Media3 PreloadManager</b></span><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></div><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">To achieve truly instant playback, Meta's Media Foundation Client team integrated the Jetpack Media3 PreloadManager into Facebook and Instagram. They chose the </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 12pt; white-space-collapse: preserve;">DefaultPreloadManager</span><span style="color: black; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> to unify their preloading and playback systems.</span><span style="color: black; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: black; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">This integration required refactoring Meta's existing architecture to enable efficient resource sharing between the </span><span id="docs-internal-guid-a17eab99-7fff-651b-2a81-4767ebd56a67"><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">PreloadManager</span></span><span id="docs-internal-guid-f09cc210-7fff-85c0-05b0-24d6fa73f097" style="font-family: inherit;"><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-size: x-small;"> </span></span></span><span style="color: black; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">and </span><span id="docs-internal-guid-7bf01f62-7fff-7e26-4e3b-8a8b01308fbc"><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">ExoPlayer</span></span><span id="docs-internal-guid-b190b565-7fff-9ec6-7adb-3c6a5be9a05a" style="font-family: inherit;"><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-size: x-small;"> </span></span></span><span style="color: black; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">instances. This strategic shift provided a key architectural advantage: the ability to parallelize preloading tasks and manage many videos using a single player instance. This dramatically increased preloading capacity while eliminating the high memory complexities of their previous approach.</span></div><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="white-space-collapse: preserve;"><br /></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhWJcwv1tyxDVkxTZGKgkxjZRJkqLaECAJEsrvn6zTCWbvAW6zGMc2jms8D89r1Zb1RtWCh4z0Cpg0gbQopXELi0j23zSdHbZWkwzJjbzCl5Fx8pGvrEHXrkUCLcrqs8iPgNIYWOomkx1k1oDzSurm6gvTrK9FdZdjxlhfRtGEwBTROO53edROKBxADbUU" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="720" data-original-width="1280" src="https://blogger.googleusercontent.com/img/a/AVvXsEhWJcwv1tyxDVkxTZGKgkxjZRJkqLaECAJEsrvn6zTCWbvAW6zGMc2jms8D89r1Zb1RtWCh4z0Cpg0gbQopXELi0j23zSdHbZWkwzJjbzCl5Fx8pGvrEHXrkUCLcrqs8iPgNIYWOomkx1k1oDzSurm6gvTrK9FdZdjxlhfRtGEwBTROO53edROKBxADbUU=s16000" /></a></div><br /><br /><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><b id="docs-internal-guid-2593bf55-7fff-4aae-da61-85468d168885" style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></span></p><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 0pt;"><span id="docs-internal-guid-001cb2df-7fff-9b32-3834-d7bd9cd59281" style="font-weight: normal;"><span face="&quot;Google Sans&quot;, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Optimization and Performance Tuning</span></span></span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The team then performed extensive testing and iterations to optimize performance across Meta's diverse global device ecosystem. Initial aggressive preloading sometimes caused issues, including increased memory usage and scroll performance slowdowns. To solve this, they fine-tuned the implementation by using careful memory measurements, considering device fragmentation, and tailoring the system to specific UI patterns.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><div style="text-align: left;"><span id="docs-internal-guid-9dac049a-7fff-c4a3-8129-2a9063978181"><span face="&quot;Google Sans&quot;, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;"><b>Fine tuning implementation to specific UI patterns</b></span></span></span></div><div><span><span><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Meta applied different preloading strategies and tailored the behavior to match the specific UI patterns of each app:</span></p><br /><ul style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; text-wrap-mode: nowrap; vertical-align: baseline;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Facebook Newsfeed</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">: The UI prioritizes the video currently coming into view. The manager preloads only the current video to ensure it starts the moment the user pauses their scroll. This "</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">current-only</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">" focus minimizes data and memory footprints in an environment where users may see many static posts between videos. </span><span style="background-color: white; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">While the system is presently designed to preload just the video in view, it can be adjusted to also preload upcoming (future) videos.</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">&nbsp;</span></p></li></ul><br /><ul style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; text-wrap-mode: nowrap; vertical-align: baseline;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Instagram Reels</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">: This is a pure video environment where users swipe vertically. For this UI, the team implemented an "</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">adjacent preload</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">" strategy. The PreloadManager keeps the videos immediately after the current Reel ready in memory. This bi-directional approach ensures that whether a user swipes up or down, the transition remains instant and smooth. The result was a dramatic improvement in the Quality of Experience (QoE) including improvements in Playback Start and Time to First Frame for the user.</span></p></li></ul><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><br /></span></p><h3 dir="ltr" style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 4pt; margin-top: 0pt; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-7e8c5981-7fff-f0a4-dfea-2d61bbce9e6f"><span face="&quot;Google Sans&quot;, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;"><span style="font-size: large;"><span style="font-family: inherit;">Scaling for a diverse global device ecosystem</span></span></span></span></h3><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Scaling a high-performance video stack across billions of devices requires more than just aggressive preloading; it requires intelligence. Meta faced initial challenges with memory pressure and scroll lag, particularly on mid-to-low-end hardware. To solve this, they built a </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Device Stress Detection</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> system around the Media3 implementation. The apps now monitor I/O and CPU signals in real-time. If a device is under heavy load, preloading is paused to prioritize UI responsiveness.</span></p><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><b id="docs-internal-guid-a92d63fa-7fff-560f-32f8-4244032f7693" style="font-weight: normal;"><br /></b></span></p><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">This device-aware optimization ensures that the benefit of instant playback doesn't come at the cost of system stability, allowing even users on older hardware to experience a smoother, uninterrupted feed.</span></p><p dir="ltr" style="background-color: transparent; color: black; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><br /></p></span></span><div class="separator" style="clear: both; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: center; vertical-align: baseline;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgSUviCSWAgpOLDDIfVs8SWxCZ_AHZqqHk4t7FSBFYZmrlsYPd1JBRTVg72S0SviQLOaAMUNoBaAcBmywW6jQ0SocI7n1KdlVrRUkux1qT9Jcb0rzfgk_I2L8arv9OPVyCz8JtDYoOXM3YHuu0mXrGm5hr-6zQdgQQjZS7gJ8ZlgooF5kZd80O4dR3S6Qg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img src="https://blogger.googleusercontent.com/img/a/AVvXsEgSUviCSWAgpOLDDIfVs8SWxCZ_AHZqqHk4t7FSBFYZmrlsYPd1JBRTVg72S0SviQLOaAMUNoBaAcBmywW6jQ0SocI7n1KdlVrRUkux1qT9Jcb0rzfgk_I2L8arv9OPVyCz8JtDYoOXM3YHuu0mXrGm5hr-6zQdgQQjZS7gJ8ZlgooF5kZd80O4dR3S6Qg=s16000" /></a></div><span><span><p style="background-color: transparent; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"></p><p dir="ltr" style="background-color: transparent; color: black; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></p><p dir="ltr" style="background-color: transparent; color: black; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></p><h3 dir="ltr" style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Architectural wins and code health</span></span></h3><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Beyond the user-facing metrics, the migration to Media3 </span><span id="docs-internal-guid-3d2ee295-7fff-2b0d-c892-eaeed5cb4dab" style="color: black;"><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">PreloadManager</span></span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">offered long-term architectural benefits. While the integration and tuning process needed multiple iterations to balance performance, the resulting codebase is more maintainable. The team found that the</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span id="docs-internal-guid-f1024bc2-7fff-4364-7fb5-86701ad07826" style="color: black;"><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">PreloadManager </span></span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">API integrated cleanly with the existing Media3 ecosystem, allowing for better resource sharing. For Meta, the adoption of Media3 PreloadManager was a strategic investment in the future of video consumption.&nbsp;</span></p><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><b style="font-weight: normal;"><br /></b></span></p><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">By adopting preloading and adding device-intelligent gates, they successfully increased total watch time on their apps and improved the overall engagement of their global community.&nbsp;</span></p><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></p></span></span><span style="font-family: inherit; font-size: x-large;"><b>Resulting impact on Instagram and Facebook</b></span><span><span><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></p><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The proactive architecture delivered immediate and measurable improvements across both platforms.&nbsp;</span></p><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><b style="font-weight: normal;"><br /></b></span></p><ul style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><li aria-level="1" dir="ltr" style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Facebook experienced </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">faster playback starts, decreased playback stall rates and a reduction in bad sessions</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> (like rebuffering, delayed start time, lower quality,etc) which overall resulted in higher watch time.&nbsp;</span></p></li></ul><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><br /></span></p><ul style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><li aria-level="1" dir="ltr" style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Instagram saw </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">faster playback starts and an increase in total watch time. Eliminating join latency </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(the interval from the user's action to the first frame display) directly increased engagement metrics. The </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">fewer interruptions</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> due to reduced buffering meant users watched more content, which showed through engagement metrics.</span></p></li></ul><div style="background-color: transparent; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="white-space-collapse: preserve;"><br /></span></div></span></span><div style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHKGlhXkZNwanihjyCEOX3GU61jpJIY16O1znAWsT7j7eIwu0kgU36wNtzl6I5VY_Dho-yiLpqS5JYs51PnwVe52L_ndfBVEW45Ad26prAF_U2CF87Wea3swAcM5IijTVtqe430gmNFsM6zR8rrREnLKNEQ6ExkGWByaDKRAVeb6xsLlofjYFpZWvQlqs/w640-h360/ANDDM_MetaxMedia3_Inline.gif" /><span><span></span></span></div><span style="font-family: inherit; font-size: x-large;"><b>Key engineering learnings at scale</b></span><span><span><span id="docs-internal-guid-2ddc677a-7fff-cf8d-e8ed-5ffb75b95a68"><p dir="ltr" style="background-color: transparent; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;"><span style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="background-color: transparent; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;"><span style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">As media consumption habits evolve, the demand for instant experiences will continue to grow. Implementing proactive memory management and optimizing for scale and device diversity ensures your application can meet these expectations efficiently.</span></span></p></span><span><span style="background-color: transparent; font-family: inherit;"><br /></span><ul style="background-color: transparent; margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;"><span style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit;">Prioritize intelligent preloading</span></span></p></li></ul><p dir="ltr" style="background-color: transparent; line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-align: justify;"><span style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Focus on delivering a reliable experience by minimizing stutters and loading times through preloading. Rather than simple disk caching, leveraging memory-level preloading ensures that content is ready the moment a user interacts with it.</span></span></p><span style="background-color: transparent; font-family: inherit;"><br /></span><ul style="background-color: transparent; margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;"><span style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit;">Align your implementation with UI patterns</span></span></p></li></ul><p dir="ltr" style="background-color: transparent; line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-align: justify;"><span style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Customize preloading behavior as per your apps’s UI. For example, use a "current-only" focus for mixed feeds like Facebook to save memory, and an "adjacent preload" strategy for vertical environments like Instagram Reels.</span></span></p></span></span></span></div><h2 dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt; vertical-align: baseline;"><span id="docs-internal-guid-6027ad33-7fff-946b-fcd1-4dd7d1164b31"><div><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><div class="separator" style="clear: both; text-align: center;"><img src="https://blogger.googleusercontent.com/img/a/AVvXsEjozGGon2E-_mvmUhNGbWXIM6eiS7lvfuVz_O0T4BZBmyQ-mln4swGcqeB2Mcmww2_HvTOTSPAZGOnR4UOCtQ_aMPmEoEOUKBEMWNQpZDoBRsSJ6BOwYgrNXUDbQJv-Nsk1UCq6HZ_gkZZr6QZjSMA8SBaGlZrCbnJrzgHVaTU9YXCJil8_-S7OpTIqh4s=w557-h640" /></div><span><span><span><span id="docs-internal-guid-1b48a74f-7fff-d2ee-ac17-2a1085b98d9e" style="background-color: transparent; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; text-decoration-line: none; white-space: pre-wrap;"><span style="font-family: inherit;"><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; list-style-type: disc; text-wrap-mode: nowrap; vertical-align: baseline;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;"><span style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">Leverage Media3 for long-term code health</span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-align: justify;"><span style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Integrating with Media3 APIs rather than a custom caching solution allows for better resource sharing between the player and the </span><span id="docs-internal-guid-aa7b43f3-7fff-7df4-1ecf-0efa25aa28fa"><span style="font-family: &quot;Roboto Mono&quot;, monospace; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">PreloadManager</span></span><span style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">, enabling you to manage multiple videos with a single player instance. This results in a future-proof codebase that is easier for engineering teams to not only maintain and optimize over time but also benefit from the latest feature updates.</span><span style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><br /><br /></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; list-style-type: disc; text-wrap-mode: nowrap; vertical-align: baseline;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;"><span style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">Implement device aware optimizations</span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-align: justify;"><span style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Broaden your market reach by testing on various devices, including mid-to-low-end models. Use real-time signals like CPU, memory, and I/O to adapt features and resource usage dynamically.</span></p></span></span></span></span></span></span></div></span></h2></div></name></div><div><name content="IMG" twitter:image=""><div><span><span><span><h1 style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt; text-align: left; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-5f0b6af6-7fff-54d2-5a9e-85a47531bdb6" style="font-weight: normal;"></span></h1></span></span></span><span style="font-family: inherit; font-size: x-large;"><b>Learn More</b></span><span><span><span><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><br /></span></p><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">To get started and learn more, visit</span><a href="https://www.google.com/search?q=https://developer.android.com/guide/topics/media/media3/exoplayer/preload-manager" style="text-decoration-line: none;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">&nbsp;</span></a></p><ul style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; text-wrap-mode: nowrap; vertical-align: baseline;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">Explore the Media3 </span><a href="https://developer.android.com/media/media3/exoplayer/preloading-media/preloadmanager" style="text-decoration-line: none;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">PreloadManager documentation</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">.</span></p></li><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; text-wrap-mode: nowrap; vertical-align: baseline;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">Read the</span><a href="https://android-developers.googleblog.com/2025/09/introducing-preloading-with-media3.html" style="text-decoration-line: none;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;"> blog series</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> for advanced technical and implementation details.</span></p></li><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="2" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: circle; text-wrap-mode: nowrap; vertical-align: baseline;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><a href="https://android-developers.googleblog.com/2025/09/introducing-preloading-with-media3.html" style="text-decoration-line: none;"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">Part 1: Introducing Preloading with Media3</span></a></p></li><li aria-level="2" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: circle; text-wrap-mode: nowrap; vertical-align: baseline;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><a href="https://android-developers.googleblog.com/2025/09/a-deep-dive-into-media3-preloadmanager.html" style="text-decoration-line: none;"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">Part 2: A deep dive into Media3's PreloadManager</span></a></p></li></ul><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; text-wrap-mode: nowrap; vertical-align: baseline;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">Check out the </span><a href="https://github.com/android/socialite" style="text-decoration-line: none;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">sample app</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> to see preloading in action.</span></p></li></ul><br /><p dir="ltr" style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Now you know the secrets for instant playback. Go try them out!</span></p><div style="background-color: transparent; color: black; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><br /></span></div></span></span></span></div><br /></name></div>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-33061405095082986912026-03-05T06:03:00.000-08:002026-03-05T09:18:53.544-08:00Elevating AI-assisted Android development and improving LLMs with Android Bench<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM9Lw9I9lO2TvhpJPv1mSMJWa6kL_wDlPFWQttGnvuRrdxU5ZUGKL5kenVxnax2XdpzB6rUCwMv9SSlkczltnJSS2wlYRbHJMwGfwioGFahoyt4FiS4IxqETrhSDR0fxQ1wOlO9v74nLKSWMHlSa-mOqzd9ku6NY9zqf_3EgbfnNyVSSNansvhzLmv_pk/s1235/Android_Bench_MetadataCard_dark_v2.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM9Lw9I9lO2TvhpJPv1mSMJWa6kL_wDlPFWQttGnvuRrdxU5ZUGKL5kenVxnax2XdpzB6rUCwMv9SSlkczltnJSS2wlYRbHJMwGfwioGFahoyt4FiS4IxqETrhSDR0fxQ1wOlO9v74nLKSWMHlSa-mOqzd9ku6NY9zqf_3EgbfnNyVSSNansvhzLmv_pk/s1235/Android_Bench_MetadataCard_dark_v2.png" style="display: none;" /><name content="IMG" twitter:image=""><p></p><p><span style="background-color: white; color: #202124; font-size: 10pt; font-style: italic; white-space-collapse: preserve;">Posted by Matthew McCullough, VP of Product Management, Android Developer</span></p><div><name content="IMG" twitter:image=""><div class="separator" style="clear: both; text-align: center;"><img alt="" data-original-height="1254" data-original-width="4210" src="https://blogger.googleusercontent.com/img/a/AVvXsEjjrFCLIkfhJMOhRG5Dv6I_U81PgMsl5EfIIxyebdP0v5KOmscclKSv5nboK_fILjxmW0M2lRtKImKVBr5EwfH8HxGTh4t0P8Uaxums2gMDm-qYhpv7GFyzkHb1N0PjPgo1zFX1t-d3FzWEfMvzup09kVl4otUKI7qXYkmihxz98T4sZM7Kt4qiFXB9Xb8=s16000" /></div><br /></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">We want to make it faster and easier for you to build high-quality Android apps, and one way we’re helping you be more productive is by putting AI at your fingertips. We know you want AI that truly understands the nuances of the Android platform, which is why we’ve been measuring how LLMs perform Android development tasks. Today we released the first version of </span><a href="http://d.android.com/bench" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Android Bench</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, our official leaderboard of LLMs for Android development.</span></p><br /><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Our goal is to provide model creators with a benchmark to evaluate LLM capabilities for Android development. By establishing a clear, reliable baseline for what high quality Android development looks like, we’re helping model creators identify gaps and accelerate improvements—which empowers developers to work more efficiently with a wider range of helpful models to choose for AI assistance—which ultimately will lead to higher quality apps across the Android ecosystem.</span></p><br /><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Designed with real-world Android development tasks</span></p><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">We created the benchmark by curating a task set against a range of common Android development areas. It is composed of real challenges of varying difficulty, sourced from public GitHub Android repositories. Scenarios include resolving breaking changes across Android releases, domain-specific tasks like networking on wearables, and migrating to the latest version of Jetpack Compose, to name a few.</span></p><br /><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Each evaluation attempts to have an LLM fix the issue reported in the task, which we then verify using unit or instrumentation tests. This model-agnostic approach allows us to measure a model’s ability to navigate complex codebases, understand dependencies, and solve the kind of problems you encounter every day.&nbsp;</span></p><br /><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">We validated this methodology with several LLM makers, including JetBrains. </span></p><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></p></span></name></div></name><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><name content="IMG" twitter:image=""><div><name content="IMG" twitter:image=""><span style="font-family: inherit; font-size: medium;"><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">“</span><span style="font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Measuring AI’s impact on Android is a massive challenge, so it’s great to see a framework that’s this sound and realistic. While we’re active in benchmarking ourselves, Android Bench is a unique and welcome addition. This methodology is exactly the kind of rigorous evaluation Android developers need right now.”</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span>&nbsp;</p></span></name></div></name></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><name content="IMG" twitter:image=""><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-size: medium; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">- Kirill Smelov, Head of AI Integrations at JetBrains.</span></p></span></name></div></name></blockquote><name content="IMG" twitter:image=""><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">The first Android Bench results</span></p><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">For this initial release, we wanted to purely measure model performance and not focus on agentic or tool use. The models were able to successfully complete 16-72% of the tasks. This is a wide range that demonstrates some LLMs already have a strong baseline for Android knowledge, while others have more room for improvement. Regardless of where the models are at now, we’re anticipating continued improvement as we encourage LLM makers to enhance their models for Android development.&nbsp;</span></p><br /><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">The LLM with the highest average score for this first release is Gemini 3.1 Pro, followed closely by Claude Opus 4.6. You can try all of the models we evaluated for AI assistance for your Android projects by using API keys in the latest stable version of </span><a href="http://d.android.com/studio" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Android Studio</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span></p><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"></p><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="http://d.android.com/bench" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="780" data-original-width="1230" src="https://blogger.googleusercontent.com/img/a/AVvXsEgB5Z_MUOVYvlhPDBVcMmDV-j2BnelyjSAmLHNWHlFpxGMMe31OholXWyC8mRYgmhYkYIKQ-XFsimkWumUP_gD3ka3dpq3FQlENoHNMs0WuKYyxwuDbuPOKcZkC3kgBzH0ItdYojvERccEuusnflIE2xlcmYOHFXUgQVXYeG3TvZY58P1h3ui_uYf09jx8=s16000" /></a></div></div><div class="separator" style="clear: both; text-align: center;"><br /></div></span></name></name><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Providing developers and LLM makers with transparency</span></p><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">We value an open and transparent approach, so we made </span><a href="http://d.android.com/bench/methodology" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">our methodology</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, dataset, and test harness </span><span id="docs-internal-guid-405670bd-7fff-0bcb-0b90-664d3f8e4f47"><a href="https://github.com/android-bench/android-bench" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">publicly available on GitHub</span></span></a></span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span></p><br /><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">One challenge for any public benchmark is the risk of data contamination, where models may have seen evaluation tasks during their training process. We have taken measures to ensure our results reflect genuine reasoning rather than memorization or guessing, including a thorough manual review of agent trajectories, or the integration of a canary string to discourage training.&nbsp;</span></p><br /><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Looking ahead, we will continue to evolve our methodology to preserve the integrity of the dataset, while also making improvements for future releases of the benchmark—for example, growing the quantity and complexity of tasks.</span></p><br /><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">We’re looking forward to how </span><a href="http://d.android.com/bench" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Android Bench</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> can improve AI assistance long-term. Our vision is to close the gap between concept and quality code. We're building the foundation for a future where no matter what you imagine, you can build it on Android.&nbsp;</span></p><div><br /></div><p></p>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-58746457572171387602026-03-04T16:00:00.000-08:002026-03-05T16:02:20.347-08:00Battery Technical Quality Enforcement is Here: How to Optimize Common Wake Lock Use Cases<meta content="https://blogger.googleusercontent.com/img/a/AVvXsEgRm9lMeuDuwYAvqKSYCHyVs4CLxaExuj_bede6zhfp_58-RjXoeJZA1ijfeSiEZxwqeIzX7nBOsFQKAIqrzcKA6XwR3XuAKuMm5r7C716YN_0c_pl7p56nZyRMgJK0EdbZDhnYKXrfHfiT1bUh4YZIxIWz2ueW_LwWcbMHO-rg_GJh2qeQhc_BaGPvHe4" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></meta> <img src="https://blogger.googleusercontent.com/img/a/AVvXsEgRm9lMeuDuwYAvqKSYCHyVs4CLxaExuj_bede6zhfp_58-RjXoeJZA1ijfeSiEZxwqeIzX7nBOsFQKAIqrzcKA6XwR3XuAKuMm5r7C716YN_0c_pl7p56nZyRMgJK0EdbZDhnYKXrfHfiT1bUh4YZIxIWz2ueW_LwWcbMHO-rg_GJh2qeQhc_BaGPvHe4" style="display: none;" /><name content="IMG" twitter:image=""><p><i></i></p><div class="separator" style="clear: both; text-align: justify;"><i style="text-align: left;">Posted by Alice Yuan, Senior Developer Relations Engineer</i></div><p></p><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfZatQInwILXV3U2FjUJUucu3-Z4aqYt6yT8HkQHpYo-Hd8JWVMaKbI7ffYIf4WLHKG9ZROPVpRZIsLTk8wCyKO6oQdYF-x4Z8VQXzWGWHId-cLIEcak5bEgDa1qkbBiJOk6FiDRw01g9a2zFrhUVweZrTayY5t2WnDe1oOYM5syLGJMm6S2ISkBIOt9I/s1600/Android_Battery%20Performance%20Blog.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="477" data-original-width="1600" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfZatQInwILXV3U2FjUJUucu3-Z4aqYt6yT8HkQHpYo-Hd8JWVMaKbI7ffYIf4WLHKG9ZROPVpRZIsLTk8wCyKO6oQdYF-x4Z8VQXzWGWHId-cLIEcak5bEgDa1qkbBiJOk6FiDRw01g9a2zFrhUVweZrTayY5t2WnDe1oOYM5syLGJMm6S2ISkBIOt9I/s16000/Android_Battery%20Performance%20Blog.png" /></a></div><br /><p><span style="font-family: inherit;"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">In recognition that excessive battery drain is top of mind for Android users, Google has been taking significant steps to help developers build more power-efficient apps. On </span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">March 1st, 2026</span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, Google Play Store began rolling out the </span><a href="https://android-developers.googleblog.com/2025/11/raising-bar-on-battery-performance.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">wake lock technical quality treatments</span></a><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> to improve battery drain. This treatment will roll out gradually to impacted apps over the following weeks. Apps that consistently exceed the "Excessive Partial Wake Lock" threshold in Android vitals may see tangible impacts on their store presence, including </span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">warnings on their store listing</span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> and exclusion from discovery surfaces such as recommendations.</span></span></p><div class="separator" style="clear: both; text-align: center;"><span style="border: none; display: inline-block; height: 401px; margin-left: 1em; margin-right: 1em; overflow: hidden; width: 448px;"><img height="401" src="https://blogger.googleusercontent.com/img/a/AVvXsEjxi5LN9jJL5ahEjAeFcxwmXqCGq8ubaTWRboN_VNk8I3WiisScaezwEuoKVw6__OXCH3peSSRoC9xuexlelx32CCK8rXusqjAQCFlwo4YSBJTOMkR8_GZ7BS91k_k9AFpOf0iUsWhnkW1vlH5mL_LQGRP86sYHLuV0GK3PQuEwgBDpRyzsdHFBnc7dkKE" style="margin-left: 0px; margin-top: 0px;" width="448" /></span></div><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-cf77c5b5-7fff-a6f7-9a5e-3bc02f610d51"><span face="&quot;Google Sans&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"></span></span></p><p style="text-align: center;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-dbab5e9f-7fff-8bf9-f4d3-5e964864affa"></span></span><span face="Google Sans, sans-serif" style="font-size: 11pt;"><span id="docs-internal-guid-edeee6d2-7fff-ebcb-d009-ae67e9a2b867"><span face="&quot;Google Sans&quot;, sans-serif" style="font-size: 11pt; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Users may see a warning on your store listing if your app exceeds the bad behavior threshold. </span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">This initiative elevated battery efficiency to a core vital metric alongside stability metrics like crashes and ANRs. The "bad behavior threshold" is defined as holding a non-exempted partial wake lock for at least </span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">two hours</span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> on average while the screen is off in more than </span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">5% of user sessions </span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">in the </span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">past 28 days</span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. A wake lock is exempted if it is a system held wake lock that offers clear user benefits that cannot be further optimized, such as audio playback, location access, or user-initiated data transfer. You can view the full definition of excessive wake locks in our </span><a href="https://developer.android.com/topic/performance/vitals/excessive-wakelock" style="text-decoration: none;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Android vitals documentation</span></a><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p><p><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-0d099af6-7fff-5434-1a0a-07846203dadc"></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">As part of our ongoing initiative to improve battery life across the Android ecosystem, we have analyzed thousands of apps and how they use partial wake locks. While wake locks are sometimes necessary, we often see apps holding them inefficiently or unnecessarily, when more efficient solutions exist. This blog will go over the most common scenarios where excessive wake locks occur and our recommendations for optimizing wake locks. </span></span><span face="&quot;Google Sans&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">&nbsp;</span><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">We have already seen measurable success from partners like </span></span><span id="docs-internal-guid-01b0a609-7fff-8fcf-6818-4b3826032c14"><a href="https://android-developers.googleblog.com/2026/03/how-whoop-decreased-excessive-partial.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">WHOOP</span></span></a></span><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, who leveraged these recommendations to optimize their background behavior.</span></span></p><p><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;"><span id="docs-internal-guid-85a256ce-7fff-bfe5-3a54-16ce5c66a035"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><b>Using a foreground service vs partial wake locks</b></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">We’ve often seen developers struggle to understand the difference between two concepts when doing background execution: foreground service and partial wake locks.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">A foreground service is a lifecycle API that signals to the system that an app is performing user-perceptible work and should not be killed to reclaim memory, but it does not automatically prevent the CPU from sleeping when the screen turns off. In contrast, a partial wake lock is a mechanism specifically designed to keep the CPU running even while the screen is off.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">While a foreground service is often necessary to continue a user action, a manual acquisition of a partial wake lock is only necessary in conjunction with a foreground service for the duration of the CPU activity. In addition, you don't need to use a wake lock if you're already utilizing an API that keeps the device awake.&nbsp;</span></span></p><p><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-0711d2c9-7fff-ea39-0755-5ebf367c3949"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Refer to the flow chart in </span><span id="docs-internal-guid-2fe7ecf4-7fff-faee-a101-8bb2aa9cc7d5"><a href="https://developer.android.com/develop/background-work/background-tasks/awake" style="text-decoration-line: none;"><span style="color: #1155cc; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;"><span style="font-family: inherit;">Choose the right API to keep the device awake</span></span></a></span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> to ensure you have a strong understanding of what tool to use to avoid acquiring a wake lock in scenarios where it’s not necessary.</span></span></span></span></span></p><p><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;"><span id="docs-internal-guid-72fab7c4-7fff-4ed5-2f8e-192f92fd25ce"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><b>Third party libraries acquiring wake locks</b></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">It is common for an app to discover that it is flagged for excessive wake locks held by a third-party SDK or system API acting on its behalf. To identify and resolve these wake locks, we recommend the following steps:</span></span></p><p><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-029cd934-7fff-b838-6f5b-bd28022e37b4"></span></span></span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Check Android vitals:</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> Find the exact name of the offending wake lock in the </span><a href="https://play.google.com/console/developers/app/vitals/metrics/details?metric=EXCESSIVE_BACKGROUND_WAKELOCKS&amp;days=28" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">excessive partial wake locks dashboard</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. Cross-reference this name with the </span><a href="https://developer.android.com/develop/background-work/background-tasks/awake/wakelock/identify-wls" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: italic; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Identify wake locks created by other APIs</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> guidance to see if it was created by a known system API or Jetpack library. If it is, you may need to optimize your usage of the API and can refer to the recommended guidance.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Capture a System Trace:</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> If the wake lock cannot be easily identified, reproduce the wake lock issue locally using a system trace and inspect it with the Perfetto UI. You can learn more about how to do this in the </span><a href="https://android-developers.googleblog.com/2025/09/guide-to-excessive-wake-lock-usage.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: italic; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Debugging other types of excessive wake locks</span><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">section of this blog post</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Evaluate Alternatives:</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> If an inefficient third-party library is responsible and cannot be configured to respect battery life, consider communicating the issue with the SDK's owners, finding an alternative SDK or building the functionality in-house.</span></span></p></li></ul><div><span id="docs-internal-guid-e7829bd2-7fff-e757-db2f-b41300969ae4"><span style="font-family: inherit; font-size: x-large;"><b>Common wake lock scenarios</b></span></span><span><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Below is a breakdown of some of the specific use cases we have reviewed, along with the recommended path to optimize your wake lock implementation.</span></span></p></span><span id="docs-internal-guid-0798b311-7fff-5c92-997f-7931ec3ddd0c"><span style="font-family: inherit;"><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">User-Initiated Upload or Download</span></span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Example use cases:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">&nbsp;</span></p><ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">Video streaming apps where the user triggers a download of a large file for offline access.</span></p></li><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">Media backup apps where the user triggers uploading their recent photos via a notification prompt.</span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><b><span style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">How to reduce wake locks:</span><span style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">&nbsp;</span></b></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">Do not acquire a manual wake lock. Instead, use the </span><a href="https://developer.android.com/develop/background-work/background-tasks/uidt" style="text-decoration-line: none; white-space: normal;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">User-Initiated Data Transfer (UIDT) API</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">. This is the designated path for long running data transfer tasks initiated by the user, and it is exempted from excessive wake lock calculations.</span></p></li></ul></span></span></div><span style="font-family: inherit; font-size: x-large;"><b>One-Time or Periodic Background Syncs</b></span><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Example use cases:</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">&nbsp;</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">An app performs periodic background syncs to fetch data for offline access.&nbsp;</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Pedometer apps that fetch step count periodically.</span></span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">How to reduce wake locks:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">&nbsp;</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-align: left;"><li aria-level="1" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Do not acquire a manual wake lock. Use </span><a href="https://developer.android.com/develop/background-work/background-tasks/persistent" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">WorkManager</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> configured for one-time or periodic work.</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">&nbsp;</span><span style="background-color: transparent; color: #188038; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">WorkManager</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> respects system health by batching tasks and has a minimum periodic interval (15 minutes), which is generally sufficient for background updates.&nbsp;</span></span></p></li><li><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-da6da5e8-7fff-b729-1a27-8dc5527b1848"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">If you identify wake locks created by </span><span style="color: #188038; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">WorkManager</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> or JobScheduler with high wake lock usage, it may be because you’ve misconfigured your worker to not complete in certain scenarios. Consider </span><a href="https://developer.android.com/develop/background-work/background-tasks/persistent/how-to/observe#stop-reason" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">analyzing the worker stop reasons</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">, particularly if you’re seeing high occurrences of </span><a href="https://developer.android.com/reference/androidx/work/WorkInfo#STOP_REASON_TIMEOUT()" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">STOP_REASON_TIMEOUT</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">. </span></span></span></span></span></li></ul><p><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span face="Google Sans, sans-serif" style="font-size: 11pt;"></span></span></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;">workManager.getWorkInfoByIdFlow(syncWorker.id) .collect { workInfo -&gt; <span style="color: blue;">if</span> (workInfo != <span style="color: blue;">null</span>) { <span style="color: blue;">val</span> stopReason = workInfo.stopReason logStopReason(syncWorker.id, stopReason) } }</pre><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-align: left;"><li aria-level="1" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">In addition to logging worker stop reasons, refer to our documentation on </span><a href="https://developer.android.com/develop/background-work/background-tasks/testing/persistent/debug" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">debugging your workers</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. Also, consider collecting and analyzing </span><a href="https://developer.android.com/topic/performance/tracing/on-device" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">system traces </span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">to understand when wake locks are acquired and released.</span></span></p></li><li><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-15843601-7fff-6173-53c4-7d37a6a5d7b7"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Finally, check out our </span><span id="docs-internal-guid-674a5f52-7fff-330b-9b5f-1ceab4dbcae7"><a href="https://android-developers.googleblog.com/2026/03/how-whoop-decreased-excessive-partial.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;"><span style="font-family: inherit;">case study with WHOOP</span></span></a></span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">, where they were able to discover an issue with configuration of their workers and reduce their wake lock impact significantly.</span></span></span></span></span></li></ul><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;">Bluetooth Communication</span></span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Example use cases:</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">&nbsp;</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Companion device app prompts the user to pair their Bluetooth external device.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Companion device app listens for hardware events on an external device and user visible change in notification.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Companion device app’s user initiates a file transfer between the mobile and bluetooth device.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Companion device app performs occasional firmware updates to an external device via Bluetooth.</span></span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">How to reduce wake locks:</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">&nbsp;</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Use </span><a href="https://developer.android.com/develop/connectivity/bluetooth/companion-device-pairing" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">companion device pairing</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to pair Bluetooth devices to avoid acquiring a manual wake lock during Bluetooth pairing.&nbsp;</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Consult the</span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><a href="https://developer.android.com/develop/connectivity/bluetooth/ble/background" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: italic; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Communicate in the background</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> guidance to understand how to do background Bluetooth communication.&nbsp;</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Using </span><span style="background-color: transparent; color: #188038; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">WorkManager</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> is often sufficient if there is no user impact to a delayed communication. If a manual wake lock is deemed necessary, only hold the wake lock for the duration of Bluetooth activity or processing of the activity data.</span></span></p></li></ul><p><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span face="Google Sans, sans-serif" style="font-size: 11pt;"><span id="docs-internal-guid-b19d3efd-7fff-c922-fc55-d091075031ab"></span></span></span></span></p><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 14pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;">Location Tracking</span></span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Example use cases:</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">&nbsp;</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Fitness apps that cache location data for later upload such as plotting running routes</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Food delivery apps that pull location data at a high frequency to update progress of delivery in a notification or widget UI.</span></span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">How to reduce wake locks:</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">&nbsp;</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-align: left;"><li aria-level="1" style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Consult our guidance to </span><a href="https://developer.android.com/develop/sensors-and-location/location/battery/optimize" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: italic; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Optimize location usage</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. Consider implementing timeouts, leveraging location request batching, or utilizing passive location updates to ensure battery efficiency.</span></span></p></li><li aria-level="1" style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">When </span><a href="https://developer.android.com/develop/sensors-and-location/location/request-updates" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">requesting location updates</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> using the FusedLocationProvider or LocationManager APIs, the system automatically triggers a device wake-up during the location event callback. This brief, system-managed wake lock is exempted from excessive partial wake lock calculations.</span></span></p></li><li><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-708d9ff2-7fff-50f9-2e79-96155638bc7a"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Avoid acquiring a separate, continuous wake lock for caching location data, as this is redundant. Instead, persist location events in memory or local storage and leverage </span><a href="https://developer.android.com/develop/background-work/background-tasks/persistent" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">WorkManager</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> to process them at periodic intervals.</span></span></span></span></span></li></ul><div><span style="white-space-collapse: preserve;"><br /></span></div><div><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: blue;">override</span> <span style="color: blue;">fun</span> onCreate(savedInstanceState: Bundle?) { locationCallback = <span style="color: blue;">object</span> : <span style="color: #2b91af;">LocationCallback</span>() { <span style="color: blue;">override</span> <span style="color: blue;">fun</span> onLocationResult(locationResult: LocationResult?) { locationResult ?: <span style="color: blue;">return</span> <span style="color: green;">// System wakes up CPU for short duration</span> <span style="color: blue;">for</span> (location <span style="color: blue;">in</span> locationResult.locations){ <span style="color: green;">// Store data in memory to process at another time</span> } } } }</pre></div><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;">High Frequency Sensor Monitoring</span></span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Example use cases:</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">&nbsp;</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Pedometer apps that passively collect steps, or distance traveled.&nbsp;</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Safety apps that monitor the device sensors for rapid changes in real time, to provide features such as crash detection or fall detection.</span></span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">How to reduce wake locks:</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">&nbsp;</span></span></p><p><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-294cbf9b-7fff-0860-d884-664dd3b68244"></span></span></span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">If using </span><a href="https://developer.android.com/reference/android/hardware/SensorManager" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">SensorManager</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, reduce usage to periodic intervals and only when the user has explicitly granted access through a UI interaction. High frequency sensor monitoring can drain the battery heavily due to the number of CPU wake-ups and processing that occurs.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">If you’re tracking step counts or distance traveled, rather than using SensorManager, leverage </span><a href="https://developer.android.com/health-and-fitness/guides/recording-api" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Recording API</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> or consider utilizing </span><a href="https://developer.android.com/health-and-fitness/health-connect/features/steps" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Health Connect</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to access historical and aggregated device step counts to capture data in a battery-efficient manner.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">If you’re registering a sensor with </span><a href="https://developer.android.com/reference/android/hardware/SensorManager" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">SensorManager</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, specify a </span><a href="https://developer.android.com/reference/android/hardware/SensorManager#registerListener(android.hardware.SensorEventListener,%20android.hardware.Sensor,%20int)" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">maxReportLatencyUs</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> of 30 seconds or more to leverage </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">sensor batching</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to minimize the frequency of CPU interrupts. When the device is subsequently woken by another trigger such as a user interaction, location retrieval, or a scheduled job, the system will immediately dispatch the cached sensor data.</span></span></p></li></ul><p><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span face="Google Sans, sans-serif" style="font-size: 11pt;"></span></span></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: blue;">val</span> accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) sensorManager.registerListener(<span style="color: blue;">this</span>, accelerometer, samplingPeriodUs, <span style="color: green;">// How often to sample data</span> maxReportLatencyUs <span style="color: green;">// Key for sensor batching </span> )</pre><p><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span face="Google Sans, sans-serif" style="font-size: 11pt;"><span id="docs-internal-guid-46c9c981-7fff-af0e-ef24-185203cf0871"></span></span></span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">If your app requires both location and sensor data, synchronize their event retrieval and processing. By piggybacking sensor readings onto the brief wake lock the system holds for location updates, you avoid needing a wake lock to keep the CPU awake. Use a worker or a short-duration wake lock to handle the upload and processing of this combined data.</span></span></p></li></ul><div><span id="docs-internal-guid-e38c5ccc-7fff-e088-b4ed-ba7270a6bde2"><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 14pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">Remote Messaging</span></span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Example use cases:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">&nbsp;</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit;">Video or sound monitoring companion apps that need to monitor events that occur on an external device connected using a local network.</span></span></p></li><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit;">Messaging apps that maintain a network socket connection with the desktop variant.</span></span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">How to reduce wake locks:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">&nbsp;</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-align: left;"><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">If the network events can be processed on the server side, use </span><a href="https://firebase.google.com/docs/cloud-messaging/android/receive-messages" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">FCM</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> to receive information on the client. You may choose to schedule an </span><a href="https://developer.android.com/develop/background-work/background-tasks/persistent/getting-started/define-work#expedited" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">expedited worker</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> if additional processing of FCM data is required.&nbsp;</span></span></p></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit;">If events must be processed on the client side via a socket connection, a wake lock is not needed to listen for event interrupts. <span id="docs-internal-guid-0cb8eca2-7fff-6154-d1de-493b87bc98fe"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">When data packets arrive at the Wi-Fi or Cellular radio, the radio hardware triggers a hardware interrupt in the form of a kernel wake lock. </span></span></span>You may then choose to schedule a worker or acquire a wake lock to process the data.</span></span></p></li><li><span id="docs-internal-guid-e38c5ccc-7fff-e088-b4ed-ba7270a6bde2"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">For example, if you’re using </span><a href="https://ktor.io/docs/server-sockets.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">ktor-network</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> to listen for data packets on a network socket, you should only acquire a wake lock when packets have been delivered to the client and need to be processed.</span></span></span></li></ul></span></div><div><span style="white-space-collapse: preserve;"><br /></span></div><div><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: blue;">val</span> readChannel = socket.openReadChannel() <span style="color: blue;">while</span> (!readChannel.isClosedForRead) { <span style="color: green;">// CPU can safely sleep here while waiting for the next packet</span> <span style="color: blue;">val</span> packet = readChannel.readRemaining(1024) <span style="color: blue;">if</span> (!packet.isEmpty) { <span style="color: green;">// Data Arrived: The system woke the CPU and we should keep it awake via manual wake lock (urgent) or scheduling a worker (non-urgent)</span> performWorkWithWakeLock { <span style="color: blue;">val</span> data = packet.readBytes() <span style="color: green;">// Additional logic to process data packets</span> } } }</pre></div><div><span style="white-space-collapse: preserve;"><br /></span></div><div><span id="docs-internal-guid-458b5830-7fff-4354-53b0-90eb391fe998"><span style="font-family: inherit;"><h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 14pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-size: x-large;">Summary</span></span></h2><span id="docs-internal-guid-a7e90a39-7fff-2f3f-daf4-be0abbfdc7f9"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">By adopting these recommended solutions for common use cases like background syncs, location tracking, sensor monitoring and network communication, developers can work towards reducing unnecessary wake lock usage. To continue learning, read our other technical blog post or </span><a href="https://youtu.be/-6mEvkLOlno" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">watch our technical video</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> on how to discover and debug wake locks: </span><a href="https://android-developers.googleblog.com/2025/09/guide-to-excessive-wake-lock-usage.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Optimize your app battery using Android vitals wake lock metric</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. Also, consult our </span><a href="https://developer.android.com/develop/background-work/background-tasks/awake/wakelock" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">updated wakelock documentation</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. To help us continue improving our technical resources, please share any additional feedback on our guidance in our </span><a href="https://forms.gle/8ejo49EUfee7jDMD9" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">documentation feedback survey</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. </span></span></span></span></span></div><p></p></name>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-48616629094974575192026-03-04T10:00:00.000-08:002026-03-04T13:01:49.356-08:00How WHOOP decreased excessive partial wake lock sessions by over 90%<name content="IMG" twitter:image=""><p><em>Posted by Breana Tate, Developer Relations Engineer, Mayank Saini, Senior Android Engineer, Sarthak Jagetia, Senior Android Engineer and Manmeet Tuteja, Android Engineer II</em><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgjR22o6oHBDrGEmnBiwcfXr0CtFm9B_XAC9zi2OWNlkoqo2uHPLZso_Ql-WIihfxrk_6jdWoKbQpeQRx2WuZnChYSV8hb5lFxqOKYNE6d6HM7WB0w_H3y1JyDSAhccPzPxSrF7_bCWNEP3a_14G8GSM2wKqQw0F52P00VnK70qy5YdFeRLpb1TrhdjzCM" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img alt="" data-original-height="720" data-original-width="1280" height="1" src="https://blogger.googleusercontent.com/img/a/AVvXsEgjR22o6oHBDrGEmnBiwcfXr0CtFm9B_XAC9zi2OWNlkoqo2uHPLZso_Ql-WIihfxrk_6jdWoKbQpeQRx2WuZnChYSV8hb5lFxqOKYNE6d6HM7WB0w_H3y1JyDSAhccPzPxSrF7_bCWNEP3a_14G8GSM2wKqQw0F52P00VnK70qy5YdFeRLpb1TrhdjzCM" width="1" /></a></p><p></p><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceoN21zHelu-2uJuGcwDR94VtNULdeWmskBHNwguztvdqHgWI8vtILj22-FKlpYZs-z_nv0eAk44yHQ38_XNipcBoDHb4bod2vn5bjpKYhePTEK1c7Mopfwc2wizG27Fjn_qgJnLsMrpu5SBsBw9iwXvuOgPQN_7JGrddTssqE3MfMMzN74UWeLGbodM/s1280/ADev_WHOOP_Header_R2.gif" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceoN21zHelu-2uJuGcwDR94VtNULdeWmskBHNwguztvdqHgWI8vtILj22-FKlpYZs-z_nv0eAk44yHQ38_XNipcBoDHb4bod2vn5bjpKYhePTEK1c7Mopfwc2wizG27Fjn_qgJnLsMrpu5SBsBw9iwXvuOgPQN_7JGrddTssqE3MfMMzN74UWeLGbodM/s16000/ADev_WHOOP_Header_R2.gif" /></a></div><br /></name><span id="docs-internal-guid-ff0391d8-7fff-a787-bf1a-de0840769523"><span style="color: #1b1c1d;"><span style="font-family: inherit;"><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Building an Android app for a wearable means the real work starts when the screen turns off. </span><a href="https://www.whoop.com/us/en/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">WHOOP</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> helps members understand how their body responds to training, recovery, sleep, and stress, and for the many WHOOP members on </span></span><a href="https://play.google.com/store/apps/details?id=com.whoop.android&amp;pli=1" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;"><span style="font-family: inherit;">Android</span></span></a><span style="color: black; font-family: inherit;">, reliable background syncing and connectivity are what make those insights possible.</span></p></span></span></span><span><span style="color: #1b1c1d;"><span style="font-family: inherit;"><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b id="docs-internal-guid-c3937973-7fff-8ba4-5cde-97732ab6bd01" style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Earlier this year, Google Play </span><a href="https://android-developers.googleblog.com/2025/11/raising-bar-on-battery-performance.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">released a new metric in Android vitals</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">: Excessive partial wake locks. This metric measures the percentage of user sessions where cumulative, non-exempt wake lock usage exceeds 2 hours in a 24-hour period. The aim of this metric is to help you identify and address possible sources of battery drain, which is crucial for delivering a great user experience.</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Beginning March 1, 2026, apps that continue to not meet the quality threshold may be excluded from Google Play discovery surfaces. A warning may also be placed on the Google Play Store listing, indicating the app might use more battery than expected.</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">According to Mayank Saini, Senior Android Engineer at WHOOP,&nbsp; this “presented the team with an opportunity to raise the bar on Android efficiency,” after Android vitals flagged the app’s excessive partial wake lock % as 15%—which exceeded the recommended 5% threshold.</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"></span></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi8ShPyJCanK9lVRci3W8Oe2GyPiS0itt11EcVNmmR7sAUPtRcD6MONyACe2GpV-A-KIzon5Rbthp94N5WKzHNL4Br7go1L0beQb8qNN9gMtR1rhXvjdFgAOt0xxuv6OSh09D8CoX1gAKYB-9L2Nm2Z_F1wXiVGE8JWQ4FcBmTJ-5I5e8zfW1n6-VunxJ8" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="720" data-original-width="1280" src="https://blogger.googleusercontent.com/img/a/AVvXsEi8ShPyJCanK9lVRci3W8Oe2GyPiS0itt11EcVNmmR7sAUPtRcD6MONyACe2GpV-A-KIzon5Rbthp94N5WKzHNL4Br7go1L0beQb8qNN9gMtR1rhXvjdFgAOt0xxuv6OSh09D8CoX1gAKYB-9L2Nm2Z_F1wXiVGE8JWQ4FcBmTJ-5I5e8zfW1n6-VunxJ8=s16000" /></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"></span></span></div><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span><p></p><br /><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The team viewed the Android vitals metric as a clear signal that their background work was holding the CPU awake longer than necessary. Resolving this would allow them to continue to deliver a great user experience while simultaneously decreasing wasted background time and maintaining reliable and timely Bluetooth connectivity and syncing.</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b id="docs-internal-guid-636a363f-7fff-535b-10ab-d102826b22b6" style="font-weight: normal;"><br /></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Identifying the issue</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><br /></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">To figure out where to get started, the team first turned to Android vitals for more insight into which wake locks were affecting the metric. By consulting the </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Android vitals excessive partial wake locks dashboard</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, they were able to identify the biggest contributor to excessive partial wake locks as one of their WorkManager workers (identified in the dashboard as </span></span><span style="background-color: transparent; color: #38761d; font-family: 'Google Sans Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">androidx.work.impl.background.systemjob.SystemJobService</span><span face="'Google Sans',sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">).</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"> To support the WHOOP “always-on experience”, the app uses WorkManager for background tasks like periodic syncing and delivering recurring updates to the wearable.&nbsp;</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">While the team </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">was</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> aware that WorkManager </span><a href="https://developer.android.com/develop/background-work/background-tasks/awake/wakelock/identify-wls#workmanager" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">acquires a wake lock</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> while executing tasks in the background, they previously did not have visibility into how all of their background work (beyond just WorkManager) was distributed until the introduction of the excessive partial wake locks metric in Android vitals.</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">With the dashboard identifying WorkManager as the main contributor, the team was then able to focus their efforts on identifying </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">which</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> of their workers was contributing the most and work towards resolving the issue.</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><br /></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Making use of internal metrics and data to better narrow down the cause</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><br /></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">WHOOP already had internal infrastructure set up to monitor WorkManager metrics. They periodically monitor:</span></span></p><ol style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; vertical-align: baseline; white-space-collapse: preserve;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Average Runtime: For how long does the worker run?</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Timeouts: How often is the worker timing out instead of completing?</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Retries: How often does the worker retry if the work timed out or failed?</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Cancellations: How often was the work cancelled?</span></span></p></li></ol><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Tracking more than just worker successes and failures gives the team visibility into their work’s efficiency.</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The internal metrics flagged </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">high average runtime</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> for a select few workers, enabling them to narrow the investigation down even further.&nbsp;</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">In addition to their internal metrics, the team also used </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Android Studio’s </span><a href="https://developer.android.com/studio/inspect/task" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 700; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Background Task Inspector</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to inspect and debug the workers of interest, with a specific focus on associated wake locks, to align with the metric flagged in Android vitals.</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><br /></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Investigation: Distinguishing between worker variants</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b id="docs-internal-guid-897900b9-7fff-8f86-f7e8-c226580a4a21" style="font-weight: normal;"><br /></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">WHOOP uses both </span><a href="https://developer.android.com/develop/background-work/background-tasks/persistent/getting-started/define-work#schedule_one-time_work" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">one-time</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and </span><a href="https://developer.android.com/develop/background-work/background-tasks/persistent/getting-started/define-work#schedule_periodic_work" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">periodic</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> scheduling for some workers. This allows the app to reuse the same Worker logic for identical tasks with the same success criteria, differing only in timing.</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Using their internal metrics made it possible to narrow their search to a specific worker, but they couldn't tell if the bug occurred when the worker was one-time, periodic, or both. So, they rolled out an update to use WorkManager’s</span></span><span face="'Google Sans',sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><a href="https://developer.android.com/reference/androidx/work/WorkRequest.Builder#setTraceTag(kotlin.String)" style="text-decoration: none;"><span style="-webkit-text-decoration-skip: none; background-color: transparent; color: #1155cc; font-family: 'Google Sans Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre;">setTraceTag</span><span face="'Google Sans',sans-serif" style="-webkit-text-decoration-skip: none; background-color: transparent; color: #1155cc; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre;"> method</span></a><span face="'Google Sans',sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">to distinguish between the one-time and periodic variants of the same Worker.</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">This extra detail would allow them to definitively identify which Worker variant (periodic or one-time) was contributing the most to sessions with excessive partial wake locks. However, the team was surprised when the data revealed that neither variant appeared to be contributing more than the other.</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Manmeet Tuteja, Android Engineer II at WHOOP said “that split also helped us confirm the issue was happening in </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">both</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variants, which pointed away from scheduling configuration and toward a shared business logic problem inside the worker implementation.”</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEie5dsZanXFbZ6K-fQ2dnP__fzlY4Fnm5tBv4MCYPQmlqZ5ISOVA6b5PiyBuUl3B-fvtb75xkBcWXXSuOZSVCbNPwiW3TtowUIBhCor_fUo76hq2hpixi0liBphSL-I8rzadeApiA9Q0VVwFph8gNIFezsKzllNAZA77RL8ectmSd484T_15IRcBZlr8MU" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="720" data-original-width="1280" src="https://blogger.googleusercontent.com/img/a/AVvXsEie5dsZanXFbZ6K-fQ2dnP__fzlY4Fnm5tBv4MCYPQmlqZ5ISOVA6b5PiyBuUl3B-fvtb75xkBcWXXSuOZSVCbNPwiW3TtowUIBhCor_fUo76hq2hpixi0liBphSL-I8rzadeApiA9Q0VVwFph8gNIFezsKzllNAZA77RL8ectmSd484T_15IRcBZlr8MU=s16000" /></a><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></span></div><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /><br /></span></span><p></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Diving deeper on worker behavior and fixing the root cause</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b id="docs-internal-guid-25d97de1-7fff-cc76-25d7-74f27d7e2e20" style="font-weight: normal;"><br /></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">With the knowledge that they needed to take a look at logic </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">within</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> the worker,&nbsp; the team re-examined worker behavior for the workers that had been flagged during their investigation. Specifically, they were looking for instances in which work may have been getting stuck and not completing.</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">All of this culminated in finding the root cause of the excessive wake locks:</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><br /></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">A CoroutineWorker that was designed to wait for a connection to the WHOOP sensor before proceeding.&nbsp;</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><br /></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">If the work started with no sensor connected, </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">whoopSensorFlow</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">–which indicates if the sensor is connected– was </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">null</span><span face="'Google Sans',sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">. </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">SensorWorker</span><span face="'Google Sans',sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span face="&quot;Google Sans&quot;, sans-serif" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">didn’t treat this as an early-exit condition and kept running, effectively waiting indefinitely for a connection. As a result, WorkManager held a partial wake lock until the work timed out, leading to high background wake lock usage and frequent, unwanted rescheduling of the </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">SensorWorker</span><span face="'Google Sans',sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">.</span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">To address this, the WHOOP team updated the worker logic to check the connection status before attempting to execute the core business logic.</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-da954541-7fff-5cc2-096b-2cbb56423f48"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">If the sensor isn’t available, the worker exits, avoiding a timeout scenario and releasing the wake lock. The following code snippet shows the solution:</span></span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><br /></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"></span></p><pre style="color: #333333; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 16.25px; margin: 0px; vertical-align: baseline; white-space-collapse: preserve;"><pre style="line-height: 16.25px; margin: 0px;"><span style="color: blue;">class</span> <span style="color: #2b91af;">SensorWorker</span>(appContext: Context, params: WorkerParameters): CoroutineWorker(appContext, params) { <span style="color: blue;">override</span> <span style="color: blue;">suspend</span> <span style="color: blue;">fun</span> doWork(): Result { ... <span style="color: green;">// Check the sensor state and perform work or return failure</span> <span style="color: blue;">return</span> whoopSensorFlow.replayCache .firstOrNull() ?.let { cachedData -&gt; processSensorData(cachedData) Result.success() } ?: run { Result.failure() } }</pre></pre><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><br /></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Achieving a 90% decrease in sessions with excessive partial wake locks</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><b id="docs-internal-guid-65d3af4f-7fff-8eb4-7842-866cdf036df6" style="font-weight: normal;"><br /></b></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">After rolling out the fix, the team continued to monitor the Android vitals dashboard to confirm the impact of the changes.&nbsp;</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Ultimately, WHOOP saw their </span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">excessive partial wake lock percentage drop from 15% to less than 1%</span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> just 30 days</span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;"> </span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">after implementing the changes to their Worker. </span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><br /></span></p></span></span></span><div class="separator" style="clear: both; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCcOlOGJBxpPNNGCAHbcdFTWgP7LUXqGbY5cGuDDvoOUFTmKgZ2GASeLpZXxPzJ4rLKdr2hSCN1dycoEWHftKZQ_RrQv13KfaO4wPAZ0yhiKaPK4yE8dLnT-ENQsHdZSo3pUMZ9-ExmEu5OqjdQvjGYeX_f5S1UKH1RzTobn6RRkmICNNiifwcvD9DHng/s16000/Screenshot%202026-02-11%20at%201.04.26%E2%80%AFPM.png" /></div><span><span style="color: #1b1c1d;"><span style="font-family: inherit;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">As a result of the changes, the team has seen fewer instances of work timing out without completing, resulting in lower average runtimes.&nbsp;</span></span></p><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-50b04817-7fff-7def-6ba4-eda930fcbdaf"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The WHOOP team’s advice to other developers that want to improve their background work’s efficiency:</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgf_ps2Fq9afkcrnq9CZjcXebTmRgjwxdhdDQgAmvaLebjgXyO6nDBvu1ZmA7_1h04Q2zjYFaMHQvVlfNhancQgVQ4pcdlVf3XEYpKRK-zfLhZe9nj0R4V4Yo51uspVisq-1BGRXHt9tXNMU98WndYxfHpK754OPDi05d21psUbl1br23YdPLDnPA8CKKY" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="720" data-original-width="1280" src="https://blogger.googleusercontent.com/img/a/AVvXsEgf_ps2Fq9afkcrnq9CZjcXebTmRgjwxdhdDQgAmvaLebjgXyO6nDBvu1ZmA7_1h04Q2zjYFaMHQvVlfNhancQgVQ4pcdlVf3XEYpKRK-zfLhZe9nj0R4V4Yo51uspVisq-1BGRXHt9tXNMU98WndYxfHpK754OPDi05d21psUbl1br23YdPLDnPA8CKKY=s16000" /></a></div><br /><br /><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><br /></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><br /></p><span id="docs-internal-guid-64ba21fc-7fff-12f1-ba6c-e4d9fdd09ff5"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Get Started</span></span></p></span><p><span style="font-family: inherit;"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">If you’re interested in trying to reduce your app’s excessive partial wake locks or trying to improve worker efficiency, view your app’s excessive partial wake locks metric in </span><a href="https://play.google.com/console/u/0/developers/app/vitals/metrics/overview" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Android vitals</span></a><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, and review the </span><a href="https://developer.android.com/develop/background-work/background-tasks/awake/wakelock" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">wake locks documentation</span></a><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> for more best practices and debugging strategies.</span>&nbsp;</span></p></span></span></span>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-9662773622594954342026-03-04T06:40:00.000-08:002026-03-04T13:04:23.996-08:00A new era for choice and openness <meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYH7UBThBDnlrGadLFadOayw3V6C9YgAcXauX3WmjvzWquDhDxdhdAEA9HMs3Qrpms4a5e5HW9bOi5hOiJzE2qAYvk0FXVNsP9LmW3QU94T2jwv6QYlPC9A4ack8MdcxoJfq1oTAIF0Zh72xP63l0xuqUvPMM1coeEdhBPE8zy2LnEtWF1pKCyn1_7dw8/s5460/Urgent-play-banner.ai%20(1).png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYH7UBThBDnlrGadLFadOayw3V6C9YgAcXauX3WmjvzWquDhDxdhdAEA9HMs3Qrpms4a5e5HW9bOi5hOiJzE2qAYvk0FXVNsP9LmW3QU94T2jwv6QYlPC9A4ack8MdcxoJfq1oTAIF0Zh72xP63l0xuqUvPMM1coeEdhBPE8zy2LnEtWF1pKCyn1_7dw8/s5460/Urgent-play-banner.ai%20(1).png" style="display: none;" /> <name content="IMG" twitter:image=""><div class="separator" style="clear: both; font-style: italic; text-align: justify;"><div class="separator" style="clear: both; text-align: justify;"><i style="font-family: inherit; text-align: left;"><div class="separator" style="clear: both; text-align: justify;"><i style="font-family: inherit; text-align: left;">Posted by&nbsp;<span style="color: #1b1c1d; white-space-collapse: preserve;">Sameer Samat, President of Android Ecosystem</span></i></div></i></div></div><div class="separator" style="clear: both; font-style: italic; text-align: justify;"><i style="font-family: inherit; text-align: left;"><span style="color: #1b1c1d; white-space-collapse: preserve;"><br /></span></i></div><div class="separator" style="clear: both; font-style: italic; text-align: justify;"><i style="font-family: inherit; text-align: left;"><span style="color: #1b1c1d; white-space-collapse: preserve;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhjP67PG_uZFpCgYqwMzC-PmjaM5mhOFX_kMw7B-zyV7c785DKqOVDvm4GpEoE26dzItiUcBmYqB3IfdqI_lqmKBTRWTlEk4eM0Mu9VcHqsFzN1VQsmTMq_JX2IbhB8dSOVfJsuOHgrBmdGbrlrkmRy11aRNXtSZtFe5Fd0r-bOO7Ja79gP6W9b9HX_psw" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="769" data-original-width="1418" src="https://blogger.googleusercontent.com/img/a/AVvXsEhjP67PG_uZFpCgYqwMzC-PmjaM5mhOFX_kMw7B-zyV7c785DKqOVDvm4GpEoE26dzItiUcBmYqB3IfdqI_lqmKBTRWTlEk4eM0Mu9VcHqsFzN1VQsmTMq_JX2IbhB8dSOVfJsuOHgrBmdGbrlrkmRy11aRNXtSZtFe5Fd0r-bOO7Ja79gP6W9b9HX_psw=s16000" /></a></div><br /><br /></span></i></div><div><span style="font-family: inherit;"><div style="font-style: italic;"><br /></div><span id="docs-internal-guid-93e65ce5-7fff-b61d-bdb4-8adfcf979cfe"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="text-align: left;"><span style="color: #1b1c1d; font-family: inherit; white-space-collapse: preserve;"><span style="color: black;">Android has always driven innovation in the industry through its unique flexibility and openness. At this important moment, we want to continue leading the way in how developers distribute their apps and games to people on billions of devices across many form factors. A modern platform must be flexible, providing developers and users with choice and openness as well as a safe experience.</span></span></span></span></span></span></span></div><div><span><span><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="text-align: left;"><span style="color: #1b1c1d; font-family: inherit; white-space-collapse: preserve;"><span style="color: black;"><br /></span></span></span></span></span></span></span></div><div><span id="docs-internal-guid-ac738d89-7fff-14a6-f18c-a35519aa9a2e"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Today we are announcing substantial updates that evolve our business model and build on our long history of openness globally.&nbsp; We’re doing that in three ways: more billing options, a program for registered app stores, and lower fees and new programs for developers.</span></span></span></div><div class="separator" style="clear: both; text-align: center;"><span id="docs-internal-guid-8b2e7279-7fff-d21a-3f53-5a8297fb5a74"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Expanded billing choice on Google Play for users and developers</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Google Play is giving developers even more billing choice and freedom in how they handle transactions. Mobile developers will have the option to use their own billing systems in their app alongside Google Play’s billing, or they can guide users outside of their app to their own websites for purchases. Our goal is to offer this flexibility in a way that maximizes choice and safety for users.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Leading the way in store choice</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">We’re introducing a program that makes sideloading qualified app stores even easier. Our new Registered App Stores program will provide a more streamlined installation flow for Android app stores that meet certain quality and safety benchmarks.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Once this change has rolled out, app stores that choose to participate in this optional program will have registered with us and so users who sideload them will have a more simplified installation flow (see graphic below).&nbsp; If a store chooses not to participate, nothing changes for them and they retain the same experience as any other sideloaded app on Android.&nbsp;&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">This gives app stores more ways to reach users and gives users more ways to easily and safely access the apps and games they love.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="font-family: inherit;"><span id="docs-internal-guid-a20fa45d-7fff-a34b-0c5f-b2c1bb4d6273"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">This Registered App Store program will begin outside of the US first, and we intend to bring it to the US as well, subject to court approval.</span></span></p><div class="separator" style="clear: both; font-style: italic; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiR-ic79bm0-suWMjAFrTYOlEwevSjagIbi2xco9O6VviRfzP9fCAlNVFTCN_OD61agIkh0vFZZnQYFUQLPz_mRudmJ91N-IKWTL9VvJfFVbyQsIU1_i7omiHhEdRel_RhW_mh0HB9BaEZC7m2b61UfUf-G7IGmKquq9JjPIDRwAruOOkLoAhLvEEwNWs4" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1838" data-original-width="824" height="640" src="https://blogger.googleusercontent.com/img/a/AVvXsEiR-ic79bm0-suWMjAFrTYOlEwevSjagIbi2xco9O6VviRfzP9fCAlNVFTCN_OD61agIkh0vFZZnQYFUQLPz_mRudmJ91N-IKWTL9VvJfFVbyQsIU1_i7omiHhEdRel_RhW_mh0HB9BaEZC7m2b61UfUf-G7IGmKquq9JjPIDRwAruOOkLoAhLvEEwNWs4=w288-h640" width="288" /></a></div><br /></div><div><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-e5401625-7fff-99f5-a3e5-28ef7bdf3007"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="font-size: medium;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">Lower pricing and new programs to support developers</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">&nbsp;&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Google Play’s fees are already the lowest among major app stores, and today we are taking this even further by introducing a new business model that decouples fees for using our billing system and introduces new, lower service fees. Once this rolls out:</span></p><ol style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: decimal; text-wrap-mode: nowrap; vertical-align: baseline;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Billing: </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">For those developers who choose to use Google Play’s billing system, they will be charged a market-specific rate separate from the service fee. In the European Economic Area (EEA), UK, and US that rate will be 5%.</span></p></li><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: decimal; text-wrap-mode: nowrap; vertical-align: baseline;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Service Fees:&nbsp;&nbsp;</span></p></li><ol style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="2" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: lower-alpha; text-wrap-mode: nowrap; vertical-align: baseline;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">For new installs (first time installs from users after the new fees are launched in a region), we are reducing the in-app purchase (IAP) service fee to 20%.&nbsp;&nbsp;</span></p></li><li aria-level="2" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: lower-alpha; text-wrap-mode: nowrap; vertical-align: baseline;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">We are launching an Apps Experience Program and revamping our Google Play Games Level Up program to incentivize building great software experiences across Android form factors associated with clear quality benchmarks and enhanced user benefits.&nbsp; Those developers who choose to participate in these programs will have even lower rates. Participating IAP developers will have a 20% service fee for transactions from existing installs and a 15% fee on transactions from new app installs.</span></p></li><li aria-level="2" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: lower-alpha; text-wrap-mode: nowrap; vertical-align: baseline;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">Our service fee for recurring subscriptions will be 10%.</span></p></li></ol></ol><div class="separator" style="clear: both; font-style: italic; text-align: center;"><span style="border: none; display: inline-block; height: 309px; margin-left: 1em; margin-right: 1em; overflow: hidden; width: 624px;"> <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjJKdulmeivx1g4aMwV18oEaeaWypXX7PaEFbMdVzo9SRv6G5jRiAUiSZW33xbudHBnCP7HFZb9OCkEfYwDjg5KnR7f16p3SC3VHGVyMaHbESb4H74wTZiafe3m-nwBbhf7PUSshxjUNu46_gFjRSf80_RpswmZUeQb_9sB9Wd6TATf9wbjSpr2BslK7P4" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="992" data-original-width="2000" src="https://blogger.googleusercontent.com/img/a/AVvXsEjJKdulmeivx1g4aMwV18oEaeaWypXX7PaEFbMdVzo9SRv6G5jRiAUiSZW33xbudHBnCP7HFZb9OCkEfYwDjg5KnR7f16p3SC3VHGVyMaHbESb4H74wTZiafe3m-nwBbhf7PUSshxjUNu46_gFjRSf80_RpswmZUeQb_9sB9Wd6TATf9wbjSpr2BslK7P4=s16000" /></a></div><br /><br /><br /></span></div></span></span></div></span></div></name><div style="font-style: italic;"><name content="IMG" twitter:image=""><br /></name></div><div class="separator" style="clear: both; font-style: italic; text-align: center;"><br /></div><div style="font-style: italic;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiL4ZAgJoKLuEtiiOAAX_nXAMmD497R869bs_N8f37vvEMCJGLyOMBFF9JX_ZpKhWutfoIfmEvSRM6-W1g4CQOk1SNoC8VHmhNchM7Llj2Y1UNfyr7PhZdB_fUwLQalM_kLznrDIhkI85VJssLlvmuzOffNuBehyWIG6XuchrEhkY3vhf7bJY-PDCrgtxk" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="992" data-original-width="2000" src="https://blogger.googleusercontent.com/img/a/AVvXsEiL4ZAgJoKLuEtiiOAAX_nXAMmD497R869bs_N8f37vvEMCJGLyOMBFF9JX_ZpKhWutfoIfmEvSRM6-W1g4CQOk1SNoC8VHmhNchM7Llj2Y1UNfyr7PhZdB_fUwLQalM_kLznrDIhkI85VJssLlvmuzOffNuBehyWIG6XuchrEhkY3vhf7bJY-PDCrgtxk=s16000" /></a></div><br /><br /></div><div><name content="IMG" twitter:image=""><span id="docs-internal-guid-8ff7f691-7fff-f769-c661-62a4bbdd06f8"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit; font-size: medium;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Rollout timelines</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">This is a significant evolution, and we plan to share additional details in the coming months. To make sure we have enough time to build the necessary technical infrastructure, enable a seamless transition for developers, and ensure alignment with local regulations, these updated fees will roll out on the following staggered schedule:</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">By June 30:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> EEA, the United Kingdom and the US.</span></span></p></li><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">By September 30: </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">Australia&nbsp;&nbsp;</span></span></p></li><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">By December 31:&nbsp; </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">Korea and Japan</span></span></p></li><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">By September 30, 2027:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> The updates will reach the rest of the world.</span></span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">We will also launch the updated Google Play Games Level Up program and new App Experience program by September 30 for EEA, UK, US, and Australia and then it will roll out in line with the rest of the schedule above.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">We plan to launch Registered App Stores with a version of a major Android release by the end of the year.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit; font-size: medium;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Resolving disputes with Epic Games</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">With these updates, we have also resolved our disputes worldwide with Epic Games.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">We believe these changes will make for a stronger Android ecosystem with even more successful developers and higher-quality apps and games available across more form factors for everyone. We look forward to our continued work with the developer community to build the next generation of digital experiences.</span></span></p></span></name></div><div class="separator" style="clear: both; font-style: italic; text-align: center;"><br /></div><br />Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-14541866428068237282026-03-03T10:00:00.000-08:002026-03-03T15:11:31.288-08:00Android devices extend seamlessly to connected displays<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQj6WqRvMuG1fbeZpi1dCTSrCC6E3MfpSX1gNw9M6MNbUFgsAJU3LRuwpEuXOHfTtjfXiEdn__Z99fqoZF003CS8_1-EwDHnRyqM0LuoEsWrjXwm1BLqxNulw0dth0Fo78UiXkqV-VKSY12AjULWKkknvUv_H7V_g2yzTIiTwua3OowwzFg8jgawT09aU/s2469/Android%20Connected%20displays%20-%20Meta%20v02.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQj6WqRvMuG1fbeZpi1dCTSrCC6E3MfpSX1gNw9M6MNbUFgsAJU3LRuwpEuXOHfTtjfXiEdn__Z99fqoZF003CS8_1-EwDHnRyqM0LuoEsWrjXwm1BLqxNulw0dth0Fo78UiXkqV-VKSY12AjULWKkknvUv_H7V_g2yzTIiTwua3OowwzFg8jgawT09aU/s2469/Android%20Connected%20displays%20-%20Meta%20v02.png" style="display: none;" /> <name content="IMG" twitter:image=""><div class="separator" style="clear: both; text-align: justify;"><em style="text-align: left;">Posted by Francesco Romano, Senior Developer Relations Engineer on Android&nbsp;</em></div><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"></span></p><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6BQv41SBSCrXXVAHp5xtMH6r3xnGzBPaDPJAiQPjHu4lApalkNOcwhms5YaxCpO_dtmR9FztnxztR35dvGh-sloGtwxGmA6esvnPyIiTbn24_FJg6KuprMdb4HJDORiRnhJdYRG4rh4Pu5XqS4gjnNjo-ZnxDhFIdraSivnu3IA2wOYOR98G4Ur0Z3cA/s8419/Android%20%20Connected%20displays-%20Blog%20v02.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="2507" data-original-width="8419" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6BQv41SBSCrXXVAHp5xtMH6r3xnGzBPaDPJAiQPjHu4lApalkNOcwhms5YaxCpO_dtmR9FztnxztR35dvGh-sloGtwxGmA6esvnPyIiTbn24_FJg6KuprMdb4HJDORiRnhJdYRG4rh4Pu5XqS4gjnNjo-ZnxDhFIdraSivnu3IA2wOYOR98G4Ur0Z3cA/s16000/Android%20%20Connected%20displays-%20Blog%20v02.png" /></a><span style="font-family: inherit;"></span></div><span style="font-family: inherit;"><br /></span><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">We are excited to announce a major milestone in bringing mobile and desktop computing closer together on Android: connected display support has reached general availability with the </span><a href="https://developer.android.com/about/versions/16/qpr3/release-notes" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Android 16 QPR3</span></a><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> release!</span><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">As shown at </span><a href="https://www.youtube.com/watch?v=MmeJSLAnB-M" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Google I/O 2025</span></a><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, connected displays allow users to connect their Android devices to an external monitor and instantly access a desktop windowing environment. Apps can be used in free-form or maximized windows and users can multitask just like they would on a desktop OS.</span></span></p><p><span id="docs-internal-guid-75f72547-7fff-5d9d-bf02-01f0b67be3ae"><span style="font-family: inherit;"><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Google and Samsung have collaborated to bring a seamless and powerful desktop windowing experience to devices across the Android ecosystem running Android 16 while connected to an external display. </span><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">This is now generally available on supported devices* to users who can connect their supported Pixel and Samsung phones to external monitors, enabling new opportunities for building more engaging and more productive app experiences that adapt across form factors.</span></span></span></p><p><span id="docs-internal-guid-146aa3d2-7fff-ef3b-dc61-6d500135f7e3"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;"><b>How does it work?</b></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">When a supported Android phone or foldable is connected to an external display, a new desktop session starts on the connected display.</span></span></p><p><span style="font-family: inherit;"><span id="docs-internal-guid-4d2338ce-7fff-4e5f-1832-065b27cf4c33"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The experience on the connected display is similar to the experience on a desktop, including a taskbar that shows active apps and lets users pin apps for quick access. Users are able to run multiple apps side by side simultaneously in freely resizable windows on the connected display.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both;"><img src="https://blogger.googleusercontent.com/img/a/AVvXsEh4KMWMVZ7Rz0KIkvTwRezAsagg8e0Uzek67H7ut0Knkxr0ZayC_P032KgjfwUJuxWMD3ZR2pdZniNhS2_x3z_j8N9eA14jsbrhKsn59D0IuhCiSDBFWJqB12r6_rCz5nq_cjK3sGth0k8uC01CeDBspgWE5tmA5Uw2yOKOOBAVLETdH7A7a_lZyIWKa7E=w640-h360" /></div><br /><span style="font-family: inherit; font-style: italic;">Phone connected to an external display with a desktop session on the display while the phone maintains its own state.</span></div><div class="separator" style="clear: both; text-align: center;"><span><span style="font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><br /></span></span></span></div><div class="separator" style="clear: both; text-align: left;"><span id="docs-internal-guid-af416ba8-7fff-eacc-53f0-4f30afbc9a48"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">When a device that supports desktop windowing (such as a tablet like the Samsung Galaxy Tab S11) is connected to an external display, the desktop session is extended across both displays, unlocking an even more expansive workspace. The two displays then function as one continuous system, allowing app windows, content, and the cursor to move freely between the displays.</span></span></span></div><div class="separator" style="clear: both; text-align: left;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><br /></span></span></span></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><img src="https://blogger.googleusercontent.com/img/a/AVvXsEjPiH_J-KhHj4aqiehu1qeqh1jsTdY7ffoE8xWdnsE-XxSvLdAJduo4XgD1VuyV4fHH8QcxUYiwJMFBuxqs15QiFL082z2vnmM-xfVZvabKBW_o9Tsut5-d3u575q4JHy1fTnQfIydgQApyc2a9UJ6gAmdNF2prhB3OzDDTONzmXi6RmGiF3QD7PvS2ySI=w640-h360" /><span><span><span style="font-family: inherit;"></span></span></span></div><span><span><span style="font-family: inherit;"><span style="font-family: inherit; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: center; vertical-align: baseline;"><div style="text-align: center;"><span style="font-family: inherit;">Tablet connected to an external display, extending the desktop session across both displays.</span></div></span></span></span></span></div></name><p></p><h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;">Why does it matter?</span></span></h2><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">In the Android 16 QPR3 release, we finalized the windowing behaviors, taskbar interactions, and </span><a href="https://developer.android.com/guide/practices/device-compatibility-mode#override_mouse_to_touch" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">input compatibility</span></a><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> (mouse and keyboard) that define the connected display experience. We also included </span><a href="https://developer.android.com/guide/practices/device-compatibility-mode#display_compatibility_mode" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">compatibility treatments</span></a><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to scale windows and avoid app restarts when switching displays.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><br /><span style="color: #1b1c1d; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">If your app is built with </span><a href="https://m3.material.io/foundations/adaptive-design" style="font-family: inherit; text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">adaptive design principles</span></a><span style="color: #1b1c1d; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, it will automatically have the desktop look and feel, and users will feel right at home. If the app is locked to portrait or assumes a touch-only interface, now is the time to modernize.</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">In particular, pay attention to these key best practices for optimal app experiences on connected displays:</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; margin-left: 7.5pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Don't assume a constant</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1b1c1d; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><a href="https://developer.android.com/reference/android/view/Display" style="font-family: Arial, sans-serif; text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: &quot;Courier New&quot;, monospace; font-style: normal; font-variant: normal; font-weight: 700; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Display</span></a><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1b1c1d; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-family: inherit;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">object:</span><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> <span style="font-family: inherit;">The</span></span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1b1c1d; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #1b1c1d; font-family: &quot;Courier New&quot;, monospace; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Display</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1b1c1d; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">object associated with your app's context can change when an app window is moved to an external display or if the display configuration changes. Your app should gracefully handle configuration change events and query display metrics dynamically rather than caching them.</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; margin-left: 7.5pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Account for </span><a href="https://developer.android.com/guide/topics/manifest/activity-element#config" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 700; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">density configuration changes</span></a><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">:</span><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> External displays can have vastly different pixel densities than the primary device screen. Ensure your layouts and resources adapt correctly to these changes to maintain UI clarity and usability. Use density-independent pixels (dp) for layouts, provide density-specific resources, and ensure your UI scales appropriately.</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; margin-left: 7.5pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Correctly </span><a href="https://developer.android.com/develop/ui/compose/touch-input/input-compatibility-on-large-screens" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 700; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">support external peripherals</span></a><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">: When users connect to an external monitor, they often create a more desktop-like environment. This frequently involves using external keyboards, mice, trackpads, webcams, microphones, and speakers. Improve the support for </span><a href="https://developer.android.com/develop/ui/compose/touch-input/keyboard-input/commands" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">keyboard</span></a><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and </span><a href="https://developer.android.com/develop/ui/compose/touch-input/input-compatibility-on-large-screens#mouse_and_touchpad" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">mouse</span></a><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> interactions.</span></span></p></li></ul><span style="font-family: inherit;"><br /><span style="font-size: x-large;"><b>Building for the desktop future with modern tools</b></span><br /><br />We provide several tools to help you build the desktop experience. Let’s recap the latest updates to our core adaptive libraries!</span><div><span style="font-family: inherit;"><br /></span></div><div><span style="font-family: inherit;"><span style="font-family: inherit; font-size: large;"><b>New window size classes: Large and Extra-large</b></span><br /><br />The biggest update in <a href="https://developer.android.com/jetpack/androidx/releases/window#1.5.0">Jetpack WindowManager 1.5.0</a> is the addition of two new width window size classes: Large and Extra-large.<br /><br />Window size classes are our official, opinionated set of viewport breakpoints that help you design and develop adaptive layouts. With 1.5.0, we're extending this guidance for screens that go beyond the size of typical tablets.<br /><br />Here are the new width breakpoints:<br /><ul style="text-align: left;"><li><span style="font-family: inherit;">Large: For widths between 1200dp and 1600dp</span></li><li><span style="font-family: inherit;">Extra-large: For widths ≥1600dp</span></li></ul></span><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt; text-align: center;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHronmxhyphenhyphenyTEWkNlkrdRFY_gd60yiuQL-a2SAzBDOeENHTIJ7NEDw-IABs8voG_B0VlxP6RdUZ2CTg_G1DkOuGyc2XE8l5OcVvPZnWbcgyMBDSVnar3gbi32OecgcyvScZKgGag6lS-knJoqSKsjYxfXXmVQMw8wwSRzkwbqcI2nHrXvz_4T0dNwqnTeg/s2048/window_size_classes_width.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="772" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHronmxhyphenhyphenyTEWkNlkrdRFY_gd60yiuQL-a2SAzBDOeENHTIJ7NEDw-IABs8voG_B0VlxP6RdUZ2CTg_G1DkOuGyc2XE8l5OcVvPZnWbcgyMBDSVnar3gbi32OecgcyvScZKgGag6lS-knJoqSKsjYxfXXmVQMw8wwSRzkwbqcI2nHrXvz_4T0dNwqnTeg/s16000/window_size_classes_width.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><span style="color: #1b1c1d; font-size: 11pt; font-style: italic; white-space-collapse: preserve;">The different window size classes based on display width.</span></div><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">On very large surfaces, simply scaling up a tablet's </span><span style="background-color: transparent; color: #1b1c1d; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Expanded</span><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> layout isn't always the best user experience. An email client, for example, might comfortably show two panes (a mailbox and a message) in the Expanded window size class. But on an </span><span style="background-color: transparent; color: #1b1c1d; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Extra-large</span><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> desktop monitor, the email client could elegantly display three or even four panes, perhaps a mailbox, a message list, the full message content, and a calendar/tasks panel, all at once.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span id="docs-internal-guid-09acce62-7fff-c42e-23e4-e2af58f2e0e9"><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">To include the new window size classes in your project, simply call the function from the </span></span><a href="https://developer.android.com/reference/androidx/window/core/layout/WindowSizeClass#BREAKPOINTS_V2()" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">WindowSizeClass.BREAKPOINTS_V2</span></a><span face="&quot;Google Sans&quot;, sans-serif" style="color: #1b1c1d; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">set instead of </span></span><a href="https://developer.android.com/reference/androidx/window/core/layout/WindowSizeClass#BREAKPOINTS_V1()" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">WindowSizeClass.BREAKPOINTS_V1</span></a><span face="&quot;Google Sans&quot;, sans-serif" style="font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">:</span></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: blue;">val</span> currentWindowMetrics = WindowMetricsCalculator.getOrCreate() .computeCurrentWindowMetrics(LocalContext.current) <span style="color: blue;">val</span> sizeClass = WindowSizeClass.BREAKPOINTS_V2 .computeWindowSizeClass(currentWindowMetrics)</pre><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><br /></p><span style="font-family: inherit;"><span style="font-family: inherit;"><b><div><span><span style="font-family: inherit;"><span id="docs-internal-guid-3b8376d1-7fff-f1e3-8e1e-dca3f960e4c6" style="font-weight: normal;"><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Then apply the correct layout when you’re sure your app has at least that much space:</span></span></span></span></div><div><br /></div><div><pre style="color: #333333; font-weight: 400; line-height: 16.25px; margin: 0px;"><span style="color: blue;">if</span>(sizeClass.isWidthAtLeastBreakpoint( WindowSizeClass.WIDTH_DP_LARGE_LOWER_BOUND)){ ... <span style="color: green;">// Window is at least 1200 dp wide.</span> }</pre></div><div style="font-size: xx-large;"><span style="font-family: inherit;"><span style="font-family: inherit; font-size: x-large;"><b><br /></b></span></span></div><span style="font-size: x-large;">Build adaptive layouts with Jetpack Navigation 3</span></b></span><br /><br /><a href="https://developer.android.com/guide/navigation/navigation-3">Navigation 3</a> is the latest addition to the Jetpack collection. Navigation 3, which just reached its first stable release, is a powerful navigation library designed to work with Compose.<br /><br />Navigation 3 is also a great tool for building adaptive layouts by allowing multiple destinations to be displayed at the same time and allowing seamless switching between those layouts.<br /><br />This system for managing your app's UI flow is based on Scenes. A <a href="https://developer.android.com/reference/kotlin/androidx/navigation3/ui/Scene">Scene</a> is a layout that displays one or more destinations at the same time. A <a href="https://developer.android.com/reference/androidx/navigation3/ui/SceneStrategy">SceneStrategy</a> determines whether it can create a Scene. Chaining SceneStrategy instances together allows you to create and display different scenes for different screen sizes and device configurations.<br /><br />For out-of-the-box canonical layouts, like list-detail and supporting pane, you can <a href="https://developer.android.com/guide/navigation/navigation-3/custom-layouts#display-list-detail">use the Scenes from the Compose Material 3 Adaptive library</a> (available in <a href="https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#compose_material3_adaptive_version_13_2">version 1.3 and above</a>).<br /><br />It's also easy to build your own custom Scenes by <a href="https://github.com/android/nav3-recipes?tab=readme-ov-file#create-custom-scenes">modifying the Scene recipes</a> or starting from scratch. For example, let’s consider a Scene that displays three panes side by side:</span><div><br /></div><div><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: blue;">class</span> <span style="color: #2b91af;">ThreePaneScene</span>&lt;T : <span style="color: #2b91af;">Any</span>&gt;( <span style="color: blue;">override</span> <span style="color: blue;">val</span> key: <span style="color: #2b91af;">Any</span>, <span style="color: blue;">override</span> <span style="color: blue;">val</span> previousEntries: List&lt;NavEntry&lt;T&gt;&gt;, <span style="color: blue;">val</span> firstEntry: NavEntry&lt;T&gt;, <span style="color: blue;">val</span> secondEntry: NavEntry&lt;T&gt;, <span style="color: blue;">val</span> thirdEntry: NavEntry&lt;T&gt; ) : Scene&lt;T&gt; { <span style="color: blue;">override</span> <span style="color: blue;">val</span> entries: List&lt;NavEntry&lt;T&gt;&gt; = listOf(firstEntry, secondEntry, thirdEntry) <span style="color: blue;">override</span> <span style="color: blue;">val</span> content: @Composable (() -&gt; <span style="color: #2b91af;">Unit</span>) = { Row(modifier = Modifier.fillMaxSize()) { Column(modifier = Modifier.weight(1f)) { firstEntry.Content() } Column(modifier = Modifier.weight(1f)) { secondEntry.Content() } Column(modifier = Modifier.weight(1f)) { thirdEntry.Content() } } }</pre></div><div><br /></div><span style="font-family: inherit;">In this scenario, you could define a&nbsp;</span><span id="docs-internal-guid-e00a3647-7fff-ca8e-df0b-c435d45f1863"><a href="https://developer.android.com/reference/kotlin/androidx/navigation3/ui/SceneStrategy" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">SceneStrategy</span></a></span><span style="font-family: inherit;">&nbsp;to show three panes if the window width is wide enough and the entries from your back stack have declared that they support being displayed in a three-pane scene.</span><div><br /></div><div><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: blue;">class</span> <span style="color: #2b91af;">ThreePaneSceneStrategy</span>&lt;T : <span style="color: #2b91af;">Any</span>&gt;(<span style="color: blue;">val</span> windowSizeClass: WindowSizeClass) : SceneStrategy&lt;T&gt; { <span style="color: blue;">override</span> <span style="color: blue;">fun</span> SceneStrategyScope&lt;T&gt;.calculateScene(entries: List&lt;NavEntry&lt;T&gt;&gt;): Scene&lt;T&gt;? { <span style="color: blue;">if</span> (windowSizeClass.isWidthAtLeastBreakpoint(WIDTH_DP_LARGE_LOWER_BOUND)) { <span style="color: blue;">val</span> lastThree = entries.takeLast(3) <span style="color: blue;">if</span> (lastThree.size == 3 &amp;&amp; lastThree.all { it.metadata.containsKey(MULTI_PANE_KEY) }) { <span style="color: blue;">val</span> firstEntry = lastThree[0] <span style="color: blue;">val</span> secondEntry = lastThree[1] <span style="color: blue;">val</span> thirdEntry = lastThree[2] <span style="color: blue;">return</span> ThreePaneScene( key = Triple(firstEntry.contentKey, secondEntry.contentKey, thirdEntry.contentKey), previousEntries = entries.dropLast(3), firstEntry = firstEntry, secondEntry = secondEntry, thirdEntry = thirdEntry ) } } <span style="color: blue;">return</span> <span style="color: blue;">null</span> } }</pre></div><div><br /></div><span style="font-family: inherit;">You can use your ThreePaneSceneStrategy with other strategies when creating your&nbsp;</span><span id="docs-internal-guid-39ceb41a-7fff-d2ac-b9e0-38b39d2619fb"><a href="https://developer.android.com/reference/kotlin/androidx/navigation3/ui/NavDisplay" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">NavDisplay</span></a></span><span style="font-family: inherit;">. For example, we could also add a TwoPaneStrategy to display two panes side by side when there isn't enough space to show three.</span><div><br /></div><div><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: blue;">val</span> strategy = ThreePaneSceneStrategy() then TwoPaneSceneStrategy() NavDisplay(..., sceneStrategy = strategy, entryProvider = entryProvider { entry&lt;MyScreen&gt;(metadata = mapOf(MULTI_PANE_KEY to <span style="color: blue;">true</span>))) { ... } ... other entries... } )</pre></div><span style="font-family: inherit;"><br /></span><span style="font-family: inherit;"><span id="docs-internal-guid-b7782ab3-7fff-fc0e-3b3b-32d246458d63"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">If there isn't enough space to display three or two panes—both our custom scene strategies return</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span></span><span style="font-family: &quot;Courier New&quot;, monospace; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">null</span><span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">In this case,</span></span><span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-family: &quot;Courier New&quot;, monospace; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">NavDisplay</span><span style="font-family: &quot;Google Sans&quot;, sans-serif; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">falls back to displaying the last entry in the back stack in a single pane using</span></span><span style="font-family: &quot;Google Sans&quot;, sans-serif; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-family: &quot;Courier New&quot;, monospace; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">SinglePaneScene</span><span style="font-family: &quot;Google Sans&quot;, sans-serif; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. </span></span><br /><br />By using scenes and strategies, you can add one, two, and three pane layouts to your app! </span><div><span style="font-family: inherit;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both;"><div class="separator" style="clear: both; text-align: center;"><img alt="" data-original-height="392" data-original-width="696" src="https://blogger.googleusercontent.com/img/a/AVvXsEhgLQZML4sXrGfsGkkbNKcnKRxTlwQ7_rnPHX3SD8ROOIbdrefOZ-cCicg2L_iASrtE9u52sH3oRmj63JzKeY2KJL0w0cNmJDP_QE1kxlMTLpRQiKDfLRptSVcvaz1Jp85Uf2I7uH36PqmUE0DC6EK4vyU7_XeCvdllKWqYDfSWciGSRcydLt_6QfNmNag=s16000" />&nbsp; &nbsp;<span style="color: #1b1c1d; font-family: inherit; font-style: italic; white-space-collapse: preserve;">An adaptive app showing three-pane navigation on wide screens.</span></div></div></div><span id="docs-internal-guid-cc22f9da-7fff-1509-352c-9468d57b49c8"><div><span style="color: #1b1c1d; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></span></div></span></div><div><span id="docs-internal-guid-bf133001-7fff-6903-bce6-57a29499561a"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Checkout the documentation to learn more on </span><a href="https://developer.android.com/guide/navigation/navigation-3/custom-layouts" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">how to create custom layouts using Scenes in Navigation 3</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span></span></p><span style="font-family: inherit;"><br /></span><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 16pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Standalone adaptive layouts</span></span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">If you need a standalone layout, the </span><a href="https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Compose Material 3 Adaptive library</span></a><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> helps you create adaptive UIs like list-detail and supporting pane layouts that adapt themselves&nbsp; to window configurations automatically based on&nbsp; window size classes or device postures.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">The good news is that the library is already up to date with the new breakpoints! Starting from </span><a href="https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#compose_material3_adaptive_version_12_2" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">version 1.2</span></a><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, the default pane scaffold directive functions support Large and Extra-large width window size classes.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">You only need to opt-in by declaring in your Gradle build file that you want to use the new breakpoints:</span></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;">currentWindowAdaptiveInfo(supportLargeAndXLargeWidth = <span style="color: blue;">true</span>)</pre><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><br /></p><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 6pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;">Getting started</span></span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Explore the connected display feature in the latest Android release. Get </span><a href="https://developer.android.com/about/versions/16/qpr3/release-notes" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Android 16 QPR3</span></a><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> on a supported device, then connect it to an external monitor to start testing your app today!&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Dive into the updated documentation on </span><a href="https://developer.android.com/develop/ui/compose/layouts/adaptive/support-connected-displays" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">multi-display support</span></a><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and </span><a href="https://developer.android.com/develop/ui/compose/layouts/adaptive/support-desktop-windowing" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">window management</span></a><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to learn more about implementing these best practices.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Feedback</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Your feedback is crucial as we continue to refine the connected display desktop experience. Share your thoughts and report any issues through our </span><a href="https://developer.android.com/about/versions/16/qpr3/feedback" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">official feedback channels</span></a><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1b1c1d; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">We're committed to making Android a versatile platform that adapts to the many ways users want to interact with their apps and devices. The improvements to connected display support are another step in that direction, and we think your users will love the desktop experiences you'll build!</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span id="docs-internal-guid-1435b22a-7fff-489e-78e4-14b5cb18f0c5"><br /><span style="font-family: inherit;"><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">*Note:</span><span style="color: #1b1c1d; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> At the time the article is written, connected displays are supported on Pixel 8, 9, 10 series and on a wide array of Samsung devices, including S26, Fold7, Flip7, and Tab S11.</span></span></span></p></span></div></div>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-38695035540518968252026-03-03T06:00:00.000-08:002026-03-06T11:38:32.168-08:00Go from prompt to working prototype with Android Studio Panda 2<meta content="https://blogger.googleusercontent.com/img/a/AVvXsEhLTc4F-g6PiUv6-q3ECoGWOrEjF7u6KfOiscw-suTfGb1I1i6CIWX7MQru-XO8up1opOiwnNGGCX5agJocpFYqbhLxRWsHMEa53zFnPSwWMt1C1-i37-JLvqFPWkesEwbqHKOrMkyI3gNDlOUFCRNF_41_dLP7-33Sjs0bqTOGXhBcDomhSOoURUUrb_Y" name="twitter:image"></meta><div class="separator" style="clear: both; text-align: justify;"><em style="text-align: left;">Posted by&nbsp;</em><span face="&quot;Google Sans&quot;, sans-serif" style="text-align: left; white-space-collapse: preserve;"><i><span>Matt Dyor, Senior Product Manager</span></i></span></div><name content="IMG" twitter:image=""><div class="separator" style="clear: both;"><br /></div><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiyAyhvHPWOksRPnC1ISWgnl_SmhuDDSVj_lA-bhvL7yR8dAbvVTMdYQN7cWnARsiGSDvMdSiVcEgdvm9HwY9FijaOquS2R2iOdd-8PPC0lPFnak8Klvq9X_POXoM_G_V8sn_NlujPygBfdv4VWPv_jHzLxWdjOvqOMzjeWPvpw6xMjtnhTigyd-yDOU5o" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="507" data-original-width="800" src="https://blogger.googleusercontent.com/img/a/AVvXsEiyAyhvHPWOksRPnC1ISWgnl_SmhuDDSVj_lA-bhvL7yR8dAbvVTMdYQN7cWnARsiGSDvMdSiVcEgdvm9HwY9FijaOquS2R2iOdd-8PPC0lPFnak8Klvq9X_POXoM_G_V8sn_NlujPygBfdv4VWPv_jHzLxWdjOvqOMzjeWPvpw6xMjtnhTigyd-yDOU5o=s16000" /></a><div style="text-align: left;"><span id="docs-internal-guid-3abbcde2-7fff-1c0c-14cd-2fac8d73ed2b"><br /><span style="font-family: inherit;"><span id="docs-internal-guid-91931472-7fff-e913-f289-317216fc2bae"><span style="white-space-collapse: preserve;"><span style="font-family: inherit;">Android Studio Panda 2 is now stable and ready for you to use in production. This release brings new agentic capabilities to Android Studio, enabling the agent to create an entire working application from scratch with the AI-powered New Project flow, and allowing the agent to automate the manual work of dependency updates.</span></span><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Whether you're building your first prototype or maintaining a large, established codebase, these updates bring new efficiency to your workflow by enabling Gemini in Android Studio to help more than ever.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Here’s a deep dive into what’s new:</span></span></p></span><h2 dir="ltr" style="line-height: 1.2; margin-bottom: 4pt; margin-top: 18pt;"><span id="docs-internal-guid-bda4ad53-7fff-b1e5-cd61-2627182522bd" style="font-weight: normal;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">Create New Projects with AI </span></span></span></h2><span id="docs-internal-guid-388bf5f6-7fff-4f1d-f0f4-9a0bde131658"><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Say goodbye to boilerplate starter templates that just get you to the start line. With the <a href="https://developer.android.com/studio/gemini/create-a-new-project-with-ai">AI-powered New Project flow</a>, you can now build a working app prototype with just a single prompt.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: white; color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">The agent reduces the time you spend setting up dependencies, writing boilerplate code, and creating basic navigation, allowing you to focus on the creative aspects of app development. </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">The AI-powered New Project flow allows you to describe exactly what you want to build - you can even upload images for style inspiration. The agent then creates a detailed project plan for your review.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">When you're ready, the agent turns your plan into a first draft of your app using Android best practices, including Kotlin, Compose, and the latest stable libraries. Under your direction, it creates an autonomous generation loop: it generates the necessary code, builds the project, analyzes any build errors, and attempts to self-correct the code, looping until your project builds successfully. It then deploys your app to an Android Emulator and walks through each screen, verifying that the implementation works correctly and is true to your original request. Whether you need a simple single-screen layout, a multi-page app with navigation, or even an application integrated with Gemini APIs, the AI-powered New Project flow can handle it.</span></span></p></span><h3 style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span id="docs-internal-guid-6da40d6c-7fff-3657-6ce4-c471f8c64053" style="font-weight: normal;"><span style="color: #434343; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Getting Started </span></span></span></h3><p dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">To use the agent to set up a project, do the following:</span></span></p><ol style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-align: left;"><li aria-level="1" style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><p role="presentation" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 9pt;"><span style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Start Android Studio.</span></span></p></li><li aria-level="1" style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><p role="presentation" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Select </span><span style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">New Project</span><span style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> on the </span><span style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Welcome to Android Studio</span><span style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> screen (or </span><span style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">File &gt; New &gt; New Project</span><span style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> from within a project)</span></span></p></li><li><span id="docs-internal-guid-3abbcde2-7fff-1c0c-14cd-2fac8d73ed2b"><span style="font-family: inherit;"><span style="color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Select </span><span style="color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Create with AI</span><span style="color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span></span></span></li><li><span><span style="font-family: inherit;"><span style="color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Type your prompt into the text entry field and click </span><span style="color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Next</span><span style="color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.&nbsp; For best results we recommend using a paid </span><a href="https://developer.android.com/studio/gemini/add-api-key" style="text-decoration-line: none; white-space-collapse: preserve;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">Gemini API key</span></a><span style="color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> or third-party </span><a href="https://developer.android.com/studio/gemini/use-a-remote-model" style="text-decoration-line: none; white-space-collapse: preserve;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">remote model</span></a><span style="color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. </span></span></span></li></ol></span></span></div><div style="text-align: center;"><br /></div><div style="text-align: center;"><div class="separator" style="clear: both;"><img src="https://blogger.googleusercontent.com/img/a/AVvXsEjkZYpZn5p_e-c5nMJQfiCfaZZnNlIwbmH-z6LjMFGrDfUqWjS58GJFdKjEjXbcBhU-SuP_JK1Bz64XRb3AIyHOObGV5byU3X6giLj6bkCAuWiKZ6zk6Kmktmp-WTtirf-pyTblB_gCt0eUtYYOZMZDY81qpgjwmmxY7_zqzgFjRWu2JyMrptU8xR31WDc=w640-h483" /></div></div><div style="text-align: center;"><span face="&quot;Google Sans&quot;, sans-serif" style="background-color: white; font-style: italic; text-align: left; white-space-collapse: preserve;">Create a New Project with AI in Android Studio</span></div></name><p></p><p style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; padding: 0pt 0pt 9pt; text-align: left;"></p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><span id="docs-internal-guid-840fd063-7fff-56ad-7908-74edd37da765"><p dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; padding: 0pt 0pt 9pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">5. Name your app and click </span><span style="background-color: transparent; color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Finish</span><span style="background-color: transparent; color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> to start the generation process.</span></span></p><p dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 9pt; margin-top: 0pt;"><span style="background-color: transparent; color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">6. Validate the finished app using the project plan and by running your app in the Android Emulator or on an Android device.</span></span></p><div>&nbsp;&nbsp;</div></span></blockquote><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both;"><img src="https://blogger.googleusercontent.com/img/a/AVvXsEjnDW5Psq4UcHhLADIdzvocP6muASPZ6iOE6Y9v045JiOFUBvybHGEawyNErtMTqUEoNpuLR0qbYB_fFndMIQmtjpEiH8a8rJuI66SCb53rtLVSiwURBWoBexs3tdNcSoEKDRSoeV7uTdWbAr4W7CIrKNwOG2fTpKZrxg1KEB5i_ppK1IydXztSmAzxHhs=w640-h358" /></div><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: white; color: #202124; font-style: italic; text-align: left; white-space-collapse: preserve;">AI-powered New Project flow</span></div><p><span id="docs-internal-guid-19919594-7fff-8b1a-0dae-24d03e551ad3"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">For more details on the New Project flow, check out the </span><a href="https://developer.android.com/studio/gemini/create-a-new-project-with-ai" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">official documentation</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. </span></span></span></p><span id="docs-internal-guid-380725da-7fff-37bd-3d72-c9243684cbe6"><h3 style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span id="docs-internal-guid-98860ec8-7fff-eac4-6891-6b7ded7b8f55" style="font-weight: normal;"><span style="color: #434343; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Share What You Build</span></span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-841380d1-7fff-9366-59b2-7e0411d86863"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">We want to hear from you and see the apps you’re able to build using the New Project flow. Share your apps with us by using #AndroidStudio in your social posts. We’ll be amplifying some of your submissions on our social channels. </span></span></span></p><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 4pt; margin-top: 14pt;"><span id="docs-internal-guid-400c0650-7fff-fa39-d9b7-9b8184d48ff4" style="font-weight: normal;"><span style="color: #434343; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Unlock more with your Gemini API key</span></span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">While the agent works out-of-the-box using Android Studio's default no-cost model, providing your own Google AI Studio API key unlocks the full potential of the assistant. By connecting a paid Gemini API key, you get access to the fastest and latest models from Google. It also allows the New Project flow to access Nano Banana, our best model for image generation, in order to ideate on UI design — allowing the agent to create richer, higher fidelity application designs.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span id="docs-internal-guid-66c16b30-7fff-cfd5-0de9-16876bd52515"></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">In the AI-powered New Project flow, this increased capability means larger context windows for more tailored generation, as well as superior code quality. Furthermore, because the Agent uses Nano Banana behind the scenes for enhanced design generation, your prototype doesn't just work well—it features visually appealing, modern UI layouts and looks professional from the get go.</span></span></p></span><div style="text-align: center;"><div class="separator" style="clear: both; text-align: center;"><span id="docs-internal-guid-75f5d6c6-7fff-2208-d9d7-956da235244d"><span id="docs-internal-guid-fe4acc99-7fff-0304-4ed5-5800de48cedb"><h2 style="color: #202124; line-height: 1.2; margin-bottom: 4pt; margin-top: 18pt; text-align: left; white-space-collapse: preserve;"><span style="color: black; font-family: inherit; font-size: x-large; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Version Upgrade Assistant</span></h2></span></span><span><span><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Keeping your project dependencies up to date is time-consuming and often causes cascading build errors. You fix one issue by updating a dependency, only to introduce a new issue somewhere else.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The Version Upgrade Assistant in Android Studio just made that a problem of the past. You can now let AI do the heavy lifting of managing dependencies and boilerplate so you can focus on creating unique experiences for your users.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span id="docs-internal-guid-c467814e-7fff-5df8-e2e0-ccee019ebf02"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">To use this feature, simply right-click in your version catalog, select </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">AI</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, and then </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Update Dependencies</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span></span></span></p></span></span><div style="text-align: left;"><div class="separator" style="clear: both; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: center; vertical-align: baseline;"><img src="https://blogger.googleusercontent.com/img/a/AVvXsEjZczf4kMiYDbi8gdZaqA1KKAsh1c85Fpvy4NwmMIbU6k833DAw1AhzZe74KP9Hxl0pwiyKCFbQo6gAYkrkEDKE6qVk1yhPTvv9aIXy3-dZqFof-X0Z2gxw9Z6-JRspugnOuG-C2Pz91KSa5-xF_0bLe9DFdCFtMxKG04amZj4LG2-hlaudW4Lk-j8pOWU=w640-h559" /><span><span><span></span></span></span></div><span><span><span><div class="separator" style="clear: both; color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: center; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: white; font-style: italic;"><span style="font-family: inherit;">Version Upgrade Assistant accessed from Version Catalog</span></span></div><div class="separator" style="clear: both; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: center; vertical-align: baseline;"><span id="docs-internal-guid-57691e7d-7fff-578a-6ace-d12783f89c9e" style="font-family: inherit;"><p dir="ltr" style="color: black; line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt; text-align: left; white-space-collapse: preserve;"><span id="docs-internal-guid-48ee8af6-7fff-2435-0204-4333e583e41e"></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">You can also access the Version Upgrade Assistant from the </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Refactor</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> menu—just choose </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Update all libraries with AI</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.&nbsp;</span></p></span></div></span></span></span></div></div></div><div style="text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div style="text-align: left;"><div class="separator" style="clear: both; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: center; vertical-align: baseline;"><div style="text-align: left;"><div class="separator" style="clear: both; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: center; vertical-align: baseline;"><img src="https://blogger.googleusercontent.com/img/a/AVvXsEhq8HQuysEhk_o-vlVEl_2j6Tht9kvjSJTpOo8NX1yyQ9OrFlzAVivJOy2FFS8wYmuXIJ7NQfZnwMR3O1c6975CsYf4eH511GSVQpQfsBZ9FNkZ7K_2nFr1XTMImdZq90fGqne8O1ddxUJrClo5W3BfOAw4yIKo4XtoVORY8rS6GvkaqasyC9RV77Ns4WM=w640-h535" /><span><span><span><span></span></span></span></span></div><span><span><span><span><span style="background-color: white; color: black; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><div style="text-align: center;"><span style="font-family: inherit;">Version Upgrade Assistant accessed from the Refactor menu</span></div></span></span></span></span></span></div></div><span><span><span><div style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: left; vertical-align: baseline;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><br /></span></div></span></span></span><div style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: center; vertical-align: baseline;"><span><span><span><span id="docs-internal-guid-80551ad1-7fff-f030-6441-acb6cf2dfb82"><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">The agent runs multiple automated rounds—attempting builds, reading error messages, and adjusting versions—until the build succeeds. Instead of manually fighting through dependency conflicts, you can let the agent handle the iterative process of finding a stable configuration for you. Read the </span><a href="https://developer.android.com/studio/gemini/manage-dependencies" style="text-decoration-line: none;" target="_blank"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">documentation</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> for more information on Version Upgrade Assistant.&nbsp;</span></span></p></span><span><h2 dir="ltr" style="line-height: 1.2; margin-bottom: 10pt; margin-top: 18pt; text-align: left;"><span id="docs-internal-guid-df5be68d-7fff-5471-81dc-d6463a9012ac" style="font-weight: normal;"><span style="color: #434343; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Gemini 3.1 Pro is available in Android Studio</span></span></span></h2><p dir="ltr" style="line-height: 1.2; margin-bottom: 10pt; margin-top: 0pt; text-align: left;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">We released Gemini 3.1 Pro preview, and it is even better than Gemini 3 Pro for reasoning and intelligence. You can access it in Android Studio by plugging in your Gemini API key. Put the new model to work on your toughest bugs, code completion, and UI logic. Let us know what you think of the new model.</span></span></p></span></span></span></span><div><div class="separator" style="clear: both; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><img src="https://blogger.googleusercontent.com/img/a/AVvXsEhZzy6h5q6Z50SfmzhbE7rXQuc_RIJwVLzTZvIYwPjbNIEL8eiMC0_kNKHYRsja512V-C5lYoiqN3RcLnNAiWNepUQUHpelbfzBKqzOK46HTW3R7BN1e-q8U24_E4z4ZRErryFmfxrjjNi7JKhDtW3p-7DHA6jl6AfwhltpVzwNbPosCYxU0LruRoYbANw=w640-h482" /><span><span><span><span><span></span></span></span></span></span></div><span><span><span><span><span><div class="separator" style="clear: both; font-family: &quot;Google Sans Text&quot;, sans-serif; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: center; vertical-align: baseline; white-space-collapse: preserve;"><span style="background-color: white; font-family: inherit; font-size: 11pt; font-style: italic;"> </span><span style="background-color: white; font-family: inherit; font-style: italic;">Gemini 3.1 Pro Now Available in Android Studio</span></div><span id="docs-internal-guid-975ecd92-7fff-6f11-ff0f-165cfdca513e" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><h2 dir="ltr" style="line-height: 1.2; margin-bottom: 6pt; margin-top: 18pt; text-align: left; white-space-collapse: preserve;"><span id="docs-internal-guid-068f6e9d-7fff-0315-73cf-c590e4391530" style="font-weight: normal;"><span style="color: #434343; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;"><span style="font-family: inherit; font-size: large;">Get started</span></span></span></h2><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: left; white-space-collapse: preserve;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Dive in and accelerate your development. </span><a href="https://developer.android.com/studio" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">Download</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> Android Studio Panda 2 and start exploring these powerful new agentic features today.</span></span></p><div style="text-align: left;"><span style="white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></span></div><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><div style="text-align: left;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">As always, your feedback is crucial to us. </span><a href="https://developer.android.com/studio/known-issues" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">Check known issues</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">, </span><a href="https://developer.android.com/studio/report-bugs" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">report bugs</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">, and be part of our vibrant community on </span><a href="https://www.linkedin.com/showcase/androiddev/posts/?feedView=all" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">LinkedIn</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">, </span><a href="https://medium.com/androiddevelopers" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">Medium</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">, </span><a href="https://www.youtube.com/c/AndroidDevelopers/videos" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">YouTube</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">, or </span><a href="https://twitter.com/androidstudio" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">X</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">. Happy coding!</span></span></div></span></span></span></span></span></span></span></div></div></div></div></div><p><br /></p><p></p>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-65277434679294694052026-03-02T06:00:00.000-08:002026-03-02T06:05:24.077-08:00Supercharge your Android development with 6 expert tips for Gemini in Android Studio<div class="separator"><br /></div><br /><name content="IMG" twitter:image=""><p><i></i></p><div class="separator" style="clear: both; text-align: center;"><i style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;"><span style="color: black; font-family: inherit;">Posted by&nbsp;<span style="white-space-collapse: preserve;">Trevor Johns, Developer Relations Engineer</span></span></i><span style="clear: left; color: black; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;"><img border="0" data-original-height="1253" data-original-width="4209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv6ya_o-1074e-LQsiFQwfieTC3UGjfT-G7R1hthQZ6SniipA55Ouziso49ElDf9H6I8ext7fVtte9yW1UIcMrtCWO3g3GcJbXI1bR0mQS8nLkwc5xgqfDj3TN4iPMcXNzt0vSYtaOxZNEqqmhMh32osl9rB-a4pCA4f4sf4p0F0ZQZC6tNeJB9V8k010/s16000/Supercharge%20your%20Android%20development%20with%206%20expert%20tips%20for%20Gemini%20in%20Android%20Studio%20%20Blog.png" /></span><span style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><i></i></span></div><i><br /><span style="font-family: inherit;"><br /></span></i><p></p><p><i><span style="font-family: inherit;"><br /></span></i></p><p><i><span style="font-family: inherit;"><br /></span></i></p><p><i><span style="font-family: inherit;"><br /></span></i></p><p><i><span style="font-family: inherit;"><br /></span></i></p><p><br /></p><p><br /></p><p><span style="font-family: inherit; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></p><p><span style="font-family: inherit; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">In January we </span><a href="https://android-developers.googleblog.com/2026/01/llm-flexibility-agent-mode-improvements.html" style="font-family: inherit; text-decoration-line: none;"><span style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">announced</span></a><span style="font-family: inherit; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> Android Studio Otter 3 Feature Drop in stable, including Agent Mode enhancements and many other updates to provide more control and flexibility over using AI to help you build high quality Android apps. To help you get the most out of Gemini in Android Studio and all the new capabilities, we sat down with Google engineers and Google Developer Experts to gather their best practices for working with the latest features—including Agent mode and the New Project Assistant. Here are some useful insights to help you get the best out of your development:</span></p><p><span><span style="font-family: inherit;"></span></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: inherit;"><iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/9caMeFQYCLk" width="320" youtube-src-id="9caMeFQYCLk"></iframe></span></div><div class="separator" style="clear: both; text-align: center;"><br /></div><span style="font-family: inherit;"><br /></span></name><p></p><ol style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-align: left;"><li aria-level="1" style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; list-style-type: decimal; margin-left: -22.5pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span id="docs-internal-guid-75c2560f-7fff-7803-89f4-e76fde7d8fd2" style="font-weight: normal;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit;">Build apps from scratch with the New Project Assistant </span></span></span></p></li></ol><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The new Project Assistant—now available in the latest Canary builds—integrates Gemini with the Studio's New Project wizard. By simply providing prompts and (optionally) design mockups, you can generate entire applications from scratch, including scaffolding, architecture, and Jetpack Compose layouts.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Integrated with the Android Emulator, it can deploy your build and "walk through" the app, making sure it’s functioning correctly and that the rendered screens actually match your vision. Additionally, you can use Agent Mode to then continue to work on the app and iterate, leveraging Gemini to refine your app to fit your vision.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Also, while this feature works with the default (no-cost) model, we highly recommend using this feature with an AI Studio API Key to access the latest models — like Gemini 3.1 Pro or 3.0 Flash —&nbsp;which excel at agentic workflows. Additionally, adding your API Key allows the New Project Assistant to use Nano Banana behind the scenes to help with ideating on UI design, improving the visual fidelity of the generated application! - Trevor Johns, Developer Relations Engineer.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><span id="docs-internal-guid-c40bc488-7fff-dc59-698d-a364005ad853"><div style="text-align: center;"><span id="docs-internal-guid-66c68829-7fff-05bd-3184-481f07b0473b"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: white; color: #202124; font-size: 12pt; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="border: none; display: inline-block; height: 475px; overflow: hidden; width: 629px;"><img height="475" src="https://blogger.googleusercontent.com/img/a/AVvXsEjhbdfy8Az_49Tt7_H9KvbrBNgnN-UT_VvMZ6C_826GNcIeBuX9itxSecmQFgHkiXkCBUcCYsL8b_QNNRWzdhRpyeC97DhaDQ4a7aN-HHe7-u33kP-JASbj3KBrSekd3iFjvRtxcAZVhibmapfwP_v4w_vZQ_ozfsTn92SYXMndC828HfiUFL7L_tCNSac" style="margin-left: 0px; margin-top: 0px;" width="629" /></span></span></span></div></span><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><span id="docs-internal-guid-7d98ded0-7fff-77c4-9c56-c032dbb90d72"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: white; color: #202124; font-size: 10.5pt; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Dialog for setting up a new project.</span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">2. Ask the Agent to refine your code by providing it with ‘intentional’ contexts</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">When using Gemini Agents, the quality of the output is directly tied to the boundaries you set. Don't just ask it to "fix this code"— be very intentional with the context that you provide it and be specific about what you want (and what you don't). Improve the output by providing recent blogs or docs so the model can make accurate suggestions based on these.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Ask the Agent to simplify complex logic, or if it see’s any fundamental problems with it, or even ask it to scan for security risks in areas where you feel uncertain. Being firm with your instructions—even telling the model "please do not invent things" in instances where you are using very new or experimental APIs—helps keep the AI focused on the outputs you are trying to achieve. - Alejandra Stamato, Android Google Developer Expert and Android Engineer at HubSpot.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">3. Use documentation with Agent mode to provide context for new libraries</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">To prevent the model from hallucinating code for niche or brand-new libraries, leverage Android Studio’s </span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Agent tools, </span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">to</span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">have access to documentation: Search Android Docs and Fetch Android Docs. You can direct Gemini to search the </span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Android Knowledge Base</span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> or specific documentation articles. The model can choose to use this if it thinks it’s missing some information, which is good especially when you use niche API’s, or one’s which aren’t as common.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">If you are certain you want the model to consult the documentation and to make sure those tools are triggered, a good trick is to add something like ‘search the official documentation’ or ‘check the docs’ to your prompts. And for documentation on different libraries which aren’t Android specific, install a MCP Server that lets you access documentation like Context7 (or something similar). - Jose Alcérreca, Android Developer Relations Engineer, Google.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">4. Use AI to help build </span><a href="http://agent.md" style="text-decoration: none;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Agents.md</span></a><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> files for using custom frameworks, libraries and design systems</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">To make sure Agent uses custom frameworks, libraries and design systems you have two options 1) In settings, Android Studio allows you to specify rules to be followed when Gemini is performing these actions for you. Or 2) Create </span><a href="http://agent.md" style="text-decoration: none;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Agents.md</span></a><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> files in your application and specify how things should be done or act as guidance for when AI is performing a task, specific frameworks, design systems, or specific ways of doing things (such as the exact architecture, things to do or what not to do), in a standard bullet point way to give AI clear instructions.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span id="docs-internal-guid-470553a3-7fff-bae5-8725-26653045f5a9"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="border: none; display: inline-block; height: 285px; overflow: hidden; width: 548px;"><img alt="Manage AGENTS.md files as context" height="285" src="https://blogger.googleusercontent.com/img/a/AVvXsEingrJG62t66t09vBXc4nHQy5XzhSR1-iddUVKuxa17WW5oBlTS7sDPciPNoDXifGU8o1E5Fey_5qw2VVInGUk7Zt1nwCbav1aIbJV-Jm371FBruIrIxv6pLfQGGOrqPCqGOMGi8Vknez8KQpT5g4z_yF0wLKFlQ5Npm_mM8arfvp0PRFvZ66eNYOkYDGc" style="margin-left: 0px; margin-top: 0px;" width="548" /></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><span id="docs-internal-guid-8f29f68b-7fff-fbc9-771d-74eaa70f335e" style="font-weight: normal;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: white; color: #202124; font-size: 10.5pt; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Manage </span><span style="background-color: #f8f9fa; color: #37474f; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 9.5pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">AGENTS.md</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: white; color: #202124; font-size: 10.5pt; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> files as context.</span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">You can also use Agents.md file at the root of the project, and can have them in different modules (or even subdirectories) of your project as well! The more context you have or the more guidance available when you’re working, that will be available for AI to access. If you get stuck creating these </span><a href="http://agent.md" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">Agents.md</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> files you can use AI to help build them, or give you foundations based on the projects you have and then edit them so you don’t have to start from scratch. - Joe Birch, Android Google Developer Expert and Staff Engineer at Buffer. </span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">5. Offload the tedious tasks to Agent and save yourself time</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">You can get Gemini in Android Studio agent to help you make tasks such as writing and reviewing faster. For example it can help writing commit messages, giving you a good summary which you can then review and save yourself time. Additionally, get it to write tests; under your direction the Agent can look at the other tests in your project and write a good test for you to run following best practices just by looking at them. Another good example of a tedious task is writing a new parser for a certain JSON format. Just give Gemini a few examples and it will get you started very quickly. - Diego Perez, Android Software Engineer, Google&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><b style="font-weight: normal;"><span style="font-family: inherit;"><br /></span></b></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">6. Control what you are sharing with AI using simple opt-outs or commands, alongside paid models.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><br /></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">If you want to control what is shared with AI whilst on the no-cost plans, you can opt out some or all your code from model training by adding an AI exclusions file (‘.aiexclude’) to your project. This file uses glob pattern matching similar to a .gitignore file, specifying sensitive directories or files that should be hidden from the AI. You can place .aiexclude files anywhere within the project and its VCS roots to control which files AI features are allowed to access</span><span style="background-color: white; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: white; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span id="docs-internal-guid-a9889daa-7fff-e45f-f57e-9a652bc60457"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: white; color: #202124; font-size: 12pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="border: none; display: inline-block; height: 404px; overflow: hidden; width: 630px;"><img height="404" src="https://blogger.googleusercontent.com/img/a/AVvXsEgBlsTpRVrkJfKz6mLv1P__NBg4EILSOK2he0rfBzEhPkb4GuN2dVR07tjt9-wF6JUFdhc_rCFNf0FFaQ1A9j1qAzLT42tVUODHJydN0u7bn9ThbFlkclGYrH8c1E9QteWJS1UPq_J-5PIDa-4kwjBcblmGbUB2_gBY1myr2Oj7W2G3sNYDXdf9t1pNN1c" style="margin-left: 0px; margin-top: 0px;" width="630" /></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><span id="docs-internal-guid-12bce0e7-7fff-172c-f31e-36f8adba75a7"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: white; color: #202124; font-size: 10.5pt; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">An example of an `.aiexclude` file in Android Studio.</span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Alternatively, in Android Studio settings, you can also opt out of context sharing either on a per project or per user basis (although this method limits the functionality of a number of features because the AI won’t see your code). </span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Remember, paid plans never use your code for model training. This includes both users using an AI Studio API Key, and businesses who are subscribed to Gemini Code Assist. - Trevor Johns, Developer Relations Engineer.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><br /><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Hear more from the Android team and Google Developer Experts about Gemini in Android Studio in our recent </span><a href="https://www.youtube.com/watch?v=9caMeFQYCLk" style="text-decoration-line: none;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">fireside chat</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> and download </span><a href="https://developer.android.com/studio?utm_source=blog&amp;utm_medium=referral&amp;utm_campaign=gias_firesidediscordfeb26_blog" style="text-decoration-line: none;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Android Studio</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> to get started. </span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p></p>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0New York, NY, USA40.7127753 -74.005972810.574476744291751 -109.1622228 70.85107385570825 -38.849722799999995tag:blogger.com,1999:blog-6755709643044947179.post-86483259134590890022026-02-26T13:08:00.000-08:002026-03-03T07:26:54.210-08:00The Second Beta of Android 17<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrvAWzUDf-9b2pw-fuqR8566QCiIbx_or66Dm4VwsKCaNdt1ids-40mTs7l-LtWcs08Q3MeA1jZV6qn45jvfUQmXSNeVnz6lGgrWWJshGzWvvffbW6anqvLxKFFcChiJzlD6jXorHkY5dNVfQAYoodi9u9I_dGkRepRqWP_e0dthZwGhJSIBy5CyeEleo/s1024/[email protected]" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrvAWzUDf-9b2pw-fuqR8566QCiIbx_or66Dm4VwsKCaNdt1ids-40mTs7l-LtWcs08Q3MeA1jZV6qn45jvfUQmXSNeVnz6lGgrWWJshGzWvvffbW6anqvLxKFFcChiJzlD6jXorHkY5dNVfQAYoodi9u9I_dGkRepRqWP_e0dthZwGhJSIBy5CyeEleo/s1024/[email protected]" style="display: none;" /> <name content="IMG" twitter:image=""><p></p><div class="separator" style="clear: both; text-align: justify;"><em style="text-align: left;">Posted by Matthew McCullough, VP Product Management, Android Developer</em></div><p></p></name> <p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrvAWzUDf-9b2pw-fuqR8566QCiIbx_or66Dm4VwsKCaNdt1ids-40mTs7l-LtWcs08Q3MeA1jZV6qn45jvfUQmXSNeVnz6lGgrWWJshGzWvvffbW6anqvLxKFFcChiJzlD6jXorHkY5dNVfQAYoodi9u9I_dGkRepRqWP_e0dthZwGhJSIBy5CyeEleo/s1024/[email protected]" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1024" data-original-width="1024" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrvAWzUDf-9b2pw-fuqR8566QCiIbx_or66Dm4VwsKCaNdt1ids-40mTs7l-LtWcs08Q3MeA1jZV6qn45jvfUQmXSNeVnz6lGgrWWJshGzWvvffbW6anqvLxKFFcChiJzlD6jXorHkY5dNVfQAYoodi9u9I_dGkRepRqWP_e0dthZwGhJSIBy5CyeEleo/s1024/[email protected]" width="200" /></a></div><span style="font-family: inherit;"><div><br /></div><span id="docs-internal-guid-93e65ce5-7fff-b61d-bdb4-8adfcf979cfe"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Today we're releasing the second beta of </span><a href="https://developer.android.com/about/versions/17/" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Android 17</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, continuing our work to build a platform that prioritizes privacy, security, and refined performance. </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">This update delivers a range of new capabilities, including the EyeDropper API and a privacy-preserving Contacts Picker. We're also adding advanced ranging, cross-device handoff APIs, and more.</span></span></span><br /><br /><span id="docs-internal-guid-e2ab632d-7fff-ed23-83e0-49f5db77ed97"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">This release continues the shift in our release cadence, following this annual major SDK release in Q2 with a minor SDK update.</span></span></span><br /></span><div><br /></div><div style="text-align: left;"><span id="docs-internal-guid-d0833dc4-7fff-8ba2-d4cf-58a43136c26a"><h2 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 0pt;"><span id="docs-internal-guid-c8350b22-7fff-243d-36e5-c1cdf6df4402" style="font-weight: normal;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">User Experience &amp; System UI</span></span></span></h2></span></div><div><span id="docs-internal-guid-070e5329-7fff-7fca-5974-444904f3e34e"><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Bubbles</span></span></h3><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Bubbles is a windowing mode feature that offers a new floating UI experience separate from the </span><a href="https://developer.android.com/develop/ui/views/notifications/bubbles" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">messaging bubbles API</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. Users can create an app bubble on their phone, foldable, or tablet by long-pressing an app icon on the launcher. On large screens, there is a bubble bar as part of the taskbar where users can organize, move between, and move bubbles to and from anchored points on the screen.</span></span></span></div><div><span face="Arial, sans-serif" style="font-size: 11pt; white-space-collapse: preserve;"><br /></span></div><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin9Mt9tEW87aYzi91Wey3VAosVbha5Vj4EEPJerhyphenhyphenoRpZTeVnVZKNUocFmrivLoCgMB4uwO_BO0Cj8pgTjkolckbiTkZoxMwvHIR15r2OGrJK-hOiYCtru895k2SaY9QeKxleYuQx1cUryGnW46h9dnB54FLbaAUDiUdffBaAb_-HdH78Z8gP8WahATc0/w618-h640/Bubbles.gif" /></div><br /><div><span id="docs-internal-guid-9bcefda6-7fff-36e7-9faa-458a1a05837b"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">You should follow the </span><a href="https://developer.android.com/develop/ui/compose/layouts/adaptive/support-multi-window-mode" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">guidelines for supporting multi-window mode</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> to ensure your apps work correctly as bubbles.</span></span></p><span style="font-family: inherit;"><br /></span><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Bubbles aren't yet fully enabled in Beta 2. Look for them in a future build of Android 17.</span></span></p><div><br /></div></span></div><div><span id="docs-internal-guid-86702358-7fff-b5d8-06fc-99dedaacf58b"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">EyeDropper API</span></span></span></div><div><br /></div><div><span id="docs-internal-guid-10c7a059-7fff-4572-b16a-a9e3e3e69e86"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">A new system-level EyeDropper API allows your app to request a color from any pixel on the display without requiring sensitive screen capture permissions.</span></span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span><span face="Arial, sans-serif" style="font-size: 11pt;"><br /></span></span></p></span><span><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"></span></p></span><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh93qqDxQ77bC_gAVS6tTHKR38JjKaHxk1dEir5bNCtJ5fBihwVwAXgyIoPJVU4vAs7vR4eeLtB7uMLNUOOWjhz7lk2mYoJPqCsr9yMc04jcai3Rvpxp64M7Og9mZRjqv2IsMosHVNYV_SjUQ1SdxKEX-K04_USaUQb7XRAQF4Q8mSAl0G-Gp9v0yKgUa8/w640-h360/Eyedropper%20Tester.gif" /></div><span><span face="Arial, sans-serif" style="font-size: 11pt;"><br /></span></span><p></p></div><div><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: blue;">val</span> eyeDropperLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result -&gt; <span style="color: blue;">if</span> (result.resultCode == Activity.RESULT_OK) { <span style="color: blue;">val</span> color = result.data?.getIntExtra(Intent.EXTRA_COLOR, Color.BLACK) <span style="color: green;">// Use the picked color in your app</span> } } <span style="color: blue;">fun</span> launchColorPicker() { <span style="color: blue;">val</span> intent = Intent(Intent.ACTION_OPEN_EYE_DROPPER) eyeDropperLauncher.launch(intent) }</pre></div><div><br /></div><div><span id="docs-internal-guid-6d495a2b-7fff-27af-07ed-97dec011214f"><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit; font-size: large; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Contacts Picker</span></h3><span id="docs-internal-guid-7bfb5c44-7fff-047b-21dc-7571b6280982"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">A new system-level contacts picker via </span><a href="https://developer.android.com/reference/kotlin/android/provider/ContactsPickerSessionContract.html#ACTION_PICK_CONTACTS:kotlin.String" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">ACTION_PICK_CONTACTS</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> grants temporary, session-based read access to only the specific data fields requested by the user, reducing the need for the broad </span><a href="https://developer.android.com/reference/android/Manifest.permission#READ_CONTACTS" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">READ_CONTACTS</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> permissions. It also allows for selections from the device’s personal or work profiles.</span></span></p><div><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div></span></span></div><div><br /></div><div><br /></div><div><div><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk_ErNST1mNQUMSBPoM_zvPO1NrnXPdzPLae5RTNFd_SWznb_fBh6vRHS3bBX4ga_RK24nVfuQ-6dFu1CUgA5H-BvBE_zOIjG_VmSaIU0bOtDyQTy672rzVWJpYY8n7NBoGi_bqaaUc2kNe1ydBObVS5WduBy7Yb-e4DGgx7-3fy9TiH7JanTASlxNhuk/w285-h640/android-17-contact-picker.gif" /></div></div><span id="docs-internal-guid-066dd105-7fff-e29b-a7df-69c843751a2c"><div><span style="font-family: inherit; font-size: small; font-weight: normal;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></div></span><span><div><span style="font-family: inherit; font-size: small; font-weight: normal;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></div><div><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: blue;">val</span> contactPicker = rememberLauncherForActivityResult(StartActivityForResult()) { <span style="color: blue;">if</span> (it.resultCode == RESULT_OK) { <span style="color: blue;">val</span> uri = it.data?.data ?: <span style="color: blue;">return</span>@rememberLauncherForActivityResult <span style="color: green;">// Handle result logic</span> processContactPickerResults(uri) } } <span style="color: blue;">val</span> dataFields = arrayListOf(Email.CONTENT_ITEM_TYPE, Phone.CONTENT_ITEM_TYPE) <span style="color: blue;">val</span> intent = Intent(ACTION_PICK_CONTACTS).apply { putStringArrayListExtra(EXTRA_PICK_CONTACTS_REQUESTED_DATA_FIELDS, dataFields) putExtra(EXTRA_ALLOW_MULTIPLE, <span style="color: blue;">true</span>) putExtra(EXTRA_PICK_CONTACTS_SELECTION_LIMIT, 5) } contactPicker.launch(intent)</pre></span></div></span></div><div><br /></div><div><span id="docs-internal-guid-789b084d-7fff-4b53-4f2b-cde8de6034e8"><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Easier pointer capture compatibility with touchpads</span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Previously, touchpads reported events in a very different way from mice when an app had captured the pointer, reporting the locations of fingers on the pad rather than the relative movements that would be reported by a mouse. This made it quite difficult to support touchpads properly in first-person games. Now, by default the system will recognize pointer movement and scrolling gestures when the touchpad is captured, and report them just like mouse events. You can still request the old, detailed finger location data by explicitly requesting capture in the new “absolute” mode. </span></span></p><div><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div></span></div><div><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: green;">// To request the new default relative mode (mouse-like events)</span> <span style="color: green;">// This is the same as requesting with View.POINTER_CAPTURE_MODE_RELATIVE</span> view.requestPointerCapture() <span style="color: green;">// To request the legacy absolute mode (raw touch coordinates)</span> view.requestPointerCapture(View.POINTER_CAPTURE_MODE_ABSOLUTE)</pre></div><div><br /></div><div><br /></div><div><span id="docs-internal-guid-d9d517da-7fff-0ec6-4ebd-76d484dd87a9"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;"><b>Interactive Chooser resting bounds</b></span></span></span></div><div><br /></div><div><span id="docs-internal-guid-8cfa887e-7fff-3271-1b45-c02a7f3d8cb3"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">By calling</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/reference/kotlin/android/service/chooser/ChooserSession#getinitialrestingbounds" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">getInitialRestingBounds</span></a><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">on Android's </span></span><a href="https://developer.android.com/reference/android/service/chooser/ChooserSession" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">ChooserSession</span></a><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, </span><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">your app can identify the target position the Chooser occupies after animations and data loading are complete, enabling better UI adjustments.</span></span></div><div><br /></div><div><span id="docs-internal-guid-f6b8da79-7fff-fbb6-a1e8-a9f336cf1322"><h2 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">Connectivity &amp; Cross-Device</span></span></h2><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Cross-device app handoff</span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">A new </span><a href="https://developer.android.com/reference/kotlin/android/app/Activity#sethandoffenabled" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Handoff API</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> allows you to specify application state to be resumed on another device, such as an Android tablet. When opted in, the system synchronizes state via </span></span><a href="https://developer.android.com/reference/android/companion/CompanionDeviceManager" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">CompanionDeviceManager</span></a><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">and displays a handoff suggestion in the launcher of the user's nearby devices. This feature is designed to offer seamless task continuity, enabling users to pick up exactly where they left off in their workflow across their Android ecosystem. Critically, Handoff supports both native app-to-app transitions and app-to-web fallback, providing maximum flexibility and ensuring a complete experience even if the native app is not installed on the receiving device.</span></span></p><br /><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Advanced ranging APIs</span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">We are adding support for 2 new ranging technologies -&nbsp;</span></span></p><ol style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">UWB DL-TDOA</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> which enables apps to use UWB for indoor navigation. This API surface is FIRA (Fine Ranging Consortium) 4.0 DL-TDOA spec compliant and enables privacy preserving indoor navigation&nbsp; (avoiding tracking of the device by the anchor).</span></span></p></li><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Proximity Detection</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> which enables apps to use the new ranging specification being adopted by WFA (WiFi Alliance). This technology provides improved reliability and accuracy compared to existing Wifi Aware based ranging specification.</span></span></p></li></ol><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Data plan enhancements</span></span></h3><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">To optimize media quality, your app can now retrieve carrier-allocated maximum data rates for streaming applications using </span></span><a href="https://developer.android.com/reference/kotlin/android/telephony/SubscriptionInfo#getstreamingappmaxdownlinkkbps" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">getStreamingAppMaxDownlinkKbps</span></a><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">and </span></span></span><a href="https://developer.android.com/reference/kotlin/android/telephony/SubscriptionInfo#getstreamingappmaxuplinkkbps" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">getStreamingAppMaxUplinkKbps</span></a><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span></div><div><br /></div><div><span id="docs-internal-guid-bf27b230-7fff-f0c1-ed8b-8da57155dded"><h2 dir="ltr" style="line-height: 1.2; margin-bottom: 11.25pt; margin-top: 11.25pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">Core Functionality, Privacy &amp; Performance</span></span></h2><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Local Network Access</span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Android 17 introduces the </span><a href="https://developer.android.com/reference/kotlin/android/Manifest.permission#access_local_network" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">ACCESS_LOCAL_NETWORK</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> runtime permission to protect users from unauthorized local network access. Because this falls under the existing </span><a href="https://developer.android.com/reference/android/Manifest.permission_group#NEARBY_DEVICES" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">NEARBY_DEVICES</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> permission group, users who have already granted other </span><a href="https://developer.android.com/reference/android/Manifest.permission_group#NEARBY_DEVICES" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">NEARBY_DEVICES</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> permissions will not be prompted again. By declaring and requesting this permission, your app can discover and connect to devices on the local area network (LAN), such as smart home devices or casting receivers. This prevents malicious apps from exploiting unrestricted local network access for covert user tracking and fingerprinting. Apps targeting Android 17 or higher will now have two paths to maintain communication with LAN devices: adopt system-mediated, privacy-preserving device pickers to skip the permission prompt, or explicitly request this new permission at runtime to maintain local network communication.</span></span></p><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Time zone offset change broadcast</span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Android now provides a reliable broadcast intent, </span><a href="https://developer.android.com/reference/kotlin/android/content/Intent#action_timezone_offset_changed" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">ACTION_TIMEZONE_OFFSET_CHANGED</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, triggered when the system's time zone offset changes, such as during Daylight Saving Time transitions. This complements the existing broadcast intents </span><a href="https://developer.android.com/reference/android/content/Intent#ACTION_TIME_CHANGED" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">ACTION_TIME_CHANGED</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> and </span><a href="https://developer.android.com/reference/android/content/Intent#ACTION_TIMEZONE_CHANGED" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">ACTION_TIMEZONE_CHANGED</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, which are triggered when the Unix timestamp changes and when the time zone ID changes, respectively.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></p><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">NPU Management and Prioritization</span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-b8525976-7fff-f911-0771-f48c9fc5aa30"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Apps targeting Android 17 that need to directly access the NPU must declare </span><a href="https://developer.android.com/reference/kotlin/android/content/pm/PackageManager#feature_neural_processing_unit" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">FEATURE_NEURAL_PROCESSING_UNIT</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> in their manifest to avoid being blocked from accessing the NPU. This includes apps that use the </span><a href="https://ai.google.dev/edge/litert/next/npu" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">LiteRT NPU delegate</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">, vendor-specific SDKs, as well as the deprecated </span><a href="https://developer.android.com/ndk/guides/neuralnetworks" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">NNAPI</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">.</span></span></span></span></p><div><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div></span></div><div><span style="white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;"><b>ICU 78 and Unicode 17 support</b></span></span></div><div><span style="font-family: inherit;"><br /></span></div><div><span id="docs-internal-guid-d227fbc1-7fff-f66b-06b5-bcaf59fbfbde"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span id="docs-internal-guid-55b2d01c-7fff-74f0-7da9-75bb27e935f8"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Core internationalization libraries have been updated to </span><a href="https://blog.unicode.org/2025/10/icu-78-released.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">ICU 78</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, expanding support for new scripts, characters, and emoji blocks, and enabling direct formatting of </span><a href="https://developer.android.com/reference/java/time/package-summary" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">time</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> objects.</span></span></span></p><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">SMS OTP protection</span></span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Android is expanding its SMS OTP protection by automatically delaying access to SMS </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">messages with OTP. Previously, the protection was primarily focused on the SMS Retriever format wherein the delivery of messages containing an SMS retriever hash is delayed for most apps for three hours. However, for certain apps like the default SMS app, etc and the app that corresponds to the hash are exempt from this delay. This update extends the protection to all SMS messages with OTP. For most apps, SMS messages containing an OTP will only be accessible after a delay of three hours to help prevent OTP hijacking. The </span></span><a href="https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_RECEIVED_ACTION" style="font-family: Arial, sans-serif; font-size: 11pt; text-decoration-line: none; white-space-collapse: preserve;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">SMS_RECEIVED_ACTION</span></a><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> broadcast will be withheld and </span><a href="https://developer.android.com/reference/android/provider/Telephony.Sms.html" style="text-decoration-line: none; white-space-collapse: preserve;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">sms provider</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> database queries will be filtered. The SMS message will be available to these apps after the delay. </span></span></p></span><span id="docs-internal-guid-811de5c5-7fff-0cb3-0409-442ddaca9f60"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;"><b>Delayed access to WebOTP format SMS messages</b></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">If the app has the permission to read SMS messages but is not the intended recipient of the OTP (as determined by domain verification), the WebOTP format SMS message will only be accessible after three hours have elapsed. This change is designed to improve user security by ensuring that only apps associated with the domain mentioned in the message can programmatically read the verification code. This change applies to all apps regardless of their target API level.</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;"><b>Delayed access to standard SMS messages with OTP</b></span></span></p><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">For SMS messages containing an OTP that do not use the WebOTP or SMS Retriever formats, the OTP SMS will only be accessible after three hours for most apps. This change only applies to apps that target Android 17 (API level 37) or higher.</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Certain apps such as the default SMS, assistant app, along with connected device companion apps, etc will be exempt from this delay.</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">All apps that rely on reading SMS messages for OTP extraction should transition to using </span><a href="https://developer.android.com/identity/sms-retriever" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">SMS Retriever</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> or </span><a href="https://developers.google.com/identity/sms-retriever/user-consent/overview" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">SMS User Consent</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> APIs to ensure continued functionality.</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></div><div><br /></div><div><span id="docs-internal-guid-cfd276e1-7fff-bfd1-16c3-a647734b3ff0"><h2 dir="ltr" style="line-height: 1.2; margin-bottom: 11.25pt; margin-top: 11.25pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">The Android 17 schedule</span></span></h2></span><span><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">We're going to be moving quickly from this Beta to our Platform Stability milestone, targeted for March. At this milestone, we'll deliver final SDK/NDK APIs. From that time forward, your app can target SDK 37 and publish to Google Play to help you complete your testing and collect user feedback in the several months before the general availability of Android 17.</span></span></p><div><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div></span><div><div class="separator" style="clear: both;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipmOQkqAhGJhJ23cIrQvdMk3HyBlvS9YagV8gHlnAeMVbKUDzuLnR1CpL0gaLUVXJOPlF4hz6Z2c4-_-2EiUSITXg8KNgJjRBYE3GFjLhxMg0LDHYitsfZKuB_-lLEQQI3CEv8mfXlu6aSMOra00kVJdFBtogb3f57XD-q73VSdl6g5l7M82_M5bfeveg/w640-h360/Android%20Release%20Timeline.png" /></div></div></div><div><span id="docs-internal-guid-e7bdc12c-7fff-645f-0d74-58b13ae7dc2c"><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">A year of releases</span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">We plan for Android 17 to continue to get updates in a series of quarterly releases. The upcoming release in Q2 is the only one where we introduce planned app breaking behavior changes. We plan to have a minor SDK release in Q4 with additional APIs and features.</span></span></p><div><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div><div><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div><div><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div></span></div><div><div class="separator" style="clear: both; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0syxWKc8-BAn5IuMcRSbVF2hy_NPcIiBi_XqdS7U5wac7076AT1lZ0FasmnIBSUdqpeIdBnc-r7QvsWTljq5-Gn11LXuAFB7038beGtCf8zhhGk9F1u1OuXNicJ_RgHgd8jeNM1d04lcCRsSGSrBEKW3K_-8kUldiwh5KZ8sP4Ob8vDH4MDApry8aB0Y/w640-h360/Android%20Release%20Timeline%20(1)%20(1).png" /></div><span><span face="Arial, sans-serif"><br /></span></span></div><div><span id="docs-internal-guid-88c068ac-7fff-d7f7-666a-14a33c2fe749"><h2 dir="ltr" style="line-height: 1.2; margin-bottom: 11.25pt; margin-top: 11.25pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">Get started with Android 17</span></span></h2><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">You can </span><a href="https://www.google.com/android/beta" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">enroll any supported Pixel device</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> to get this and future Android Beta updates over-the-air. If you don’t have a Pixel device, you can </span><a href="https://developer.android.com/about/versions/17/get#on_emulator" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">use the 64-bit system images with the Android Emulator</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> in Android Studio.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">If you are currently in the Android Beta program, you will be offered an over-the-air update to Beta 2.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">If you have Android 26Q1 Beta and would like to take the final stable release of 26Q1 and exit Beta, you need to ignore the over-the-air update to 26Q2 Beta 2 and wait for the release of 26Q1.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">We're looking for your feedback so please </span><a href="https://developer.android.com/about/versions/17/feedback" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">report issues and submit feature requests</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> on the </span><a href="https://developer.android.com/about/versions/16/feedback" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">feedback page</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. The earlier we get your feedback, the more we can include in our work on the final release.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">For the best development experience with Android 17, we recommend that you use the latest preview of </span><a href="https://developer.android.com/studio/preview" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Android Studio (Panda)</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. Once you’re set up, here are some of the things you should do:</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="2" dir="ltr" style="color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; margin-left: 36pt; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">Compile against the new SDK, test in CI environments, and report any issues in our tracker on the </span><a href="https://developer.android.com/about/versions/17/feedback" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">feedback page</span></a><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">.</span></span></p></li><li aria-level="2" dir="ltr" style="color: #202124; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; margin-left: 36pt; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit;">Test your current app for compatibility, learn whether your app is affected by changes in Android 17, and install your app onto a device or emulator running Android 17 and extensively test it.</span></span></p></li></ul><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">We’ll update the </span><a href="https://developer.android.com/about/versions/17/download" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">preview/beta system images</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> and SDK regularly throughout the Android 17 release cycle. Once you’ve installed a beta build, you’ll automatically get future updates </span></span></span></div><div><span id="docs-internal-guid-c1e50571-7fff-2ee5-41f9-5c447a81921b"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">over-the-air for all later previews and Betas.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">For complete information, visit the </span><a href="https://developer.android.com/about/versions/17" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Android 17 developer site</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span></span></p><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Join the conversation</span></span></h3><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">As we move toward </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Platform Stability</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> and the general availability of Android 17 later this year, your feedback remains our most valuable asset. Whether you’re an </span><a href="https://www.reddit.com/r/android_canary/" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">early adopter on &nbsp; the Canary channel</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> or an </span><a href="https://www.reddit.com/r/android_beta/" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">app developer testing on Beta 2</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, consider joining our communities and filing feedback. We’re listening.</span></span></span></div>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-32463540335245209172026-02-25T15:47:00.000-08:002026-02-25T16:57:36.469-08:00The Intelligent OS: Making AI agents more helpful for Android apps<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixSVtnmulmhNezGsW7vJdND7Wt0Vv63nqy-tcnPdjGAB4Vi2Yqszhjkb2iJIXNlDyTvnNeJKnaQm7f4Mz-e0d8SKnqPBNbHhs9acgxY3pZW6r-Vv9Qu091s1N834o2-s_ScOCPGV5sq2lGqSpTSxMiI98U9Nt7CBPPY0rnt1MVTFbvuaoEgQbchTf_cdQ/s2048/Blog-AI-Metadata.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixSVtnmulmhNezGsW7vJdND7Wt0Vv63nqy-tcnPdjGAB4Vi2Yqszhjkb2iJIXNlDyTvnNeJKnaQm7f4Mz-e0d8SKnqPBNbHhs9acgxY3pZW6r-Vv9Qu091s1N834o2-s_ScOCPGV5sq2lGqSpTSxMiI98U9Nt7CBPPY0rnt1MVTFbvuaoEgQbchTf_cdQ/s2048/Blog-AI-Metadata.png" style="display: none;" /> <name content="IMG" twitter:image=""><p></p><p><em>Posted by Matthew McCullough, VP of Product Management, Android Development</em></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpvGJCJ-T3miW9YcZPSiNtUXx8zGRhgmWGlneoAGalO2fyOD7VOVIw_FOuTxxLn9A_IK_GA4t8UoBkN4ZtDvnDJKWsJwl0S7QoA1cmGMtx03a23hFJTAy8a87SK2JzReyS7CQxcvTpEU7J_EbAOE0PKqkZeKysyhHdzG-VpthjTo_EmoUTJ-EQbmA5fDY/s1600/Blog-hero-ai.png" style="clear: left; float: left; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; margin-bottom: 1em; margin-right: 1em; vertical-align: baseline;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpvGJCJ-T3miW9YcZPSiNtUXx8zGRhgmWGlneoAGalO2fyOD7VOVIw_FOuTxxLn9A_IK_GA4t8UoBkN4ZtDvnDJKWsJwl0S7QoA1cmGMtx03a23hFJTAy8a87SK2JzReyS7CQxcvTpEU7J_EbAOE0PKqkZeKysyhHdzG-VpthjTo_EmoUTJ-EQbmA5fDY/s16000/Blog-hero-ai.png" /></a></div><span style="background-color: transparent; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">User expectations for AI on their devices are fundamentally shifting how they interact with their apps. Instead of opening apps to do tasks step-by-step, they're asking AI to do the heavy lifting for them. In this new interaction model, success is shifting from getting users to open your app, to successfully fulfilling their tasks and helping them get more done faster.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span id="docs-internal-guid-5dd55aad-7fff-9033-f95d-4764c34952df"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">To help you evolve your apps for this agentic future, we're introducing early stage developer capabilities that bridge the gap between your apps and agentic apps and personalized assistants, such as Google Gemini. While we are in the early, beta stages of this journey, we’re designing these features with privacy and security at their core as our first step in exploring this paradigm shift as an app ecosystem.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;">Empowering apps with AppFunctions</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-da376495-7fff-400a-f301-7ac58d86a0c4"></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Android </span><a href="https://developer.android.com/ai/appfunctions" style="text-decoration: none;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">AppFunctions</span></a><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> allows apps to expose data and functionality directly to AI agents and assistants. With the</span><a href="https://developer.android.com/jetpack/androidx/releases/appfunctions" style="text-decoration: none;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"> </span></a><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">AppFunctions </span><a href="https://developer.android.com/jetpack/androidx/releases/appfunctions" style="text-decoration: none;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Jetpack library</span></a><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and </span><a href="https://developer.android.com/reference/android/app/appfunctions/package-summary" style="text-decoration: none;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">platform APIs</span></a><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, developers can create self-describing functions that agentic apps can discover and execute via natural language. Mirroring how backend capabilities are declared via MCP cloud servers, AppFunctions provides an on-device solution for Android apps. Much like </span><a href="https://developer.chrome.com/blog/webmcp-epp" style="text-decoration: none;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">WebMCP</span></a><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, it executes these functions locally on the device rather than on a server.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-04878bc8-7fff-aee5-0afe-f7ec942cfabc"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">The </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Samsung Gallery integration with Gemini on the Galaxy S26 series</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> showcases AppFunctions in action. Instead of manually scrolling through photo albums, you can now simply ask Gemini to "Show me pictures of my cat from Samsung Gallery." Gemini takes the user query, intelligently identifies and triggers the right function, and presents the returned photos from Samsung Gallery directly in the Gemini app, so users never need to leave. This experience is multimodal and can be done via voice or text. Users can even use the returned photos in follow-up conversations, like sending them to friends in a text message.</span></span></span></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRI_lLgs0K_k6mEGFjGzAFiIir9YrJlxIWw0j8zrNQCO3tXuO9aARxXeomm09Fq1hvG2J7tA9qy6A08zr5LRaOOUu7FTiWNG85L99Ks-9stubQGs06VURAfQ9rqRdVhWiXlPgiHNQaRwl7ZCU0cnLSy1Ihokm_mhV1rr7eeIuqAFGCG2xcrUyTsAh9FpI/s1080/Untitled%20design.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1080" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRI_lLgs0K_k6mEGFjGzAFiIir9YrJlxIWw0j8zrNQCO3tXuO9aARxXeomm09Fq1hvG2J7tA9qy6A08zr5LRaOOUu7FTiWNG85L99Ks-9stubQGs06VURAfQ9rqRdVhWiXlPgiHNQaRwl7ZCU0cnLSy1Ihokm_mhV1rr7eeIuqAFGCG2xcrUyTsAh9FpI/w640-h640/Untitled%20design.gif" width="640" /></a></div><br /></div><span style="font-family: inherit;"><br /></span><div class="separator" style="clear: both; text-align: left;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">This integration is currently available on the Galaxy S26 series and will soon expand to Samsung devices running OneUI 8.5 and higher. Through AppFunctions, Gemini can already automate tasks across app categories like </span><a href="https://support.google.com/gemini/answer/15305236?hl=en&amp;ref_topic=16695931&amp;sjid=2355454043249888712-NC&amp;co=GENIE.Platform%3DAndroid&amp;oco=1" style="text-decoration-line: none;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Calendar</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, </span><a href="https://support.google.com/gemini/answer/15230597?hl=en&amp;ref_topic=16695931&amp;sjid=2355454043249888712-NC&amp;co=GENIE.Platform%3DAndroid&amp;oco=1" style="text-decoration-line: none;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Notes</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, and </span><a href="https://support.google.com/gemini/answer/15230285?hl=en&amp;ref_topic=16695931&amp;sjid=2355454043249888712-NC&amp;co=GENIE.Platform%3DAndroid&amp;oco=1" style="text-decoration-line: none;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Tasks</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, on devices from multiple manufacturers. Whether it’s coordinating calendar events, organizing notes, or setting to-do reminders, users can streamline daily activities in one place.</span></span></div><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;">Enabling agentic apps with intelligent UI automation</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span><span style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-b288712f-7fff-c59b-e10f-f6a50ef0a7f6"></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">While AppFunctions provides a structured framework and more control for apps to communicate with AI agents and assistants, we know that not every interaction has a dedicated integration yet. We’re also developing a UI automation framework for AI agents and assistants to intelligently execute generic tasks on users’ installed apps, with user transparency and control built in. This is the platform doing the heavy lifting, so developers can get agentic reach with zero code. It’s a low-effort way to extend their reach without a major engineering lift right now.&nbsp;</span></span><br /></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span><span id="docs-internal-guid-8ba5e7c3-7fff-2bb1-bace-114dc3261db2" style="font-family: inherit;"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">To get feedback as we refine this framework, we’re starting with an early preview on the Galaxy S26 series and select Pixel 10 devices, where users will be able to delegate multi-step tasks to Gemini with just a long press of the power button. Launching as a beta feature in the Gemini app, this will support a curated selection of apps in the food delivery, grocery, and rideshare categories in the US and Korea to start. Whether users need to place a complex pizza order for their family members with particular tastes, coordinate a multi-stop rideshare with co-workers, or reorder their last grocery purchase, Gemini can help complete tasks using the context already available from your apps, without any developer work needed.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="white-space-collapse: preserve;"><br /></span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"></span></span></p><div class="separator" style="clear: both; text-align: center;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5FThgtZ7HsIS8uh3ydsEJ-J7U0fLTV0KwBBgP8aVSeHUOjt-xjxK1V1Tkx3jIkJyA_0rnrECx3XO1cZQ1hN1EWokG0q-9CfH5UFMI41Q9U5XikNXN5c6RljdXPUxDtcDokXPKv3o7ODl75229vVCXjXyryOqgS7iTNf2l65K6-S-jmFeANgVdXcwsdEs/s1080/Family-chat-demo.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1080" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5FThgtZ7HsIS8uh3ydsEJ-J7U0fLTV0KwBBgP8aVSeHUOjt-xjxK1V1Tkx3jIkJyA_0rnrECx3XO1cZQ1hN1EWokG0q-9CfH5UFMI41Q9U5XikNXN5c6RljdXPUxDtcDokXPKv3o7ODl75229vVCXjXyryOqgS7iTNf2l65K6-S-jmFeANgVdXcwsdEs/w640-h640/Family-chat-demo.gif" width="640" /></a></span></span></div><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="white-space-collapse: preserve;"><span style="font-family: inherit;"></span></span></p><div><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><span style="white-space-collapse: preserve;"><span style="font-family: inherit;"><span style="font-family: inherit;">Users are in control while a task is being actioned in the background through UI automation. For any automation action, users have the option to monitor a task’s progress via notifications or "live view" and can switch to manual control at any point to take over the experience. Gemini is also designed to alert users before completing sensitive tasks, such as making a purchase. </span></span></span><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-da83a2d7-7fff-c885-49e4-2f7d3c7da10a"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">Looking ahead</span></span></span></p><div class="separator" style="clear: both; text-align: center;"><br /></div><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">In Android 17, we’re looking to broaden these capabilities to reach even more users, developers, and device manufacturers.</span></span><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span id="docs-internal-guid-8efe998f-7fff-081e-10f3-6787a3a937f9"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">We are currently building experiences with a small set of app developers, focusing on high-quality user experiences as the ecosystem evolves. We plan to share more details later this year on how you can use AppFunctions and UI automation to enable agentic integrations for your app. Stay tuned for updates.</span></span></p><p></p></name><br />Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-25219841921690110482026-02-17T12:00:00.000-08:002026-02-17T12:00:14.778-08:00Get ready for Google I/O May 19-20<name content="IMG" twitter:image=""><p><em>Posted by The Google I/O Team</em></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb08Z4i1kFFPcYFZeHMXobDKYD8_w0nlGUuY2RxQVxsve210NR_M2wlqK0jsFtxeLKQKYGlofDRk1LbDTTMril3WcyDHHx8w1P9C-GlTywIvKC8Q4G1hX7hOlUFgNCMyYRDBLTT-kGmgp0z2QbrTzNkuosMzIhqdyYnJL2yLFY4uWHa3EnUcpRgP4oQlY/s1600/O-SVD-DAC-Banner-1600x476-4x1%20(1).png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="476" data-original-width="1600" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb08Z4i1kFFPcYFZeHMXobDKYD8_w0nlGUuY2RxQVxsve210NR_M2wlqK0jsFtxeLKQKYGlofDRk1LbDTTMril3WcyDHHx8w1P9C-GlTywIvKC8Q4G1hX7hOlUFgNCMyYRDBLTT-kGmgp0z2QbrTzNkuosMzIhqdyYnJL2yLFY4uWHa3EnUcpRgP4oQlY/s16000/O-SVD-DAC-Banner-1600x476-4x1%20(1).png" /></a></div><span style="font-family: inherit; font-size: x-large; font-weight: 700; white-space-collapse: preserve;"><div><name content="IMG" twitter:image=""><span style="font-family: inherit; font-size: x-large; font-weight: 700; white-space-collapse: preserve;"><br /></span></name></div><span style="font-family: inherit;">Google I/O returns May 19–20</span></span><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Google I/O is back! Join us online as we share our latest AI breakthroughs and updates in products across the company, from Gemini to Android, Chrome, Cloud, and more.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Tune in to learn about agentic coding and the latest Gemini model updates. The event will feature keynote addresses from Google leaders, forward-looking panel discussions, and product demos designed to showcase the next frontier of technology.</span></span></p><p><span style="font-weight: 700; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">Register now and tune in live</span></span></p><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Visit </span><a href="https://io.google/2026/register/?utm_source=blogpost&amp;utm_medium=pr&amp;utm_campaign=svd&amp;utm_content=" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">io.google</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and register to receive updates about Google I/O. Kicking off May 19 at 10am PT, this year we’ll be livestreaming keynotes, demos, and more sessions across two days. We’ll also be bringing back the popular Dialogues sessions featuring big thinkers and bold leaders discussing how AI is shaping our future.</span></span></p><div><span face="'Google Sans',sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div><p></p></name>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-24290877574864399612026-02-17T08:00:00.000-08:002026-02-18T07:48:22.848-08:00Under the hood: Android 17’s lock-free MessageQueue<meta content="https://your-image-url.jpg" property="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9HS-x-dS4oIQSAyvQoXlWlwO1W37v5h5a__vVR-FebAvk6RbMsaUoYrVGb5StXntTWUxnpdOoKiSJoDaiJLywZ2Nzs9cA9sUFYePmZRapVre5ZpS1dG433g-gEIFsj83u6hvly1OMWc7oNGMSv-Kh7XdxsrfnsVn7YcggG4cRjRNlPUcjkLvuU9sNBCY/s2469/Android%2017's%20Lock-Free%20Message%20Queue%20_Meta.png"></meta><i> Posted by Shai Barack, Android Platform Performance Lead and Charles Munger, Principal Software Engineer</i><p><span id="docs-internal-guid-4d74092e-7fff-8903-bcc8-0a5e5a3ec2fa"></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"></p><div class="separator" style="clear: both;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbF0aLhQt_qbYhTnODAOPjkVe_oX0gD1YcEGWy8oxv2dE705ei3plig3iKmoOZf6sd8c4x5VmrMNIOyIEy-dmFlaepcN-rz3B6_SSBqa_7VyEJ5FHR2eYcm-QDuYLOormMWbifm2x_X9_4-loSbaW1EQ4H8PKwDLBiIdvcfNNtNp1JeHacykoeTsS0TUk/s16000/Android%2017's%20Lock-Free%20Message%20Queue%20_Blog.png" /></div><span style="font-family: inherit;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><br /></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">In Android 17, apps targeting SDK 37 or higher will receive a new implementation of MessageQueue where the implementation is lock-free. The new implementation improves performance and reduces missed frames, but may break clients that reflect on MessageQueue private fields and methods. To learn more about the behavior change and how you can mitigate impact, </span><a href="http://developer.android.com/about/versions/17/changes/messagequeue" style="font-family: inherit; text-decoration-line: none;" target="_blank"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">check out the MessageQueue behavior change documentation</span></a><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">. This technical blog post provides an overview of the MessageQueue rearchitecture and how you can analyze lock contention issues using Perfetto.</span></p></span></span><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span id="docs-internal-guid-cb816bbb-7fff-c2c6-b98c-600b61b50e52"><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">The </span><a href="https://developer.android.com/reference/android/os/Looper" style="text-decoration-line: none;" target="_blank"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Looper</span></a><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> drives the UI thread of every Android application. It pulls work from a </span><a href="https://developer.android.com/reference/android/os/MessageQueue" style="text-decoration-line: none;" target="_blank"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">MessageQueue</span></a><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, dispatches it to a </span><a href="https://developer.android.com/reference/android/os/Handler" style="text-decoration-line: none;" target="_blank"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Handler</span></a><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, and repeats. For two decades, </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">MessageQueue</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"> used a single monitor lock (i.e. a </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">synchronized</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">code block) to protect its state.</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Android 17 introduces a significant update to this component: a lock-free implementation named </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">DeliQueue</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span id="docs-internal-guid-b30d8de1-7fff-4a32-cf5d-80cf540e6227"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">This post explains how locks affect UI performance, how to analyze these issues with Perfetto, and the specific algorithms and optimizations used to improve the Android main thread.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span id="docs-internal-guid-d608e40a-7fff-aa7d-5000-bff3d09fe2fe"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">The problem: Lock Contention and Priority Inversion</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">The legacy </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">MessageQueue</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">functioned as a priority queue protected by a single lock. If a background thread posts a message while the main thread performs queue maintenance, the background thread blocks the main thread.</span></span></p><span id="docs-internal-guid-fb0fbba7-7fff-7e05-79e8-768946a417ef"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">When two or more threads are competing for exclusive use of the same lock, this is called </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Lock contention</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. This contention can cause&nbsp;</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Priority Inversion</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, leading to UI jank and other performance problems.</span></span></p></span><span><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Priority inversion can happen when a high-priority thread (like the UI thread) is made to wait for a low-priority thread. Consider this sequence:</span></span></p><ol style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: decimal; margin-left: -12pt; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">A </span><span style="color: #1f1f1f; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">low priority</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> background thread acquires the</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">MessageQueue</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit;">lock to post the result of work that it did.</span></span></p></li><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: decimal; margin-left: -12pt; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">A </span><span style="color: #1f1f1f; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">medium priority</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> thread becomes runnable and the Kernel's scheduler allocates it CPU time, preempting the low priority thread.</span></span></p></li><li aria-level="1" dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: decimal; margin-left: -12pt; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">The </span><span style="color: #1f1f1f; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">high priority</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> UI thread finishes its current task and attempts to read from the queue, but is blocked because the low priority thread holds the lock.</span></span></p></li></ol><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">The low-priority thread blocks the UI thread, and the medium-priority work delays it further.</span></span></p><div class="separator" style="clear: both; text-align: center;"><span id="docs-internal-guid-ff649ce9-7fff-0f0a-57eb-a7a10ef70f5b"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="border: none; display: inline-block; height: 213px; overflow: hidden; width: 610px;"><img alt="A visual representation of priority inversion. It shows 'Task L' (Low) holding a lock, blocking 'Task H' (High). 'Task M' (Medium) then preempts 'Task L', effectively delaying 'Task H' for the duration of 'Task M's' execution." src="https://blogger.googleusercontent.com/img/a/AVvXsEi5lpXcJrA3CKIi_DnPnYtJ8bfc3vCrdPHToFuPs6CBRpRCjILPIoTP8Z7m_tpfjLWByWLM1I0UlgacedkHg6iAhlj4Ls7v-EmmRAGvcj9WDB_j095S0SECKZkuU89Bb70vDw-B3CiOWkSuu1KAH6-Z-RLN7zjVJgtqitER1Gl6pMgGEnrWtLp9ebS36JY=s16000" style="margin-left: 0px; margin-top: 0px;" /></span></span></span></div><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-e1a4c6c0-7fff-16d2-5e17-ffef6fc3dd8c"><span face="Arial, sans-serif" style="color: black; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;"><span id="docs-internal-guid-187ea446-7fff-79b9-edff-f48938fe69c4"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">Analyzing contention with Perfetto</span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">You can diagnose these issues using </span><a href="https://perfetto.dev/" style="text-decoration: none;" target="_blank"><span style="background-color: transparent; color: #0b57d0; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Perfetto</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. In a standard trace, a thread blocked on a monitor lock enters the sleeping state, and Perfetto shows a slice indicating the lock owner.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-cf70a937-7fff-d85c-1d12-1030a3ef6c4c"></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">When you query trace data, look for slices named “monitor contention with …” followed by the name of the thread that owns the lock and the code site where the lock was acquired.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;"><span id="docs-internal-guid-800d4400-7fff-1521-47b3-09d8c8a6b964"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">Case study: Launcher jank</span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-2473b6a3-7fff-411f-4eaa-574bb03b77aa"></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">To illustrate, let’s analyze a trace where a user experienced jank while navigating home on a Pixel phone immediately after taking a photo in the camera app. Below we see a screenshot of Perfetto showing the events leading up to the missed frame:</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></p></span><div class="separator" style="clear: both;"><span style="text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial;"><br /><img alt="A Perfetto trace screenshot diagnosing the Launcher jank. The 'Actual Timeline' shows a red missed frame. Coinciding with this, the main thread track contains a large green slice labeled 'monitor contention with owner BackgroundExecutor,' indicating that the UI thread was blocked because a background thread held the MessageQueue lock." border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivHqJIUgTNsk5JKoL8qpiO3vjFfZp-78mTBYD6zWLWbIpQih5o2P-1YdJU57ZEQ2zT959seF1rPzzAmdOFUcMhZqUr67u3YFk5UlqR7UdgVMYpnGU-oFcpEhMtOzaD-8KxTGtaQyL1FpkUqsluy4-cz40e4yzqmiUvG06qmXYd66QnODo-IZJ0tdfps0Q/s16000/cTMPgSaPAotGcAJ.png" /></span><span><span style="color: #1f1f1f;"></span></span></div><span><p></p><div class="separator" style="clear: both; text-align: center;"><br /></div><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: -12.75pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Symptom:</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> The Launcher main thread missed its frame deadline. It blocked for 18ms, which exceeds the 16ms deadline required for 60Hz rendering.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: -12.75pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Diagnosis:</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> Perfetto showed the main thread blocked on the</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">MessageQueue</span><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">lock. A “BackgroundExecutor” thread owned the lock.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: -12.75pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Root Cause:</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> The BackgroundExecutor runs at </span><a href="https://developer.android.com/reference/android/os/Process#THREAD_PRIORITY_BACKGROUND" style="text-decoration: none;" target="_blank"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Process.THREAD_PRIORITY_BACKGROUND</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> (very low priority). It performed a non-urgent task (checking </span><a href="https://www.android.com/digital-wellbeing/" style="text-decoration: none;" target="_blank"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">app usage limits</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">). Simultaneously, medium priority threads were using CPU time to process data from the camera. The OS scheduler preempted the BackgroundExecutor thread to run the camera threads.</span></span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-f545b923-7fff-37c6-c64a-6d96c5d01b8b"></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">This sequence caused the Launcher’s UI thread (high priority) to become indirectly blocked by the camera worker thread (medium priority), which was keeping the Launcher’s background thread (low priority) from releasing the lock.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span id="docs-internal-guid-88ee6413-7fff-8ea9-af00-483f1856b732"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Querying traces with PerfettoSQL</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">You can use </span><a href="https://perfetto.dev/docs/analysis/perfetto-sql-getting-started" style="text-decoration: none;" target="_blank"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">PerfettoSQL</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to </span><a href="https://perfetto.dev/docs/analysis/batch-trace-processor" style="text-decoration: none;" target="_blank"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">query trace data</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> for specific patterns. This is useful if you have a large bank of traces from user devices or tests, and you’re searching for specific traces that demonstrate a problem.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span id="docs-internal-guid-009e7aa8-7fff-d370-99b0-84fdc6676791"><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">For example, this query finds </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 14.6667px; white-space-collapse: preserve;">MessageQueue</span><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> contention coincident with dropped frames (jank):</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"></span></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;">INCLUDE PERFETTO MODULE android.monitor_contention; INCLUDE PERFETTO MODULE android.frames.jank_type; <span style="color: blue;">SELECT</span> process_name, <span style="color: green;">-- Convert duration from nanoseconds to milliseconds</span> <span style="color: blue;">SUM</span>(dur) / 1000000 <span style="color: blue;">AS</span> sum_dur_ms, <span style="color: blue;">COUNT</span>(*) <span style="color: blue;">AS</span> count_contention <span style="color: blue;">FROM</span> android_monitor_contention <span style="color: blue;">WHERE</span> is_blocked_thread_main <span style="color: blue;">AND</span> short_blocked_method <span style="color: blue;">LIKE</span> <span style="color: #a31515;">"%MessageQueue%"</span> <span style="color: green;">-- Only look at app processes that had jank</span> <span style="color: blue;">AND</span> upid <span style="color: blue;">IN</span> ( <span style="color: blue;">SELECT</span> <span style="color: blue;">DISTINCT</span>(upid) <span style="color: blue;">FROM</span> actual_frame_timeline_slice <span style="color: blue;">WHERE</span> android_is_app_jank_type(jank_type) = <span style="color: blue;">TRUE</span> ) <span style="color: blue;">GROUP</span> <span style="color: blue;">BY</span> process_name <span style="color: blue;">ORDER</span> <span style="color: blue;">BY</span> <span style="color: blue;">SUM</span>(dur) <span style="color: blue;">DESC</span>;</pre><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-cd23b24d-7fff-511d-91a4-3bfaf9572d06"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">In this more complex example, join trace data that spans multiple tables to identify&nbsp;</span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">MessageQueue</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">contention during app startup:</span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"></span></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;">INCLUDE PERFETTO MODULE android.monitor_contention; INCLUDE PERFETTO MODULE android.startup.startups; <span style="color: green;">-- Join package and process information for startups</span> <span style="color: blue;">DROP</span> <span style="color: blue;">VIEW</span> <span style="color: blue;">IF</span> <span style="color: blue;">EXISTS</span> startups; <span style="color: blue;">CREATE</span> <span style="color: blue;">VIEW</span> startups <span style="color: blue;">AS</span> <span style="color: blue;">SELECT</span> startup_id, ts, dur, upid <span style="color: blue;">FROM</span> android_startups <span style="color: blue;">JOIN</span> android_startup_processes <span style="color: blue;">USING</span>(startup_id); <span style="color: green;">-- Intersect monitor contention with startups in the same process.</span> <span style="color: blue;">DROP</span> <span style="color: blue;">TABLE</span> <span style="color: blue;">IF</span> <span style="color: blue;">EXISTS</span> monitor_contention_during_startup; <span style="color: blue;">CREATE</span> VIRTUAL <span style="color: blue;">TABLE</span> monitor_contention_during_startup <span style="color: blue;">USING</span> SPAN_JOIN(android_monitor_contention PARTITIONED upid, startups PARTITIONED upid); <span style="color: blue;">SELECT</span> process_name, <span style="color: blue;">SUM</span>(dur) / 1000000 <span style="color: blue;">AS</span> sum_dur_ms, <span style="color: blue;">COUNT</span>(*) <span style="color: blue;">AS</span> count_contention <span style="color: blue;">FROM</span> monitor_contention_during_startup <span style="color: blue;">WHERE</span> is_blocked_thread_main <span style="color: blue;">AND</span> short_blocked_method <span style="color: blue;">LIKE</span> <span style="color: #a31515;">"%MessageQueue%"</span> <span style="color: blue;">GROUP</span> <span style="color: blue;">BY</span> process_name <span style="color: blue;">ORDER</span> <span style="color: blue;">BY</span> <span style="color: blue;">SUM</span>(dur) <span style="color: blue;">DESC</span>;</pre><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-family: inherit; white-space-collapse: preserve;">You can use your favorite LLM to write PerfettoSQL queries to find other patterns.</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-096d9a48-7fff-80bf-ddd0-2d17c7081362"></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">At Google, we use </span><a href="https://perfetto.dev/docs/deployment/deploying-bigtrace-on-a-single-machine" style="text-decoration: none;" target="_blank"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">BigTrace</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to run PerfettoSQL queries across millions of traces. In doing so, we confirmed that what we saw anecdotally was, in fact, a systemic issue. The data revealed that </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">MessageQueue</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">lock contention impacts users across the entire ecosystem, substantiating the need for a fundamental architectural change.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;"><span id="docs-internal-guid-caadd956-7fff-a29d-5997-34cb35714195"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">Solution: lock-free concurrency</span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-7c4e1ceb-7fff-d28b-b090-f03cebcd5def"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">We addressed the</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">MessageQueue</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">contention problem by implementing a </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">lock-free data structure</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">, using atomic memory operations rather than exclusive locks to synchronize access to shared state. A data structure or algorithm is lock-free if at least one thread can always make progress regardless of the scheduling behavior of the other threads. This property is generally hard to achieve, and is </span><a href="https://abseil.io/docs/cpp/atomic_danger" style="text-decoration-line: none;" target="_blank"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">usually not worth pursuing for most code</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">.</span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;"><span id="docs-internal-guid-297cca04-7fff-13f2-d589-739510c50dee"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">The atomic primitives</span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Lock-free software often relies on atomic Read-Modify-Write primitives that the hardware provides.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-2a9f5f30-7fff-3bd9-b65d-16481bbb7ee9"></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">On older generation ARM64 CPUs, atomics used a Load-Link/Store-Conditional (LL/SC) loop. The CPU loads a value and marks the address. If another thread writes to that address, the store fails, and the loop retries. Because the threads can keep trying and succeed without waiting for another thread, this operation is lock-free.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"></span></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;">ARM64 LL/SC loop example retry: ldxr x0, [x1] // <span style="color: blue;">Load</span> <span style="color: blue;">exclusive</span> <span style="color: blue;">from</span> address x1 <span style="color: blue;">to</span> x0 <span style="color: blue;">add</span> x0, x0, #1 // <span style="color: blue;">Increment</span> value <span style="color: blue;">by</span> 1 stxr w2, x0, [x1] // Store <span style="color: blue;">exclusive</span>. // w2 gets 0 <span style="color: blue;">on</span> success, 1 <span style="color: blue;">on</span> failure cbnz w2, retry // <span style="color: blue;">If</span> w2 <span style="color: blue;">is</span> non-zero (failed), branch <span style="color: blue;">to</span> retr</pre><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(</span><a href="https://godbolt.org/z/GPs9GeGhG" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">view in Compiler Explorer</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">)</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span id="docs-internal-guid-5d564034-7fff-04d5-b5ed-235d2cce6df9"><span style="font-family: inherit;"><br /><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Newer ARM architectures (ARMv8.1) support </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Large System Extensions (LSE)</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> which include instructions in the form of Compare-And-Swap (CAS) or Load-And-Add (demonstrated below). In Android 17 we added support to the Android Runtime (ART) compiler to detect when LSE is supported and emit optimized instructions:</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"></span></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;">/ ARMv8.1 LSE <span style="color: blue;">atomic</span> example ldadd x0, x1, [x2] // <span style="color: blue;">Atomic</span> <span style="color: blue;">load</span>-<span style="color: blue;">add</span>. // Faster, <span style="color: blue;">no</span> loop required.</pre><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; white-space-collapse: preserve;">In our benchmarks, high-contention code that uses CAS achieves a ~3x speedup over the LL/SC variant.</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span id="docs-internal-guid-655bf206-7fff-a055-5c56-2334602de691"></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The Java programming language offers atomic primitives via</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><a href="https://developer.android.com/reference/java/util/concurrent/atomic/package-summary" style="text-decoration: none;" target="_blank"><span style="-webkit-text-decoration-skip: none; background-color: transparent; color: #1155cc; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre;">java.util.concurrent.atomic</span></a><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">that rely on these and other specialized CPU instructions.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-495eb21d-7fff-02a9-25c4-6546f5af6e15"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;"><span style="font-family: inherit; font-size: x-large;">The Data Structure: DeliQueue</span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">To remove lock contention from </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">MessageQueue</span><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, our engineers designed a novel data structure called </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">DeliQueue</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. DeliQueue separates </span><span style="background-color: transparent; color: #188038; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Message</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> insertion from</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">processing:</span></span></p><ol style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; margin-left: -12pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The list of </span></span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Message</span><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">s (Treiber stack):</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> A lock-free stack. Any thread can push new </span></span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Message</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">s here without contention.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; margin-left: -12pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The priority queue (Min-heap):</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> A heap of</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Message</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">s to handle, exclusively owned by the Looper thread (hence no synchronization or locks are needed to access).</span></span></p></li></ol><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 6pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Enqueue: pushing to a Treiber stack</span></span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-5c2da1f3-7fff-2f23-1a57-b87c8ed8680e"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The list of</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">s is kept in a Treiber stack [1], a lock-free stack that uses a CAS loop to update the head pointer.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: blue;">public</span> <span style="color: blue;">class</span> <span style="color: #2b91af;">TreiberStack</span> &lt;E&gt; { AtomicReference&lt;Node&lt;E&gt;&gt; top = <span style="color: blue;">new</span> AtomicReference&lt;Node&lt;E&gt;&gt;(); <span style="color: blue;">public</span> <span style="color: #2b91af;">void</span> push(E item) { Node&lt;E&gt; newHead = <span style="color: blue;">new</span> Node&lt;E&gt;(item); Node&lt;E&gt; oldHead; <span style="color: blue;">do</span> { oldHead = top.get(); newHead.next = oldHead; } <span style="color: blue;">while</span> (!top.compareAndSet(oldHead, newHead)); } <span style="color: blue;">public</span> E pop() { Node&lt;E&gt; oldHead; Node&lt;E&gt; newHead; <span style="color: blue;">do</span> { oldHead = top.get(); <span style="color: blue;">if</span> (oldHead == <span style="color: blue;">null</span>) <span style="color: blue;">return</span> <span style="color: blue;">null</span>; newHead = oldHead.next; } <span style="color: blue;">while</span> (!top.compareAndSet(oldHead, newHead)); <span style="color: blue;">return</span> oldHead.item; } }</pre><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span id="docs-internal-guid-86bfc1f0-7fff-7ba3-667b-6338b7f6e2d2"><span style="font-family: inherit;"><span style="font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Source code based on Java Concurrency in Practice [2], </span><a href="https://jcip.net/listings/ConcurrentStack.java" style="text-decoration-line: none;"><span style="color: #1155cc; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">available online</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> and released to the public domain</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Any producer can push new</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">s to the stack at any time. This is like pulling a ticket at a deli counter - your number is determined by when you showed up, but the order you get your food in doesn't have to match. Because it's a linked stack, ever</span></span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">y</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">is a sub-stack - you can see what the </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">queue was like at any point in time by tracking the head and iterating forwards - you won't see any new</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">s pushed on top, even if they're being added during your traversal.</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /><br /></span></p><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Dequeue: bulk transfer to a min-heap</span></span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-6fc7a392-7fff-b027-8b25-639abfd4a25c"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">To find the next </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">to handle, the</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Looper</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">processes new</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">s</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">from the Treiber stack by walking the stack starting from the top and iterating until it finds the last</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"> that it previously processed. As the</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Looper</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"> traverses down the stack, it inserts </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">s into the deadline-ordered min-heap. Since the Looper exclusively owns the heap, it orders and processes</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">s without locks or atomics.</span></span></p><div class="separator" style="clear: both; text-align: center;"><span style="border: none; display: inline-block; height: 91px; margin-left: 1em; margin-right: 1em; overflow: hidden; width: 610px;"><img alt="A system diagram illustrating the DeliQueue architecture. Concurrent producer threads (left) push messages onto a shared 'Lock-Free Treiber Stack' using atomic CAS operations. The single consumer 'Looper Thread' (right) claims these messages via an atomic swap, merges them into a private 'Local Min-heap' sorted by timestamp, and then executes them." src="https://blogger.googleusercontent.com/img/a/AVvXsEhknkVSDfMX-ZahCjfG4tSxzMtW4QHU0mzm_9vw2wXNMM1DY3oOy-sHeejjN-huSAGJAjVJzl47NUlVlVKNswK4KHkW0dTCEoeIZqYspMEI6KIy56S9d0AQWUMa1amuWA6WAWr1naU4_5SrqSr1GYzMsekgmJgjcs43lb4C5YGznm6g3AC3uwAQDFZJnLk=s16000" style="margin-left: 0px; margin-top: 0px;" /></span></div><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-d33f0623-7fff-4d5e-99b0-5e91595e38cb"><span face="Arial, sans-serif" style="color: black; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">In walking down the stack, the </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Looper</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">also creates links from stacked</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Message</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">s back to their predecessors, thus forming a doubly-linked list. Creating the linked list is safe because links pointing down the stack are added via the Treiber stack algorithm with CAS, and links up the stack are only ever read and modified by the</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Looper</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">thread. These back links are then used to remove</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Message</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">s from arbitrary points in the stack in O(1) time.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">This design provides<span style="font-family: inherit;">&nbsp;</span></span></span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><i>O</i>(1)</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">insertion for producers (threads posting work to the queue) and amortized </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><i>O</i>(log </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">N)</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> processing for the consumer (the</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Looper</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">).</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><span id="docs-internal-guid-a01eb2dc-7fff-e868-f53e-1d021f344afa"></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Using a min-heap to order </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">s also addresses a fundamental flaw in the legacy </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">MessageQueue</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">, </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">where</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">s were kept in a singly-linked list (rooted at the top). In the legacy implementation, removal from the head was </span><span style="background-color: transparent; color: #1f1f1f; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><i>O</i></span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(1)</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, but insertion had a worst case of </span><span style="background-color: transparent; color: #1f1f1f; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><i>O(N)</i></span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> – scaling poorly for overloaded queues! Conversely, insertion to and removal from the min-heap scale logarithmically, delivering competitive average performance but really excelling in tail latencies.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span id="docs-internal-guid-1e82bf04-7fff-ce44-b440-809493782717"></span></span></span></span></span></span></p><div align="center" dir="ltr" style="margin-left: 0pt;"><table style="border-collapse: collapse; border: none;"><colgroup><col width="233"></col><col width="233"></col><col width="233"></col></colgroup><tbody><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><span style="font-family: inherit;"><br /></span></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Legacy (locked) </span><span style="background-color: transparent; color: #188038; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">MessageQueue</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">DeliQueue</span></span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Insert</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><i><span style="font-family: inherit;">O(N)</span></i></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><i>O</i></span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(1)</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> for calling thread</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><i>O(logN)</i></span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> for </span><span style="background-color: transparent; color: #188038; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Looper</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> thread</span></span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Remove from head</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><i>O</i>(1)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><i>O(logN)</i></span></span></p></td></tr></tbody></table></div><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span id="docs-internal-guid-d43a699a-7fff-648e-1c4d-cb8001b51340"></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">In the legacy queue implementation, producers and the consumer used a lock to coordinate exclusive access to the underlying singly-linked list. In DeliQueue, the Treiber stack handles concurrent access, and the single consumer handles ordering its work queue.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-7066d0a0-7fff-996d-8718-93fca15b620f"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;"><span style="font-family: inherit; font-size: large;">Removal: consistency via tombstones</span></span></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">DeliQueue is a hybrid data structure, joining a lock-free Treiber stack with a single-threaded min-heap. Keeping these two structures in sync without a global lock presents a unique challenge: a message might be physically present in the stack but logically removed from the queue.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">To solve this, DeliQueue uses a technique called “tombstoning.” Each </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">tracks its position in the stack via the backwards and forwards pointers, its index in the heap’s array, and a boolean flag indicating whether it has been removed. When a</span></span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">is ready to run, the</span></span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Looper</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">thread will CAS its removed flag, then remove it from the heap and stack.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">When another thread needs to remove a </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Message</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">, it doesn't immediately extract it from the data structure. Instead, it performs the following steps:</span></span></p><ol style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Logical removal: the thread uses a CAS to atomically set the </span></span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Message</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">’s removal flag from false to true. The</span></span><span face="Arial, sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Message</span><span face="Arial, sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">remains in the data structure as evidence of its pending removal, a so-called “tombstone”. Once a</span></span><span face="Arial, sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Message</span><span face="Arial, sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">is flagged for removal, DeliQueue treats it as if it no longer exists in the queue whenever it’s found.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Deferred cleanup: The actual removal from the data structure is the responsibility of the </span></span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Looper</span><span face="Arial, sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">thread, and is deferred until later. Rather than modifying the stack or heap, the remover thread adds the</span></span><span face="Arial, sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Message</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"> to another lock-free freelist stack.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Structural removal: Only the </span></span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Looper</span><span face="Arial, sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">can interact with the heap or remove elements from the stack. When it wakes up, it clears the freelist and processes the </span></span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Messages</span><span face="Arial, sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">it contained. Each </span></span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Message</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"> is then unlinked from the stack and removed from the heap.&nbsp;</span></span></p></li></ol><div><span style="white-space-collapse: preserve;"><br /></span></div><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">This approach keeps all management of the heap single-threaded. It minimizes the number of concurrent operations and memory barriers required, making the critical path faster and simpler.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span id="docs-internal-guid-0f44709f-7fff-3016-7a35-94f3ec565c5e"></span></p><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;">Traversal: benign Java memory model data races</span></span></h3><div><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-7b3bd3a2-7fff-efe7-f706-1d994d79f9ed" style="font-weight: normal;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">Most concurrency APIs, such as</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Future</span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">in the Java standard library, or Kotlin’s </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Job</span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">and</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Deferred</span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">, i</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">nclude a mechanism to cancel work before it completes. An instance of one of these classes matches 1:1 with a unit of underlying work, and calling</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">cancel</span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">on an object cancels the specific operations associated with them.</span></span></p><span style="font-family: inherit;"><br /></span><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">Today’s Android devices have multi-core CPUs and concurrent, generational garbage collection. But when Android was first developed, it was too expensive to allocate one object for each unit of work. Consequently, Android’s </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Handler</span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">supports cancellation via numerous overloads of </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">removeMessages</span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> -</span><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> rather than removing a </span><span style="font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">specific</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Message</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">, it removes all</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Message</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">s that match the specified criteria. In practice, this requires iterating through all</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Message</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">s inserted before</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">removeMessages</span><span face="Arial, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-size: 11pt;"> </span><span style="font-family: inherit;">w</span></span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">as called and removing the ones that match.</span></span></p><span style="font-family: inherit;"><br /><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">When iterating forward, a thread only requires one ordered atomic operation, to read the current head of the stack. After that, ordinary field reads are used to find the next</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Message</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">. If the</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Looper</span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">thread modifies the</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">next</span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">fields while removing</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Message</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">s, the</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Looper</span><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">’s write and another thread’s read are unsynchronized - this is a </span><span style="font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">data race</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">. Normally, a data race is a serious bug that can cause huge problems in your app - leaks, infinite loops, crashes, freezes, and more. However, under certain narrow conditions, data races can be benign within the Java Memory Model. Suppose we start with a stack of:</span></span></span></span></div></span><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"></p><div class="separator" style="clear: both; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><img alt="A diagram showing the initial state of the message stack as a linked list. The 'Head' points to 'Message A', which links sequentially to 'Message B', 'Message C', and 'Message D'." border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD58rsF7QpfHdZD0-4Y4YT4yn7pyFUvRU8ngHUs2T748AcOKAPQYJ_rn_dUg28-Q_Rc0XH3O7qlD9dGwMdoURapme0STqflbdfgUFqz9xBIjkx1Mn0GW_2H357NtAjHDiFGMEsv-GxLQTTN8qq8UycW_l-liJ6EliM76rUdhX0kMU15DjTMbT60I0-d1w/s16000/graphviz_linked.png" /><span><span style="color: #1f1f1f;"><span style="font-family: inherit;"><span><span></span></span></span></span></span></div><span><span style="color: #1f1f1f;"><span style="font-family: inherit;"><span><span><br /><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-d19b183b-7fff-69c0-a5e3-ff92ce37f956"></span></span></span></span></span></span></span><p></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">We perform an atomic read of the head, and see A. A’s </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">next</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">pointer points to B. At the same time as we process B, the looper might remove B and C, by updating A to point to C and then D.</span></span></p><span><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span id="docs-internal-guid-da0e0bca-7fff-aea9-7d44-3ba98b9d79ec"><span face="Arial, sans-serif" style="color: black; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="border: none; display: inline-block; height: 176px; overflow: hidden; width: 610px;"><img alt="A diagram illustrating a benign data race during list traversal. The Looper thread has updated 'Message A' to point directly to 'Message D', effectively removing 'Message B' and 'Message C'. Simultaneously, a concurrent thread reads a stale 'next' pointer from A, traverses through the logically removed messages B and C, and eventually rejoins the live list at 'Message D'." src="https://blogger.googleusercontent.com/img/a/AVvXsEiBEhPBhBTaFMF-1L8t05OMQMm08iWVMG_HGWmCLG9gjEJN87ScZLxovnX8VrbO4RFbRi_Ctw1_0U_BeQVIqAZ3emlxkPhvzXIg3WB3ijOOHRnkqJnnqo43l4G7P1WVU-y8IfENFunduyHnfUewRh2yf_4EM7sbo7BIZDPG1wsDWoN6WbHEePS39mwq1ZE=s16000" style="margin-left: 0px; margin-top: 0px;" /></span></span></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><br /></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Even though</span></span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">B</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"> and </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">C</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">are logically removed, </span><span style="background-color: transparent; color: #188038; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">B</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> retains its next pointer to</span></span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">C</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">,</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"> and</span></span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">C</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">to </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">D</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">. The reading thread continues traversing through the detached removed nodes and eventually rejoins the live stack at </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">D</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">.</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">By designing DeliQueue to handle races between traversal and removal, we allow for safe, lock-free iteration.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit; font-size: x-large;"><span id="docs-internal-guid-b6b28ebe-7fff-e906-929e-1c17c3e00167"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">Quitting: Native refcount</span></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Looper</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">is backed by a native allocation that must be manually freed once the </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Looper</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"> has quit. If some other thread is adding </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">s while the</span></span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Looper</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">is quitting, it could use the native allocation after it’s freed, a memory safety violation. We prevent this using a </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">tagged refcount</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, where one bit of the atomic is used to indicate whether the </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Looper</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">is quitting.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Before using the native allocation, a thread reads the refcount atomic. If the quitting bit is set, it returns that the</span></span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Looper</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">is quitting and the native allocation must not be used. If not, it attempts a CAS to increment the number of active threads using the native allocation. After doing what it needs to, it decrements the count. If the quitting bit was set after its increment but before the decrement, and the count is now zero, then it wakes up the </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Looper</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">thread.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">When the</span></span><span face="Arial, sans-serif" style="color: black; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Looper</span><span face="Arial, sans-serif" style="color: black; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">thread is ready to quit, it uses CAS to set the quitting bit in the atomic. If the refcount was 0, it can proceed to free its native allocation. Otherwise, it parks itself, knowing that it will be woken up when the last user of the native allocation decrements the refcount. This approach does mean that the </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Looper</span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"> thread waits for the progress of other threads, but only when it’s quitting. That only happens once and is not performance sensitive, and it keeps the other code for using the native allocation fully lock-free.</span></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span id="docs-internal-guid-852f4e36-7fff-947e-9e8f-7e83afeba2c0"><span face="Arial, sans-serif" style="color: black; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="border: none; display: inline-block; height: 165px; overflow: hidden; width: 610px;"><img alt="A state diagram illustrating the tagged refcount mechanism for safe termination. It defines three states based on the atomic value's layout (Bit 63 for teardown, Bits 0-62 for refcount): Active (Green): The teardown bit is 0. Workers successfully increment and decrement the reference count. Draining (Yellow): The Looper has set the teardown bit to 1. New worker increments fail, but existing workers continue to decrement. Terminated (Red): Occurs when the reference count reaches 0 while draining. The Looper is signaled that it is safe to destroy the native allocation." src="https://blogger.googleusercontent.com/img/a/AVvXsEhnTvDsIwwQfH8V_jK3KwyjtRolyycTjQqqezIEVYspluGZCVNIWpEJA7bFV2iEYXFpTF7XFfdoYaWVamWAre916Uv8nPhRJ7hOddqT2nEymLewlKXvRffzgYRneFMuxflq8GnPyaTf3-gMx-JDf3Jk6YIxP4fUAJ8TcSmGkcI82Pubf6R3YvSlcjoSd-U=s16000" style="margin-left: 0px; margin-top: -1.9174px;" /></span></span></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><br /></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><br /></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span id="docs-internal-guid-7955d30f-7fff-1736-b4c3-4b22e234107c"></span></span></span></span></span></span></p></span><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">There’s a lot of other tricks and complexity in the implementation. You can learn more about DeliQueue by reviewing the </span></span></span><span style="font-family: inherit;">source code.</span></p><span><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit; font-size: x-large;"><span id="docs-internal-guid-3b24281c-7fff-389c-3612-edc3b2f073fb"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">Optimization: branchless programming</span></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">While developing and testing DeliQueue, the team ran many benchmarks and carefully profiled the new code. One issue identified using the </span><a href="https://developer.android.com/ndk/guides/simpleperf" style="text-decoration: none;" target="_blank"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">simpleperf tool</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> was pipeline flushes caused by the</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">comparator code.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span id="docs-internal-guid-d54d4939-7fff-59af-c65d-7f66993a98bb"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">A standard comparator uses conditional jumps, with the condition for deciding which</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Message</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">comes first simplified below:</span></span></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"></span></span></span></span></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: blue;">static</span> <span style="color: #2b91af;">int</span> compareMessages(@NonNull Message m1, @NonNull Message m2) { <span style="color: blue;">if</span> (m1 == m2) { <span style="color: blue;">return</span> 0; } <span style="color: green;">// Primary queue order is by when.</span> <span style="color: green;">// Messages with an earlier when should come first in the queue.</span> <span style="color: blue;">final</span> <span style="color: #2b91af;">long</span> whenDiff = m1.when - m2.when; <span style="color: blue;">if</span> (whenDiff &gt; 0) <span style="color: blue;">return</span> 1; <span style="color: blue;">if</span> (whenDiff &lt; 0) <span style="color: blue;">return</span> -1; <span style="color: green;">// Secondary queue order is by insert sequence.</span> <span style="color: green;">// If two messages were inserted with the same `when`, the one inserted</span> <span style="color: green;">// first should come first in the queue.</span> <span style="color: blue;">final</span> <span style="color: #2b91af;">long</span> insertSeqDiff = m1.insertSeq - m2.insertSeq; <span style="color: blue;">if</span> (insertSeqDiff &gt; 0) <span style="color: blue;">return</span> 1; <span style="color: blue;">if</span> (insertSeqDiff &lt; 0) <span style="color: blue;">return</span> -1; <span style="color: blue;">return</span> 0; }</pre><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">This code compiles to conditional jumps (</span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">b.le</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">&nbsp;</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">and&nbsp;</span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">cbnz</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">&nbsp;</span><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">instructions). When the CPU encounters a conditional branch, it can’t know whether the branch is taken until the condition is computed, so it doesn’t know which instruction to read next, and has to guess, using a technique called </span><span style="background-color: transparent; color: #1f1f1f; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">branch prediction</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. In a case like binary search, the branch direction will be unpredictably different at each step, so it’s likely that half the predictions will be wrong. Branch prediction is often ineffective in searching and sorting algorithms (such as the one used in a min-heap), because the cost of guessing wrong is larger than the improvement from guessing correctly. When the branch predictor guesses wrong, it must throw away the work it did after assuming the predicted value, and start again from the path that was actually taken - this is called a </span><span style="background-color: transparent; color: #1f1f1f; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">pipeline flush</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span id="docs-internal-guid-86182231-7fff-da72-96d9-6b96aba5000f"></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">To find this issue, we profiled our benchmarks using the</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">branch-misses</span><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> performance counter, which records stack traces where the branch predictor guesses wrong. We then visualized the results with </span><a href="https://github.com/google/pprof" style="text-decoration: none;" target="_blank"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Google pprof</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, as shown below:</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span id="docs-internal-guid-514a00fc-7fff-6f2a-7a9a-dd53920fe6a1"><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="border: none; display: inline-block; height: 293px; overflow: hidden; width: 610px;"><img alt="A screenshot from the pprof web UI showing branch misses in MessageQueue code to compare Message instances while performing heap operations." src="https://blogger.googleusercontent.com/img/a/AVvXsEhWzEoCloyBTPrjN-l1Z_g9erTzvYdJSAN_Kl03J5BqreA5Tdb_T9HG0LfenFzE2BkN5GTaeiIqAtQNqmcGjhTsu7vfEj2D-51hUjLaQssZo6pV8jiv8FtLFOmEnqZdfanKNYQ1oOWDAaKEzfSZbV9NVcxVYkXW_dw663Z5DDPUaS8NJwrXzSgTrxtT13k=s16000" style="margin-left: -6.78561e-14px; margin-top: 0px;" /></span></span></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Recall that the original </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">MessageQueue</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">code used a singly-linked list for the ordered queue. Insertion would traverse the list in sorted order as a linear search, stopping at the first element that’s past the point of insertion and linking the new </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Message</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">ahead of it. Removal from the head simply required unlinking the head. Whereas DeliQueue uses a min-heap, where mutations require reordering some elements (sifting up or down) with logarithmic complexity in a balanced data structure, where any comparison has an even chance of directing the traversal to a left child or to a right child. The new algorithm is asymptotically faster, but exposes a new bottleneck as the search code stalls on branch misses half the time.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span id="docs-internal-guid-fd635632-7fff-cd6b-4491-00a8cba98612"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Realizing that branch misses were slowing down our heap code, we optimized the code using </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">branch-free programming</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">:</span></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"></span></span></span></span></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: green;">// Branchless Logic</span> <span style="color: blue;">static</span> <span style="color: #2b91af;">int</span> compareMessages(@NonNull Message m1, @NonNull Message m2) { <span style="color: blue;">final</span> <span style="color: #2b91af;">long</span> when1 = m1.when; <span style="color: blue;">final</span> <span style="color: #2b91af;">long</span> when2 = m2.when; <span style="color: blue;">final</span> <span style="color: #2b91af;">long</span> insertSeq1 = m1.insertSeq; <span style="color: blue;">final</span> <span style="color: #2b91af;">long</span> insertSeq2 = m2.insertSeq; <span style="color: green;">// signum returns the sign (-1, 0, 1) of the argument,</span> <span style="color: green;">// and is implemented as pure arithmetic:</span> <span style="color: green;">// ((num &gt;&gt; 63) | (-num &gt;&gt;&gt; 63))</span> <span style="color: blue;">final</span> <span style="color: #2b91af;">int</span> whenSign = Long.signum(when1 - when2); <span style="color: blue;">final</span> <span style="color: #2b91af;">int</span> insertSeqSign = Long.signum(insertSeq1 - insertSeq2); <span style="color: green;">// whenSign takes precedence over insertSeqSign,</span> <span style="color: green;">// so the formula below is such that insertSeqSign only matters</span> <span style="color: green;">// as a tie-breaker if whenSign is 0.</span> <span style="color: blue;">return</span> whenSign * 2 + insertSeqSign; }</pre><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span id="docs-internal-guid-9074ac10-7fff-96c8-aade-ddfd0a0b56fb"></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">To understand the optimization, </span><a href="https://godbolt.org/z/bvGh7aadG" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">disassemble the two examples in Compiler Explorer</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and use </span><a href="https://llvm.org/docs/CommandGuide/llvm-mca.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">LLVM-MCA</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, a CPU simulator that can generate an </span><a href="https://godbolt.org/z/EYxn6MasE" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">estimated timeline of CPU cycles</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"></span></span></span></span></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;">The original code: <span style="color: blue;">Index</span> 01234567890123 [0,0] DeER . . . sub x0, x2, x3 [0,1] D=eER. . . cmp x0, #0 [0,2] D==eER . . cset w0, ne [0,3] .D==eER . . cneg w0, w0, lt [0,4] .D===eER . . cmp w0, #0 [0,5] .D====eER . . b.le #12 [0,6] . DeE<span style="color: green;">---R . . mov w1, #1</span> [0,7] . DeE<span style="color: green;">---R . . b #48</span> [0,8] . D==eE-R . . tbz w0, #31, #12 [0,9] . DeE<span style="color: green;">--R . . mov w1, #-1</span> [0,10] . DeE<span style="color: green;">--R . . b #36</span> [0,11] . D=eE-R . . sub x0, x4, x5 [0,12] . D=eER . . cmp x0, #0 [0,13] . D==eER. . cset w0, ne [0,14] . D===eER . cneg w0, w0, lt [0,15] . D===eER . cmp w0, #0 [0,16] . D====eER. csetm w1, lt [0,17] . D===eE-R. cmp w0, #0 [0,18] . .D===eER. csinc w1, w1, wzr, le [0,19] . .D====eER mov x0, x1 [0,20] . .DeE<span style="color: green;">----R ret</span></pre><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span id="docs-internal-guid-32bdaff2-7fff-460b-89b2-ff05a7840904"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">Note the one conditional branch, </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">b.le</span><span face="Arial, sans-serif" style="color: black; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">,&nbsp; </span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">which avoids comparing the</span></span><span face="Arial, sans-serif" style="color: black; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">insertSeq </span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">fields if the result is already known from comparing the </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">when</span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"> fields.</span></span></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"></span></span></span></span></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;">The branchless code: <span style="color: blue;">Index</span> 012345678 [0,0] DeER . . sub x0, x2, x3 [0,1] DeER . . sub x1, x4, x5 [0,2] D=eER. . cmp x0, #0 [0,3] .D=eER . cset w0, ne [0,4] .D==eER . cneg w0, w0, lt [0,5] .DeE<span style="color: green;">--R . cmp x1, #0</span> [0,6] . DeE-R . cset w1, ne [0,7] . D=eER . cneg w1, w1, lt [0,8] . D==eeER <span style="color: blue;">add</span> w0, w1, w0, lsl #1 [0,9] . DeE<span style="color: green;">--R ret</span></pre><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Here, the branchless implementation takes fewer cycles and instructions than even the shortest path through the branchy code - it’s better in all cases. The faster implementation plus the elimination of mispredicted branches resulted in a 5x improvement in some of our benchmarks!</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><br /><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">However, this technique is not always applicable. Branchless approaches generally require doing work that will be thrown away, and if the branch is predictable most of the time, that wasted work can slow your code down. In addition, removing a branch often introduces a </span><span style="color: black; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">data dependency</span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">. Modern CPUs execute multiple operations per cycle, but they can’t execute an instruction until its inputs from a previous instruction are ready. In contrast, a CPU can </span><span style="color: black; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">speculate</span><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> about data in branches, and work ahead if a branch is predicted correctly.</span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span id="docs-internal-guid-e3d6b84f-7fff-6a01-6407-3e8247547a87"></span></span></span></span></span></span></p><h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;">Testing and Validation</span></span></h2><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Validating the correctness of lock-free algorithms is notoriously difficult!</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">In addition to standard unit tests for continuous validation during development, we also wrote rigorous </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">stress tests</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to verify queue invariants and to attempt to induce data races if they existed. In our test labs we could run millions of test instances on emulated devices and on real hardware.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">With </span><a href="https://github.com/google/java-thread-sanitizer" style="text-decoration: none;" target="_blank"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 700; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Java ThreadSanitizer</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> (JTSan) instrumentation, we could use the same tests to also detect some data races in our code. JTSan did not find any problematic data races in DeliQueue, but - surprisingly -actually detected two concurrency bugs in the Robolectric framework, which we promptly fixed.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span id="docs-internal-guid-340bb8b1-7fff-ad8d-a726-461114d9db30"></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 6pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">To improve our debugging capabilities, we built new </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">analysis tools</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. Below is an example showing an issue in Android platform code where one thread is overloading another thread with </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Message</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">s, causing a large backlog, visible in Perfetto thanks to the</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">MessageQueue</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">instrumentation feature that we added.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span id="docs-internal-guid-90c3fbfa-7fff-1a60-444e-9414aa435c50"><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="border: none; display: inline-block; height: 471px; overflow: hidden; width: 610px;"><img alt="A screenshot of Perfetto UI, demonstrating flows and metadata for Messages being posted to a MessageQueue and delivered to a worker thread." src="https://blogger.googleusercontent.com/img/a/AVvXsEj6PDjipHRYCZTdaA0a9JAXFqW98l1DBKt1sJGKzSgxpYI9oevK5sjG7sdBHDCjwFyK9VZfTbmHmA5NK9Z5cJ5dLxFb7FP7Lw_07AmtaBT4yKs9Gsyz3QeeifZghO09Qk0ZTsbTIMVKmRrT34-VLQmB47qTTKPSm6BeSPiBSASooYIR5yR7AcoRV7utUKc=s16000" style="margin-left: 0px; margin-top: 0px;" /></span></span></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">To enable </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">MessageQueue</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">tracing in the</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">system_server</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">process, include the following in your Perfetto configuration:</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"></span></span></span></span></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;">data_sources { config { name: <span style="color: #a31515;">"track_event"</span> target_buffer: 0 <span style="color: green;"># Change this per your buffers configuration</span> track_event_config { enabled_categories: <span style="color: #a31515;">"mq"</span> } } }</pre><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit; font-size: x-large;"><span id="docs-internal-guid-9d707054-7fff-6660-7d56-bf741066320f"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">Impact</span></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">DeliQueue improves system and app performance by eliminating locks from </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">MessageQueue</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">.</span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: -12.75pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Synthetic benchmarks:</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> multi-threaded insertions into busy queues is up to </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">5,000x faster</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> than the legacy</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">MessageQueue</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">, thanks to improved concurrency (the Treiber stack) and faster insertions (the min-heap).</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: -12.75pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">In </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Perfetto traces acquired from internal beta testers</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, we see a reduction of 15% in app main thread time spent in lock contention.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: -12.75pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">On the same test devices, the reduced lock contention leads to significant improvements to the user experience, such as:</span></span></p></li><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="2" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">-4% missed frames in apps.</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">-7.7% missed frames in System UI and Launcher interactions.</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">-9.1% in time from app startup to the first frame drawn, at the 95%ile.</span></span></p></li></ul></ul><h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 6pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Next steps</span></span></h2><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">DeliQueue is rolling out to apps in Android 17. App developers should review preparing your app for the new lock-free </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">MessageQueue</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">on the Android Developers blog to learn how to test their apps.</span></span></p><h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 6pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">References</span></span></h2><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">[1] Treiber, R.K., 1986. Systems programming: Coping with parallelism. International Business Machines Incorporated, Thomas J. Watson Research Center.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><span id="docs-internal-guid-fb570c95-7fff-a409-09f2-8f8855c4aabc"></span></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">[2] Goetz, B., Peierls, T., Bloch, J., Bowbeer, J., Holmes, D., &amp; Lea, D. (2006). Java Concurrency in Practice. Addison-Wesley Professional.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><br /></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><br /></span></span></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><br /></span></span></span></span></span></p></span>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-5956480267687621212026-02-13T11:34:00.000-08:002026-02-13T11:34:44.330-08:00Prepare your app for the resizability and orientation changes in Android 17<name content="IMG" twitter:image=""><p><em>Posted by Miguel Montemayor, Developer Relations Engineer, Android&nbsp;</em></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikDKkmApg8RWitmL4i9a2Qu7sLGHQVTXkbaYcf494F7oVyFQ_VU0ogIbtc_HvduJax-kfpPgUld9ui1dQv6SG7IjJG0q0hmr-QpKcRdW49-MwDM4SDVyCm8nlH5Rhake4RUSElO4wRwNd7F6xy1Ers861Pv40MEAC_hwQ9fs76MsNMg0029dXwx4LTsWM/s4210/Android%20%2017%20KILO%20Beta%20Blog.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1254" data-original-width="4210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikDKkmApg8RWitmL4i9a2Qu7sLGHQVTXkbaYcf494F7oVyFQ_VU0ogIbtc_HvduJax-kfpPgUld9ui1dQv6SG7IjJG0q0hmr-QpKcRdW49-MwDM4SDVyCm8nlH5Rhake4RUSElO4wRwNd7F6xy1Ers861Pv40MEAC_hwQ9fs76MsNMg0029dXwx4LTsWM/s16000/Android%20%2017%20KILO%20Beta%20Blog.png" /></a></div><div><br /></div><span id="docs-internal-guid-4f561ce1-7fff-7e75-407e-eee5bc03f550"></span><p></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">With the release of Android 16 in 2025, we shared our vision for a device ecosystem where apps adapt seamlessly to any screen—whether it’s a phone, foldable, tablet, desktop, car display, or XR. Users expect their apps to work everywhere. Whether multitasking on a tablet, unfolding a device to read comfortably, or running apps in a desktop windowing environment, users expect the UI to fill the available display space and adapt to the device posture.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">We </span><a href="https://android-developers.googleblog.com/2025/01/orientation-and-resizability-changes-in-android-16.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">introduced significant changes</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to orientation and resizability APIs to facilitate adaptive behavior, while providing a temporary opt-out to help you make the transition. We’ve already seen many developers successfully adapt to this transition when targeting API level 36.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Now with the release of the Android 17 Beta, we’re moving to the next phase of our adaptive roadmap: </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Android 17 (API level 37) removes the developer opt-out for orientation and resizability restrictions on large screen devices</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> (sw &gt; 600 dp). When you target API level 37, your app must be capable of adapting to a variety of display sizes.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span id="docs-internal-guid-5ec37f72-7fff-fb22-a0ab-218209897934"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The behavior changes ensure that the Android ecosystem offers a consistent, high-quality experience on all device form factors.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-size: x-large; font-weight: 700; white-space-collapse: preserve;">What’s changing in Android 17</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Apps targeting Android 17 must ensure their compatibility with the phase out of manifest attributes and runtime APIs introduced in Android 16. We understand for some apps this may be a big transition, so we’ve included best practices and tools for helping avoid common issues later in this blog post.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">No new changes have been introduced since Android 16, but the developer opt-out is no longer possible. As a reminder: when your app is running on a large screen—where </span><span style="background-color: transparent; color: #1f1f1f; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">large screen</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> means that the smaller dimension of the display is greater than or equal to 600 dp—the following manifest attributes and APIs are ignored:</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span id="docs-internal-guid-70e8f0ff-7fff-b202-a807-0b4e093db486"><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Note: </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">As previously mentioned with Android 16, these changes do not apply for screens that are smaller than sw 600 dp or apps categorized as games based on the </span><a href="https://developer.android.com/guide/topics/manifest/application-element#appCategory" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">android:appCategory</span></a><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> flag. </span></span></span></p><table><tbody><tr><td><b>Manifest attributes/API</b></td><td><b>Ignored values</b></td></tr><tr><td><a href="https://developer.android.com/guide/topics/manifest/activity-element#screen" target="_blank">screenOrientation</a></td><td>portrait, reversePortrait, sensorPortrait, userPortrait, landscape, reverseLandscape, sensorLandscape, userLandscape</td></tr><tr><td><a href="https://developer.android.com/reference/android/app/Activity#setRequestedOrientation%28int%29" target="_blank">setRequestedOrientation()</a></td><td>portrait, reversePortrait, sensorPortrait, userPortrait, landscape, reverseLandscape, sensorLandscape, userLandscape</td></tr><tr><td><a href="https://developer.android.com/guide/topics/manifest/application-element#resizeableActivity" target="_blank">resizeableActivity</a></td><td>all</td></tr><tr><td><a href="https://developer.android.com/reference/android/R.attr#minAspectRatio" target="_blank">minAspectRatio</a></td><td>all</td></tr><tr><td><a href="https://developer.android.com/reference/android/R.attr#maxAspectRatio" target="_blank">maxAspectRatio</a></td><td>all</td></tr></tbody></table><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span id="docs-internal-guid-50b62273-7fff-0150-2aba-00ed9b0e8d98"></span></p><div align="left" dir="ltr" style="margin-left: 0pt;"><br /></div><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Also, users retain control. In the </span><a href="https://developer.android.com/guide/practices/device-compatibility-mode#user_per-app_overrides" style="font-family: inherit; text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">aspect ratio settings</span></a><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, users can explicitly opt-in to using the app’s requested behavior.</span></p><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Prepare your app</span></span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Apps will need to support landscape and portrait layouts for display sizes in the full range of aspect ratios in which users can choose to use apps, including resizable windows, as there will no longer be a way to restrict the aspect ratio and orientation to portrait or to landscape.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Test your app</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Your first step is to test your app with these changes to make sure the app works well across display sizes.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span id="docs-internal-guid-9c4a6081-7fff-4dde-4bd8-519c3834e65f"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Use Android 17 Beta 1 with the Pixel Tablet and Pixel Fold series emulators in Android Studio, and set the </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">targetSdkPreview = “CinnamonBun”</span><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. Alternatively, you can use the </span><a href="https://developer.android.com/guide/app-compatibility/test-debug" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">app compatibility framework</span></a><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> by enabling the </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">UNIVERSAL_RESIZABLE_BY_DEFAULT</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">flag if your app does not target API level 36 yet.</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">We have additional tools to ensure your layouts adapt correctly. You can automatically audit your UI and get suggestions to make your UI more adaptive with </span><a href="https://developer.android.com/develop/ui/compose/tooling/debug#compose_ui_check" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Compose UI Check</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, and simulate specific display characteristics in your tests using </span><a href="https://developer.android.com/training/testing/different-screens/tools#deviceconfigurationoverride" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">DeviceConfigurationOverride</span></a><span style="background-color: transparent; color: #188038; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">For apps that have historically restricted orientation and aspect ratio, we commonly see issues with skewed or misoriented camera previews, stretched layouts, inaccessible buttons, or loss of user state when handling configuration changes.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Let’s take a look at some strategies for addressing these common issues.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 18pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Ensure camera compatibility</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 18pt; margin-top: 0pt; text-align: left;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">A common problem on landscape foldables or for aspect ratio calculations in scenarios like multi-window, desktop windowing, or connected displays, is when the camera preview appears stretched, rotated, or cropped.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 18pt; margin-top: 0pt; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaOg_C3QfT7opQoLISKbuJZVmSGW2k3T469LhtncUPlCCeHYNmnfDNjXvoaxzctfEFNzFlro4vBJ_KSvfz8u8ihxgitmvQi8n3dW1THWQvEux0_DRaW3VfZFPe7n5vbRFv8nB__rz9B2zPU3SO6jFilPVjMZ9jKCd-s3VqKq2lbj9O7WPFwcr4SnwlIG4/s1140/camera_preview_issue.png" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="640" data-original-width="1140" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaOg_C3QfT7opQoLISKbuJZVmSGW2k3T469LhtncUPlCCeHYNmnfDNjXvoaxzctfEFNzFlro4vBJ_KSvfz8u8ihxgitmvQi8n3dW1THWQvEux0_DRaW3VfZFPe7n5vbRFv8nB__rz9B2zPU3SO6jFilPVjMZ9jKCd-s3VqKq2lbj9O7WPFwcr4SnwlIG4/s16000/camera_preview_issue.png" /></a><i><span style="font-family: inherit;">Ensure your camera preview isn’t stretched or rotated.</span></i></p><span style="font-family: inherit;">This issue often happens on large screen and foldable devices because apps assume fixed relationships between camera features (like aspect ratio and sensor orientation) and device features (like device orientation and natural orientation).</span><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">To ensure your camera preview adapts correctly to any window size or orientation, consider these four solutions:</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: italic; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Solution 1: Jetpack CameraX (preferred)&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The simplest and most robust solution is to use the Jetpack CameraX library. Its </span></span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">PreviewView</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">UI element is designed to handle all preview complexities automatically:</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">PreviewView</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">correctly adjusts for sensor orientation, device rotation, and scaling</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">PreviewView</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> maintains the aspect ratio of the camera image, typically by centering and cropping </span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(</span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">FILL_CENTER</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">You can set the scale type to</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">FIT_CENTER</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">to letterbox the preview if needed</span></span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">For more information, see </span><a href="https://developer.android.com/training/camerax/preview" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Implement a preview</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in the CameraX documentation.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: italic; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Solution 2: CameraViewfinder&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">I</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">f you are using an existing Camera2 codebase, the</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">CameraViewfinder</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"> library (backward compatible to API level 21) is another modern solution. It simplifies displaying the camera feed by using a</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">TextureView</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">or</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">SurfaceView</span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">and applying all the necessary transformations (aspect ratio, scale, and rotation) for you.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span id="docs-internal-guid-666b8396-7fff-facf-5950-4e095fe61a34"></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">For more information, see the </span><a href="https://android-developers.googleblog.com/2022/11/introducing-camera-viewfinder.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Introducing Camera Viewfinder</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> blog post and </span><a href="https://developer.android.com/media/camera/camera2/camera-preview#cameraviewfinder" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Camera preview</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> developer guide.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: italic; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Solution 3: Manual Camera2 implementation&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">If you can't use CameraX or</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: #188038; font-family: 'Roboto Mono',monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">CameraViewfinder</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">, you must manually calculate the orientation and aspect ratio and ensure the calculations are updated on each configuration change:</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Get the camera sensor orientation (for example, 0, 90, 180, 270 degrees) from</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">CameraCharacteristics</span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Get the device's current display rotation (for example, 0, 90, 180, 270 degrees)</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Use the camera sensor orientation and display rotation values to determine the necessary transformations for your </span></span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">SurfaceView</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">or</span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">TextureView</span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Ensure the aspect ratio of your output </span></span><span style="background-color: transparent; color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Surface</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">matches the aspect ratio of the camera preview to prevent distortion</span></span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Important:</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> Note the camera app might be running in a portion of the screen, either in multi-window or desktop windowing mode or on a connected display. For this reason, screen size should not be used to determine the dimensions of the camera viewfinder; use </span><a href="https://developer.android.com/media/camera/camera2/camera-preview#window_metrics" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">window metrics</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> instead. Otherwise you risk a stretched camera preview.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">For more information, see the </span><a href="https://developer.android.com/media/camera/camera2/camera-preview" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Camera preview</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> developer guide and </span><a href="https://www.youtube.com/watch?v=XcJIrTedfus" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Your Camera app on different form factors</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> video.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: italic; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Solution 4: Perform basic camera actions using an Intent&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">If you don't need many camera features, a simple and straightforward solution is to perform basic camera actions like capturing a photo or video using the device's default camera application. In this case, you can simply use an </span><span style="background-color: transparent; color: #188038; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Intent</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> instead of integrating with a camera library, for easier maintenance and adaptability.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">For more information, see </span><a href="https://developer.android.com/media/camera/camera-intents" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Camera intents</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /><br /></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 18pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Avoid stretched UI or inaccessible buttons</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-75e7b15f-7fff-8b8d-e991-55af73beff6f"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 18pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">If your app assumes a specific device orientation or display aspect ratio, the app may run into issues when it’s now used across various orientations or window sizes.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 18pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKwyymMCL3BFRz6gBW_WJtawGZhlqrAMvc2ty07RJyUl9cl8CtlDG3vJIcTMCT0o0if_liTu6zTZv7aMhBeH3r5YtzUEfPcScKY7Y51OzBABFNio__QaxeCekQMfkqYo4vsfrQAv8lnCkFD90mngpQ9FQ9HAgHnhKlmWn3xyzVL9xS9nyb43cfX7trjIk/s3998/Screenshot%202026-02-09%20at%203.03.14%E2%80%AFPM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2414" data-original-width="3998" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKwyymMCL3BFRz6gBW_WJtawGZhlqrAMvc2ty07RJyUl9cl8CtlDG3vJIcTMCT0o0if_liTu6zTZv7aMhBeH3r5YtzUEfPcScKY7Y51OzBABFNio__QaxeCekQMfkqYo4vsfrQAv8lnCkFD90mngpQ9FQ9HAgHnhKlmWn3xyzVL9xS9nyb43cfX7trjIk/s16000/Screenshot%202026-02-09%20at%203.03.14%E2%80%AFPM.png" /></a></span></div><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt; text-align: center;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-14dbf7ac-7fff-529c-001c-7eb03fe76609"><span style="font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">Ensure buttons, textfields, and other elements aren’t stretched on large screens.</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span id="docs-internal-guid-d400b121-7fff-91a6-26ce-773852eb2b01"></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 18pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">You may have set buttons, text fields, and cards to</span></span><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; white-space-collapse: preserve;">fillMaxWidth</span><span face="'Google Sans Text',sans-serif" style="color: #1f1f1f; font-size: 9pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space: pre;"> or </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; white-space-collapse: preserve;">match_parent</span><span face="'Google Sans Text',sans-serif" style="color: #1f1f1f; font-size: 9pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space: pre;">. </span><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">On a phone, this looks great. However, on a tablet or foldable in landscape, UI elements stretch across the entire large screen. In Jetpack Compose, you can use the </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">widthIn</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> modifier to set a maximum width for components to avoid stretched content:</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;">Box( contentAlignment = Alignment.Center, modifier = Modifier.fillMaxSize() ) { Column( modifier = Modifier .widthIn(max = 300.dp) <span style="color: green;">// Prevents stretching beyond 300dp</span> .fillMaxWidth() <span style="color: green;">// Fills width up to 300dp</span> .padding(16.dp) ) { <span style="color: green;">// Your content</span> } }</pre><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-006846ae-7fff-a949-e6a7-5561f957a149"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">If a user opens your app in landscape orientation on a foldable or tablet, action buttons like </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">Save</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> or </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">Login</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> at the bottom of the screen may be rendered offscreen. If the container is not scrollable, the user can be blocked from proceeding. In Jetpack Compose, you can add a </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">verticalScroll</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> modifier to your component:</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;">Column( modifier = Modifier .fillMaxSize() .verticalScroll(rememberScrollState()) .padding(16.dp) )</pre><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">By combining max-width constraints with vertical scrolling, you ensure your app remains functional and usable, regardless of how wide or short the app window size becomes.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><b id="docs-internal-guid-7b993bae-7fff-51cc-9a35-3876d92d6b53" style="font-weight: normal;"><br /></b></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">See our guide on </span><a href="https://developer.android.com/develop/ui/compose/build-adaptive-apps" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">building adaptive layouts</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><br /></b></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 18pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Preserve state with configuration changes</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 18pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Removing orientation and aspect ratio restrictions means your app's window size will change much more frequently. Users may rotate their device, fold/unfold it, or resize your app dynamically in split-screen or desktop windowing modes.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 18pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">By default, these configuration changes destroy and recreate your activity. If your app does not properly manage this lifecycle event, users will have a frustrating experience: scroll positions are reset to the top, half-filled forms are wiped clean, and navigation history is lost. To ensure a seamless adaptive experience, it’s critical your app preserves state through these configuration changes. With Jetpack Compose, you can opt-out of recreation, and instead allow window size changes to recompose your UI to reflect the new amount of space available.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 18pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">See our guide on </span><a href="https://developer.android.com/topic/libraries/architecture/saving-states" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">saving UI state</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Targeting API level 37 by August 2027</span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">If your app previously opted out of these changes when targeting API level 36, your app will only be impacted by the Android 17 opt-out removal after your app targets API level 37. To help you plan ahead and make the necessary adjustments to your app, here’s the timeline when these changes will take effect:</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><br /></b></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Android 17: Changes described above will be the baseline experience for large screen devices (smallest screen width &gt; 600 dp) for </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">apps that target API level 37</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. Developers </span><span style="background-color: transparent; color: black; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">will not</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> have an option to opt-out.</span></span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><b style="font-weight: normal;"><br /></b></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 18pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The deadlines for targeting a specific API level are app-store specific. For Google Play, new apps and updates will be required to target API level 37, making this behavior mandatory for distribution in August 2027.</span></span></p><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Preparing for Android 17</span></span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span id="docs-internal-guid-18057054-7fff-c687-6924-009cffc40710"><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Refer to the </span><a href="https://developer.android.com/about/versions/17/behavior-changes-17" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Android 17 changes page</span></a><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> for all changes impacting apps in Android 17. To test your app, download Android 17 Beta 1 and update to</span></span><span style="color: #1f1f1f; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 9pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">targetSdkPreview = “CinnamonBun”</span><span style="color: #1f1f1f; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 9pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">or use the </span><a href="https://developer.android.com/guide/app-compatibility/test-debug" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">app compatibility framework</span></a><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> to enable specific changes.</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The future of Android is adaptive, and we’re here to help you get there. As you prepare for Android 17, we encourage you to review our guides for </span><a href="https://developer.android.com/develop/ui/compose/build-adaptive-apps" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">building adaptive layouts</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and our </span><a href="https://developer.android.com/docs/quality-guidelines/large-screen-app-quality" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">large screen quality guidelines</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. These resources are designed to help you handle multiple form factors and window sizes with confidence.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Don’t wait. Start getting ready for Android 17 today!</span></span></p><p></p></name>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-91747535087171070312026-02-13T11:23:00.000-08:002026-02-13T14:57:52.296-08:00The First Beta of Android 17<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDYVIPcSHC3ZeYbTu-FSxsYdp1PDK62bN18DL-VuLlWbmEG9L7vPfW6CA6SfA0iaUiZ-V79edfaGQ7DWsaMH7i9zQlTNbYlKZlsEgMb6IQAIJdxMb7NXcqtETxMk2T3X1uY2U7Ok4xq1-52gDN_yH5LOUEAr6xb3wBx0XJJKBnvmKHt8JNfo7Bfp9n_0g/w1000-h1000/[email protected]" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDYVIPcSHC3ZeYbTu-FSxsYdp1PDK62bN18DL-VuLlWbmEG9L7vPfW6CA6SfA0iaUiZ-V79edfaGQ7DWsaMH7i9zQlTNbYlKZlsEgMb6IQAIJdxMb7NXcqtETxMk2T3X1uY2U7Ok4xq1-52gDN_yH5LOUEAr6xb3wBx0XJJKBnvmKHt8JNfo7Bfp9n_0g/w1000-h1000/[email protected]" style="display: none;" /> <name content="IMG" twitter:image=""><p style="text-align: left;"><em>Posted by Matthew McCullough, VP of Product Management, Android Developer</em> </p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfHUXXy41tnZXO66g6CXEA5j-xhe-8Xmt4IlUR_R4CWtypOHL0BFj1HYfSp_Gb0CFaJlKzREehqqnOZwVb1ViBejiyjQl_q3r_Zj8-WsobiU_5csS6a_W3YR4ecqEJxpG-rkL4yzqCIaFG-WN3-nqTUZz74t93mUpxP6XOktYix_kFX5761qUlQHoVKlM/s320/Banner2_heptadecagraph-rounded-calm%20(1).png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1024" data-original-width="1024" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfHUXXy41tnZXO66g6CXEA5j-xhe-8Xmt4IlUR_R4CWtypOHL0BFj1HYfSp_Gb0CFaJlKzREehqqnOZwVb1ViBejiyjQl_q3r_Zj8-WsobiU_5csS6a_W3YR4ecqEJxpG-rkL4yzqCIaFG-WN3-nqTUZz74t93mUpxP6XOktYix_kFX5761qUlQHoVKlM/w600-h600/Banner2_heptadecagraph-rounded-calm%20(1).png" width="200" /></a></div><p><span style="font-family: inherit;">Today we're releasing the first beta of&nbsp;</span><a href="https://developer.android.com/about/versions" style="font-family: inherit; text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">Android 17</span></a><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">, continuing our work to build a platform that prioritizes privacy, security, and refined performance. This build continues our work for more adaptable Android apps, introduces significant enhancements to camera and media capabilities, new tools for optimizing connectivity, and expanded profiles for companion devices. This release also highlights a fundamental shift in the way we're bringing new releases to the developer community, </span><a href="https://android-developers.googleblog.com/2025/07/android-canary.html" style="font-family: inherit; text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">from the traditional Developer Preview model to the Android Canary program</span></a></p></name><div><span id="docs-internal-guid-2b19e33d-7fff-e0b9-14f9-1981c2fabd14"><h2 dir="ltr" style="line-height: 1.2; margin-bottom: 4pt; margin-top: 14pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">Beyond the Developer Preview</span></span></h2><div style="text-align: left;"><span id="docs-internal-guid-02878592-7fff-b6a2-a251-a181b64ae300"><span style="font-family: inherit;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Android has replaced the traditional "Developer Preview" with a </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">continuous Canary channel</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. This new "always-on" model offers three main benefits:</span></p><ul style="text-align: left;"><li><span id="docs-internal-guid-02878592-7fff-b6a2-a251-a181b64ae300"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Faster Access:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> Features and APIs land in Canary as soon as they pass internal testing, rather than waiting for a quarterly release.</span></span></li><li><span id="docs-internal-guid-02878592-7fff-b6a2-a251-a181b64ae300"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Better Stability:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> Early "battle-testing" in Canary results in a more polished Beta experience with new APIs and behavior changes that are closer to being final.</span></span></li><li><span id="docs-internal-guid-02878592-7fff-b6a2-a251-a181b64ae300"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Easier Testing:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> Canary supports OTA updates (no more manual flashing) and, as a separate update channel, more easily integrates with CI workflows and gives you the earliest window to give immediate feedback on upcoming potential changes.</span></span></li></ul></span></span></div><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit; font-size: x-large; font-weight: 700; white-space-collapse: preserve;">The Android 17 schedule</span></p></span><div><name content="IMG" twitter:image=""><span style="font-family: inherit;">We're going to be moving quickly from this Beta to our Platform Stability milestone, targeted for March. At this milestone, we'll deliver final SDK/NDK APIs and largely final app-facing behaviors. From that time you’ll have several months before the final release to complete your testing.</span><span><span style="font-family: inherit;"><span><span><div style="white-space-collapse: preserve;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><br /></span></div></span></span></span></span><div class="separator" style="clear: both; text-align: center;"><span id="docs-internal-guid-9ff22c46-7fff-a4fc-59a0-9f730b15efaf"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"></span></span><span style="border: none; display: inline-block; height: 123px; margin-left: 1em; margin-right: 1em; overflow: hidden; width: 610px;"><img height="343.00000000000006" src="https://blogger.googleusercontent.com/img/a/AVvXsEj9GTiqVXjiWkjoGd2LtsQUJV64ehB2uENeZbhdu7_TYJYDCfn662UAL8kh-QH6p9CXz1I2aIyBiI21RoUQyphkBb0YuPHtii_j_UWmh59cXg9jvft8DEZpmH5Lyc4WlWiNp2hqTrTGOQrxmKCtDeudjMU3JIo3pc-oZ71XAml2wlEzypwYeyR3hOLvDuE" style="margin-left: 0px; margin-top: -82px;" width="610" /></span></div><p><span id="docs-internal-guid-0db75647-7fff-eba4-ac6c-79ede54f5043"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"></span></span></p><span id="docs-internal-guid-d295d168-7fff-8fff-f148-356bbe976266"><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;"><br /></span></span></h3></span><span style="font-family: inherit;"><span style="font-size: large;"><b>A year of releases</b></span></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;">We plan for Android 17 to continue to get updates in a series of quarterly releases. The upcoming release in Q2 is the only one where we introduce planned app breaking behavior changes. We plan to have a minor SDK release in Q4 with additional APIs and features.</span><span><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt; text-align: center;"><span id="docs-internal-guid-6b7c18f2-7fff-88c0-4c58-0998b9bde4dc"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="border: none; display: inline-block; height: 143px; overflow: hidden; width: 610px;"><img height="343" src="https://blogger.googleusercontent.com/img/a/AVvXsEhW2Ih5qF4zhQOmL_hQ70CCu1BnjExD5gLURCcL9TS-URJIPFGsiH_VYUcGKwJCVtJ1WHUhyWerCiNeZ5fVsnDBIniAWl-av-mFwQYJOTe7j2-aebRcSuNgBqYB2N-uxO0cGcLin7eBiWm6BPWYpcp47fnZ07_3pYcDPESvf0JzduJOn3X0VoYm6oGmVGI" style="margin-left: 0px; margin-top: -85px;" width="610" /></span></span></span></p></span><h2 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 0pt;"><br /></h2><div><span style="font-family: inherit; font-size: x-large;"><b>Orientation and resizability restrictions</b></span></div><div><span><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">With the release of the Android 17 Beta, we’re moving to the next phase of our adaptive roadmap: </span><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Android 17 (API level 37) removes the developer opt-out for orientation and resizability restrictions on </span><a href="https://developer.android.com/guide/topics/large-screens" style="font-family: inherit; text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">large screen devices</span></a><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> (sw &gt; 600 dp).</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">When your app targets SDK 37, it must be ready to adapt. Users expect their apps to work everywhere—whether multitasking on a tablet, unfolding a device, or using a desktop windowing environment—and they expect the UI to fill the space and respect their device posture.</span></span></p></span></div><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Key Changes for SDK 37</span></span></h3><span style="font-family: inherit;">Apps targeting Android 17 must ensure compatibility with the phase-out of manifest attributes and runtime APIs introduced in Android 16. When running on a large screen (smaller dimension ≥ 600dp), the following attributes and APIs will be ignored:</span></name></div><div><br /><name content="IMG" twitter:image=""><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"></span></span></p><table><tbody><tr><td><b>Manifest attributes/API</b></td><td><b>Ignored values</b></td></tr><tr><td><a href="https://developer.android.com/guide/topics/manifest/activity-element#screen" target="_blank">screenOrientation</a></td><td>portrait, reversePortrait, sensorPortrait, userPortrait, landscape, reverseLandscape, sensorLandscape, userLandscape</td></tr><tr><td><a href="https://developer.android.com/reference/android/app/Activity#setRequestedOrientation%28int%29" target="_blank">setRequestedOrientation()</a></td><td>portrait, reversePortrait, sensorPortrait, userPortrait, landscape, reverseLandscape, sensorLandscape, userLandscape</td></tr><tr><td><a href="https://developer.android.com/guide/topics/manifest/application-element#resizeableActivity" target="_blank">resizeableActivity</a></td><td>all</td></tr><tr><td><a href="https://developer.android.com/reference/android/R.attr#minAspectRatio" target="_blank">minAspectRatio</a></td><td>all</td></tr><tr><td><a href="https://developer.android.com/reference/android/R.attr#maxAspectRatio" target="_blank">maxAspectRatio</a></td><td>all</td></tr></tbody></table><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span face="'Google Sans Text',sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-7a5177b0-7fff-0fb9-6856-afc57961ed35"></span></span></p><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 0pt;"><span style="white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;"><br /></span></span></h3><div style="line-height: 1.38; margin-bottom: 4pt; margin-top: 0pt; text-align: left;"><span id="docs-internal-guid-2195ce25-7fff-b830-c835-1cbff1e52b85"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Exemptions and User Control</span></span></span></div><div style="line-height: 1.38; margin-bottom: 4pt; margin-top: 0pt;"><span id="docs-internal-guid-1dd3cc92-7fff-f760-12ef-9a244503b3f7"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">These changes are specific to large screens; they </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">do not apply</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> to screens smaller than sw600dp (including traditional slate form factor phones). Additionally, apps categorized as games (based on the </span><a href="https://developer.android.com/guide/topics/manifest/application-element#appCategory" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">android:appCategory</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> flag) are exempt from these restrictions.</span></span></p></span><span><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">It is also important to note that users remain in control. They can explicitly opt-in/out to using an app’s default behavior via the system's aspect ratio settings.</span></span></p></span><span style="font-family: inherit; font-size: large;"><b>Updates to configuration changes</b></span></div><div style="line-height: 1.38; margin-bottom: 4pt; margin-top: 0pt;"><span id="docs-internal-guid-968722f4-7fff-381e-317f-c822058f21d8"><span style="color: #073042; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">To improve app compatibility and help minimize interrupted video playback, dropped input, and other types of disruptive state loss, we are updating the default behavior for Activity recreation. Starting with Android 17, the system will no longer restart activities by default for specific configuration changes that typically do not require a UI recreation, including </span></span><a href="https://developer.android.com/reference/android/content/pm/ActivityInfo.html#CONFIG_KEYBOARD" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">CONFIG_KEYBOARD</span></a><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">,</span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/reference/android/content/pm/ActivityInfo.html#CONFIG_KEYBOARD_HIDDEN" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">CONFIG_KEYBOARD_HIDDEN</span></a><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, </span><a href="https://developer.android.com/reference/android/content/pm/ActivityInfo.html#CONFIG_NAVIGATION" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">CONFIG_NAVIGATION</span></a><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, </span><a href="https://developer.android.com/reference/android/content/pm/ActivityInfo.html#CONFIG_UI_MODE" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">CONFIG_UI_MODE</span></a><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #073042; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">(when only </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">UI_MODE_TYPE_DESK</span><span style="color: #073042; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"> is changed), </span></span><a href="https://developer.android.com/reference/android/content/pm/ActivityInfo.html#CONFIG_TOUCHSCREEN" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">CONFIG_TOUCHSCREEN</span></a><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, </span><span style="color: #073042; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">and</span></span><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/reference/android/content/pm/ActivityInfo.html#CONFIG_COLOR_MODE" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">CONFIG_COLOR_MODE</span></a><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span><span style="color: #073042; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"> Instead, running activities will simply receive these updates via</span></span><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/reference/android/app/Activity#onConfigurationChanged(android.content.res.Configuration)" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">onConfigurationChanged</span></a><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. </span><span style="color: #073042; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">If your application relies on a full restart to reload resources for these changes, you must now explicitly opt-in using the new</span></span><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">android:recreateOnConfigChanges</span><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #073042; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">manifest attribute, which allows you to specify which configuration changes should trigger a complete activity lifecycle (from stop, to destroy and creation again), together with the related constants</span></span><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/reference/android/content/res/Configuration#mcc" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">mcc</span></a><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, </span><a href="https://developer.android.com/reference/android/content/res/Configuration#mnc" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">mnc</span></a><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, </span><span style="color: #073042; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">and the new ones</span></span><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/reference/android/content/res/Configuration#keyboard" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">keyboard</span></a><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, </span><a href="https://developer.android.com/reference/android/content/res/Configuration#keyboardHidden" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">keyboardHidden</span></a><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, </span><a href="https://developer.android.com/reference/android/content/res/Configuration#navigation" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">navigation</span></a><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, </span><a href="https://developer.android.com/reference/android/content/res/Configuration#touchscreen" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">touchscreen</span></a><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> and </span><a href="https://developer.android.com/reference/android/content/res/Configuration#colorMode" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">colorMode</span></a><span face="Roboto, sans-serif" style="color: #073042; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span></span></div><div><br /></div><span style="font-family: inherit; font-size: large;"><b>Prepare Your App</b></span><div><br /></div><div><span id="docs-internal-guid-4243f742-7fff-fe91-bb5f-57dc387e69ba"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">We’ve released tools and documentation to make it easy for you. <a href="https://android-developers.googleblog.com/2026/02/prepare-your-app-for-resizability-and.html" target="_blank">Our focused blog post has more guidance</a>, with strategies to address common issues. Apps will need to support landscape and portrait layouts for window sizes across the full range of aspect ratios, as restricting orientation or aspect ratio will no longer be an option. We recommend testing your app using the </span><a href="https://developer.android.com/about/versions" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Android 17</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> Beta 1 with Pixel Tablet or Pixel Fold emulators (configured to </span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #188038; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">targetSdkPreview = "CinnamonBun"</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">)</span><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> or by using the </span><a href="https://developer.android.com/guide/topics/large-screens/large-screen-compatibility-mode" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">app compatibility framework</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> to enable </span></span><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #188038; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">UNIVERSAL_RESIZABLE_BY_DEFAULT</span><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">on Android 16 devices.</span></span></span></div><div><span><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></div><div><span><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></div><h3 dir="ltr" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 0pt;"><span style="font-weight: normal;"><div><span style="font-family: inherit; font-size: xx-large; font-weight: 700; white-space-collapse: preserve;">Performance</span></div></span></h3><div><span face="'Google Sans Text',sans-serif" style="color: black;"><h3 dir="ltr" style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.2; margin-bottom: 4pt; margin-top: 14pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-1066c108-7fff-6a69-8949-579f1e5f5e24" style="font-weight: normal;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit; font-size: large;">Lock-free MessageQueue</span></span></span></h3><span style="background-color: transparent; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span><p dir="ltr" style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-8075debe-7fff-9e17-f147-45eea16540ce"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">In </span><a href="https://developer.android.com/about/versions" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">Android 17</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">, apps targeting SDK 37 or higher will receive a new implementation of </span><a href="https://developer.android.com/reference/android/os/MessageQueue" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">android.os.MessageQueue</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> where the implementation is lock-free. The new implementation improves performance and reduces missed frames, but may break clients that reflect on </span><a href="https://developer.android.com/reference/android/os/MessageQueue" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">MessageQueue</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> private fields and methods.</span></span></span></p><h3 dir="ltr" style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.2; margin-bottom: 4pt; margin-top: 14pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-7b0d59ee-7fff-d74c-cf41-c190d73d2bcc" style="font-weight: normal;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit; font-size: large;">Generational garbage collection</span></span></span></h3><div style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit;"><br /></span></span></div><p dir="ltr" style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-134b0b8b-7fff-9350-d2ff-21430f0867e0"><span style="font-family: inherit;"><a href="https://developer.android.com/about/versions" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">Android 17</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> introduces generational garbage collection to </span><a href="https://developer.android.com/guide/platform#art" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">ART</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">'s Concurrent Mark-Compact collector. This optimization introduces more frequent, less resource-intensive young-generation collections alongside full-heap collections. aiming to reduce overall garbage collection CPU cost and time duration. ART improvements are also available to over a billion devices running Android 12 (API level 31) and higher through Google Play System updates.</span></span></span></p><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Static final fields now truly final</span></span></h3><p dir="ltr" style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-37f785bf-7fff-b8f3-cf10-8a49d6722e0b"></span></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Starting from Android 17 apps targeting Android 17 or later won’t be able to modify “static final” fields, allowing the runtime to apply performance optimizations more aggressively. An attempt to do so via reflection (and deep reflection) will always lead to IllegalAccessException being thrown. Modifying them via JNI’s SetStatic&lt;Type&gt;Field methods family will immediately crash the application.</span></span></p><h3 dir="ltr" style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.2; margin-bottom: 4pt; margin-top: 14pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Custom Notification View Restrictions</span></span></h3><p dir="ltr" style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">To reduce memory usage we are restricting the size of </span><a href="https://developer.android.com/develop/ui/views/notifications/custom-notification" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">custom notification views</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. This update closes a loophole that allows apps to bypass existing limits using URIs. This behavior is gated by the target SDK version and takes effect for apps targeting API 37 and higher.</span></span></p><h3 dir="ltr" style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.2; margin-bottom: 4pt; margin-top: 14pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">New performance debugging ProfilingManager triggers</span></span></h3><p dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">We’ve introduced several new system triggers to </span></span><a href="https://developer.android.com/topic/performance/tracing/profiling-manager/overview" style="text-decoration: none;"><span face="Arial,sans-serif" style="-webkit-text-decoration-skip: none; background-color: transparent; color: #1155cc; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre;">ProfilingManager</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"> to help you collect in-depth data to debug performance issues. These triggers are</span></span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><a href="https://developer.android.com/reference/android/os/ProfilingTrigger#TRIGGER_TYPE_COLD_START" style="text-decoration: none;"><span face="Arial,sans-serif" style="-webkit-text-decoration-skip: none; background-color: transparent; color: #1155cc; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre;">TRIGGER_TYPE_COLD_START</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">, </span></a><a href="https://developer.android.com/reference/android/os/ProfilingTrigger#TRIGGER_TYPE_OOM" style="text-decoration: none;"><span face="Arial,sans-serif" style="-webkit-text-decoration-skip: none; background-color: transparent; color: #1155cc; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre;">TRIGGER_TYPE_OOM</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">, </span></span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">and</span></span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><a href="https://developer.android.com/reference/android/os/ProfilingTrigger#TRIGGER_TYPE_KILL_EXCESSIVE_CPU_USAGE" style="text-decoration: none;"><span face="Arial,sans-serif" style="-webkit-text-decoration-skip: none; background-color: transparent; color: #1155cc; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre;">TRIGGER_TYPE_KILL_EXCESSIVE_CPU_USAGE</span><span face="Arial,sans-serif" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">.</span></a></p><p dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><br /></p><p dir="ltr" style="background-color: white; font-style: normal; font-variant: normal; font-weight: 400; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-d604133b-7fff-b9a0-3a1e-e37d5790896e"><span style="font-family: inherit;"><span style="background-color: transparent; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;">To understand how to set up the new system triggers, check out the </span><a href="https://developer.android.com/topic/performance/tracing/profiling-manager/trigger-based-capture" style="text-decoration-line: none;"><span style="background-color: transparent; color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">trigger-based profiling</span></a><span style="background-color: transparent; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> and </span><a href="https://developer.android.com/topic/performance/tracing/profiling-manager/retrieve-and-analyze" style="text-decoration-line: none;"><span style="background-color: transparent; color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">retrieve and analyze profiling data</span></a><span style="background-color: transparent; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> documentation.</span></span></span></p><div style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></div><div style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-55f5c8b6-7fff-efa1-c315-007fadeacdaf"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit; font-size: x-large;">Media and Camera</span></span></span></div><div style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit;"><br /></span></span></span></div><div style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-4c617e9d-7fff-38c4-ecba-e3003fd9fc70"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit;">Android 17 brings professional-grade tools to media and camera apps, with features like seamless transitions and standardized loudness.</span></span></span></div><div style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></div></span><div style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit; font-size: large;"><b>Dynamic Camera Session Updates</b></span><br /><span face="'Google Sans Text',sans-serif" style="color: black;"><span id="docs-internal-guid-754b342e-7fff-7ea6-e840-9144584abe4c"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-line: none; vertical-align: baseline; white-space: pre-wrap;"><div style="font-family: Arial, sans-serif; font-size: 11pt;"><span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"><br /></span></span></div></span></span><span id="docs-internal-guid-fa2d46b8-7fff-42d3-5b5b-f1a77d5d0dad"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">We have introduced</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">updateOutputConfigurations</span><a href="https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">()</span></a><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">to </span></span><a href="https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">CameraCaptureSession</span></a><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">This allows you to dynamically attach and detach output surfaces without the need to reconfigure the entire camera capture session. This change enables seamless transitions between camera use cases and modes (such as shooting still images vs shooting videos) without the memory cost and code complexity of configuring and holding onto all camera output surfaces that your app might need during camera start up. This helps to eliminate user-visible glitches or freezes during operation.</span></span></span></span></div><span face="'Google Sans Text',sans-serif" style="color: black;"><div style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"><br /></span></span></span></div><div style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: blue;">fun</span> updateCameraSession(session: CameraCaptureSession, newOutputConfigs: List&lt;OutputConfiguration&gt;)) { <span style="color: green;">// Dynamically update the session without closing and reopening</span> <span style="color: blue;">try</span> { <span style="color: green;">// Update the output configurations</span> session.updateOutputConfigurations(newOutputConfigs) } <span style="color: blue;">catch</span> (e: CameraAccessException) { <span style="color: green;">// Handle error</span> } }</pre></div></span></div></name><div><name content="IMG" twitter:image=""><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-47baeeaf-7fff-bd04-94d1-50588033277c"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Logical multi-camera device metadata</span></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span id="docs-internal-guid-5295d0ed-7fff-bb4a-82f5-92b9c536dcaf"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">When working with logical cameras that combine multiple physical camera sensors, you can now request additional metadata from all active physical cameras involved in a capture, not just the primary one. Previously, you had to implement workarounds, sometimes allocating unnecessary physical streams, to obtain metadata from secondary active cameras (e.g., during a lens switch for zoom where a follower camera is active). This feature introduces a new key, </span></span><a href="https://developer.android.com/reference/android/hardware/camera2/CaptureRequest#LOGICAL_MULTI_CAMERA_ADDITIONAL_RESULTS" style="text-decoration-line: none;"><span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">LOGICAL_MULTI_CAMERA_ADDITIONAL_RESULTS</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">, in</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/reference/android/hardware/camera2/CaptureRequest" style="text-decoration-line: none;"><span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">CaptureRequest</span></a><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">and</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/reference/android/hardware/camera2/CaptureResult" style="text-decoration-line: none;"><span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">CaptureResult</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">. By setting this key to ON in your </span></span><a href="https://developer.android.com/reference/android/hardware/camera2/CaptureRequest" style="text-decoration-line: none;"><span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">CaptureRequest</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">, the</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/reference/android/hardware/camera2/TotalCaptureResult" style="text-decoration-line: none;"><span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">TotalCaptureResult</span></a><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> w</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">ill include metadata from these additional active physical cameras. You can access this comprehensive metadata using </span></span><a href="https://developer.android.com/reference/android/hardware/camera2/TotalCaptureResult#getPhysicalCameraTotalResults()" style="text-decoration-line: none;"><span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">TotalCaptureResult.getPhysicalCameraTotalResults()</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"> to get more detailed information that may enable you to optimize resource usage in your camera applications.</span></span></span></p><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 4pt; margin-top: 14pt;"><span style="font-family: inherit; font-size: x-large; white-space-collapse: preserve;">Versatile Video Coding (VVC) Support</span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-646ca2a8-7fff-4ef7-c420-916b50515c37"></span></span></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><a href="https://developer.android.com/about/versions" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Android 17</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> adds support for the </span><a href="https://developer.android.com/guide/topics/media/media-formats#video-formats" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Versatile Video Coding (VVC)</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> standard. This includes defining the </span><a href="https://developer.android.com/guide/topics/media/media-formats#video-formats" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">video/vvc</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> MIME type in </span><a href="https://developer.android.com/reference/android/media/MediaFormat" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">MediaFormat</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, adding new VVC profiles in </span><a href="https://developer.android.com/reference/android/media/MediaCodecInfo" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">MediaCodecInfo</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, and integrating support into </span><a href="https://developer.android.com/reference/android/media/MediaExtractor" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">MediaExtractor</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. This feature will be coming to devices with hardware decode support and capable drivers.</span></span></p><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 4pt; margin-top: 14pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Constant Quality for Video Recording</span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-cdb2c501-7fff-5ac1-fe99-69646a32a140"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">We have added</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/reference/android/media/MediaRecorder#setVideoQuality(int)" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">setVideoEncodingQuality()</span></a><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">to</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/reference/android/media/MediaRecorder" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">MediaRecorder</span></a><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"> This allows you to configure a constant quality (CQ) mode for video encoders, giving you finer control over video quality beyond simple bitrate settings.</span></span></span></p><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 4pt; margin-top: 14pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Background Audio Hardening</span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Starting in Android 17, the audio framework will enforce restrictions on background audio interactions including audio playback, </span><a href="https://developer.android.com/media/optimize/audio-focus" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">audio focus</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> requests, and </span><a href="https://developer.android.com/reference/android/media/AudioManager#adjustStreamVolume(int,%20int,%20int)" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">volume change</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> APIs to ensure that these changes are started intentionally by the user.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span><span><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">If the app tries to call audio APIs while the application is not in a valid lifecycle, the audio playback and volume change APIs will fail silently without an exception thrown or failure message provided. The audio focus API will fail with the result code </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">AUDIOFOCUS_REQUEST_FAILED</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">.</span></span></span></span></p><h2 dir="ltr" style="line-height: 1.2; margin-bottom: 4pt; margin-top: 18pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;">Privacy and Security</span></span></h2><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 4pt; margin-top: 14pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Deprecation of Cleartext Traffic Attribute</span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-e5b1de3e-7fff-c800-20c3-abad994fb01c"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">The</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/guide/topics/manifest/application-element#usesCleartextTraffic" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">android:usesCleartextTraffic</span></a><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">attribute is now deprecated. If your app targets (Android 17) or higher and relies on</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">usesCleartextTraffic="true"</span><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> without a corresponding </span><a href="https://developer.android.com/training/articles/security-config" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Network Security Configuration</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, it will default to disallowing cleartext traffic. You are encouraged to migrate to </span><a href="https://developer.android.com/training/articles/security-config" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Network Security Configuration</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> files for granular control.</span></span></span></p><span id="docs-internal-guid-e7ae648e-7fff-6b1b-0d26-632c3278857c"><div><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-size: large;"><div style="line-height: 1.2; margin-bottom: 4pt; margin-top: 14pt; text-align: left; white-space-collapse: collapse;"><span style="color: black; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;"><b>HPKE Hybrid Cryptography</b></span></span></div></span></span></div><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">We are introducing a public </span><a href="https://developer.android.com/reference/android/crypto/hpke/HpkeSpi" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Service Provider Interface (SPI)</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> for an implementation of HPKE hybrid cryptography, enabling secure communication using a combination of public key and symmetric encryption (</span><a href="http://developer.android.com/reference/android/crypto/hpke/AeadParameterSpec" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">AEAD</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">).</span></span></p></span><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit; font-size: xx-large; font-weight: 700; white-space-collapse: preserve;">Connectivity and Telecom</span></p><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 4pt; margin-top: 14pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Enhanced VoIP Call History</span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-58c44997-7fff-435b-e253-ad1f12fb3cd0"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">We are introducing user preference management for app VoIP call history integration. This includes support for caller and participant avatar URIs in the system dialer, enabling granular user control over call log privacy and enriching the visual display of integrated VoIP call logs.</span></span></span></p><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 4pt; margin-top: 14pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Wi-Fi Ranging and Proximity</span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><a href="https://developer.android.com/guide/topics/connectivity/wifi-rtt" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Wi-Fi Ranging</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> has been enhanced with new Proximity Detection capabilities, supporting continuous ranging and secure peer-to-peer discovery. Updates to </span><a href="https://developer.android.com/guide/topics/connectivity/wifi-aware" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Wi-Fi Aware</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> ranging include new APIs for peer handles and PMKID caching for 11az secure ranging.</span></span></p><h2 dir="ltr" style="line-height: 1.2; margin-bottom: 4pt; margin-top: 18pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;">Developer Productivity and Tools</span></span></h2><h3 dir="ltr" style="line-height: 1.2; margin-bottom: 4pt; margin-top: 14pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: large;">Updates for companion device apps</span></span></h3><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-e83e967d-7fff-5160-5211-e69cb95ab6ea"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">We have introduced two new profiles to the</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/guide/topics/connectivity/companion-device-pairing" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">CompanionDeviceManager</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"> to improve device distinction and permission handling:</span></span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Medical Devices:</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> This profile allows medical device mobile applications to request all necessary permissions with a single tap, simplifying the setup process.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 0pt;"><span id="docs-internal-guid-bc1cb96d-7fff-bf99-f608-1f9db2914b75"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Fitness Trackers:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> The</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> </span><a href="https://developer.android.com/reference/android/companion/AssociationRequest#DEVICE_PROFILE_FITNESS_TRACKER" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-wrap-mode: wrap; vertical-align: baseline;">DEVICE_PROFILE_FITNESS_TRACKER</span></a><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"><span style="font-family: inherit;">profile allows companion apps to explicitly indicate they are managing a fitness tracker. This ensures accurate user experiences with distinct icons while reusing existing watch role permissions.</span></span></span></p></li></ul><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-78400345-7fff-0e11-e6a3-fb7445e19cf3"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Also, the </span></span><a href="https://developer.android.com/guide/topics/connectivity/companion-device-pairing" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">CompanionDeviceManager</span></a><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">now offers a unified dialog for device association and Nearby permission requests. You can leverage the new</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/reference/android/companion/AssociationRequest.Builder#setExtraPermissions(java.util.Set%3Cjava.lang.String%3E)" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">setExtraPermissions</span></a><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">method in</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><a href="https://developer.android.com/reference/android/companion/AssociationRequest.Builder" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">AssociationRequest.Builder</span></a><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">to bundle nearby permission prompts within the existing association flow, reducing the number of dialogs presented to the user.</span></span></span></p><span style="font-family: inherit; font-size: x-large;"><b>Get started with Android 17</b></span></name></div><div><name content="IMG" twitter:image=""><span id="docs-internal-guid-1a94494b-7fff-36be-df12-88c67fc2f56c"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">You can </span><a href="https://www.google.com/android/beta" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">enroll any supported Pixel device</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to get this and future Android Beta updates over-the-air. If you don’t have a Pixel device, you can </span><a href="https://developer.android.com/about/versions/17/get#on_emulator" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">use the 64-bit system images with the Android Emulator</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in Android Studio.</span></span></p></span><span><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">If you are currently in the Android Beta program, you will be offered an over-the-air update to Beta 1.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">If you have Android 26Q1 Beta and would like to take the final stable release of 26Q1 and exit Beta, you need to ignore the over-the-air update to 26Q2 Beta 1 and wait for the release of 26Q1.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">We're looking for your feedback so please </span><a href="https://developer.android.com/about/versions/17/feedback" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">report issues and submit feature requests</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> on the </span><a href="https://developer.android.com/about/versions/16/feedback" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">feedback page</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. The earlier we get your feedback, the more we can include in our work on the final release.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">For the best development experience with Android 17, we recommend that you use the latest preview of </span><a href="https://developer.android.com/studio/preview" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Android Studio (Panda)</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. Once you’re set up, here are some of the things you should do:</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="2" dir="ltr" style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: 36pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Compile against the new SDK, test in CI environments, and report any issues in our tracker on the </span><a href="https://developer.android.com/about/versions/17/feedback" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">feedback page</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: #202124; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: 36pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Test your current app for compatibility, learn whether your app is affected by changes in Android 17, and install your app onto a device or emulator running Android 17 and extensively test it.</span></span></p></li></ul><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">We’ll update the </span><a href="https://developer.android.com/about/versions/17/download" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">preview/beta system images</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and SDK regularly throughout the Android 17 release cycle. Once you’ve installed a beta build, you’ll automatically get future updates over-the-air for all later previews and Betas.</span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span id="docs-internal-guid-237c3aae-7fff-5cbd-cfa4-76554bc2affc"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">For complete information, visit the </span><a href="https://developer.android.com/about/versions/17" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Android 17 developer site</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span><span><span style="font-family: inherit; font-size: large; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-e27ac50d-7fff-d401-41d1-a09dcadbb92f"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">Join the conversation</span></span></span></span></span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-717838d6-7fff-c538-df2d-6378ec650f5d"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">As we move toward </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Platform Stability</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> and the final stable release of Android 17 later this year, your feedback remains our most valuable asset. Whether you’re an </span><a href="https://www.reddit.com/r/android_canary/" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">early adopter on &nbsp; the Canary channel</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> or an </span><a href="https://www.reddit.com/r/android_beta/" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">app developer testing on Beta 1</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, consider joining our communities and filing feedback. We’re listening.</span></span></span></p></span><p></p></name></div></div></div>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-88632914828776802682026-01-29T09:00:00.000-08:002026-01-29T09:00:00.128-08:00Accelerating your insights with faster, smarter monetization data and recommendations<name content="IMG" twitter:image=""><p><em>Posted by&nbsp;</em><span style="font-style: italic; white-space-collapse: preserve;"><span style="font-family: inherit;">Phalene Gowling, Product Manager, Google Play</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: inherit;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUu8IbGbe8xG6oEOPleIJJBclT5w4KzFwx0J6PDnDwjNtswk6F5V2AfGHLEIeiRAsh4aoYPRgg1TY1jd_oSNmEqN8yIUvEkKQdxc9ZlOH9dNhEGMgChsqSsNbCx2YJVxOonczumFbBr-ILpzb3fuDbe2BhCNwE5S6yR-bGd7RtOIF-EdYcJhAUptCfGrY/s4209/260127_Header.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1253" data-original-width="4209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUu8IbGbe8xG6oEOPleIJJBclT5w4KzFwx0J6PDnDwjNtswk6F5V2AfGHLEIeiRAsh4aoYPRgg1TY1jd_oSNmEqN8yIUvEkKQdxc9ZlOH9dNhEGMgChsqSsNbCx2YJVxOonczumFbBr-ILpzb3fuDbe2BhCNwE5S6yR-bGd7RtOIF-EdYcJhAUptCfGrY/s16000/260127_Header.png" /></a></span></div><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">To build a thriving business on Google Play, you need more than just data&nbsp; </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">– </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">you need a clear path to action. Today, we’re announcing a suite of upgrades to the Google Play Console and beyond, giving you greater visibility into your financial performance and specific, data-backed steps to improve it.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span><span style="background-color: transparent; color: black; font-family: inherit; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></span></p><p><span><span id="docs-internal-guid-345b2028-7fff-c651-aa6a-f452e1dea9a9" style="font-family: inherit;"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">From new, actionable recommendations to more granular sales reporting, here’s how we’re helping you maximize your ROI.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-ecdbda26-7fff-b144-a674-48fd0db048d4"><span style="font-family: inherit; font-size: x-large;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">New: Monetization insights and recommendations</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span><span style="font-family: inherit; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Launch Status: Rolling out today</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">The</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"> Monetize with Play</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> overview page is designed to be your ultimate command center. Today, we are upgrading it with a new dynamic insights section designed to </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">give you a clearer view of your revenue drivers.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"></p><div class="separator" style="clear: both;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG2PJK3eO0myJfVBYX5UaeTzmjBXj9FX_oqYFx3UjdX3tjpPzh-D7ChSh5mFXxoyj9cj379KL1CzOh_JRnWfPbanAf5aR_XgAFHOw49coGHuApSQGmJSIn3E-wSrhh_H8fshWd-RqzHt4qHwWY3p8eeXqpTkTCJmh4sGPx386iJCunarcEV0eMqdif7Ho/s16000/VOP+Recos%20(1).gif" /></div><div class="separator" style="clear: both;"><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div><div class="separator" style="clear: both;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">This new insights carousel highlights the visible and invisible value Google Play delivers to your bottom line – including recovered revenue. Alongside these insights, y</span><span style="white-space-collapse: preserve;">ou can now track these critical signals alongside your core performance metrics:</span></span></div><div class="separator" style="clear: both;"><span style="font-family: inherit; white-space-collapse: preserve;"><br /></span></div></name><span id="docs-internal-guid-e4116b9d-7fff-4204-6c17-087bd39debf2"><span style="font-family: inherit;"><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-align: left;"><li><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Optimize conversion:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> Track your new </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Cart Conversion Rate</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Reduce churn:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> Track cancelled subscriptions over time.</span></p></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Optimize pricing:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> Monitor your Average Revenue Per Paying User (ARPPU).</span></p></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-wrap-mode: wrap; vertical-align: baseline;">Increase buyer reach:</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-wrap-mode: wrap; vertical-align: baseline;"> Analyze how much of your engaged audience convert to buyers.</span></p></li></ul></span></span><span><span style="font-family: inherit;"><div><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">But we aren’t just showing you the data – we’re helping you act on it</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. Starting today, Play Console will surface customized, </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">actionable recommendations</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. If there are relevant opportunities – for example, a high churn rate – we will suggest specific, high-impact steps to help you reach your next monetization goal. Recommendations include effort levels and estimated ROI (where available), helping you prioritize your roadmap based on actual business value. </span><a href="https://support.google.com/googleplay/android-developer/answer/16770947" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Learn more</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span></span></div><div><span id="docs-internal-guid-0e3541ed-7fff-eeb6-8b17-7ab0bae48408"><div><br /></div></span></div></span></span><div><span><span style="font-family: inherit;"><br /></span></span><div class="separator" style="clear: both;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_FupxqyHb3fm18u-MwmVOQQJ03q1oP83VNdLjgPIDFJyJfZC3VA3CHw87e5lTiC3UbHA5nsn8SiANsF1vVk344AyGZGVbfkYY0itRhTfO3JeQDmmkind4ZEVluipANEEwqsiU9A_EiwZyIF0AuabfwV2pFp1uTdobdjK7STe0Q6CWb6cPIPo7_wtDq2Q/s16000/Recos.png" /></div><div class="separator" style="clear: both;"><span style="font-family: inherit; font-size: x-large; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div><div class="separator" style="clear: both;"><span style="font-family: inherit; font-size: x-large; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Granular visibility: Sales Channel reporting</span><span style="font-family: inherit; font-size: x-large; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span></div><div class="separator" style="clear: both;"><span style="font-style: italic; white-space-collapse: preserve;"><span style="font-family: inherit;">Launch Status: Recently launched</span></span></div></div><span><span style="font-family: inherit;"><span id="docs-internal-guid-0232a2b0-7fff-95d7-7139-7c41d4b515eb"><div><span style="font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-444ea79a-7fff-321c-0a0a-ad9e1467ed9f"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">We recently rolled out new </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Sales Channel data</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in your financial reporting. This allows you to attribute revenue to specific surfaces - including your app, the Play Store, and platforms like Google Play Games on PC.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span><span id="docs-internal-guid-497347cd-7fff-6bd8-203e-f29d90b1b420" style="font-family: inherit;"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">For native-PC game developers and media &amp; entertainment subscription businesses alike, this granularity allows you to calculate the precise ROI of your cross-platform investments and understand exactly which channels are driving your growth. </span><a href="https://support.google.com/googleplay/android-developer/answer/6135870#zippy=%2Cestimated-sales" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Learn more</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p><div style="font-family: Arial, sans-serif; font-size: 11pt;"><span style="font-size: 11pt; font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><br /></span></div></span></span></div></span></span></span><div class="separator" style="clear: both;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqeq3IqcooM2gNTJi7fVGvw49OF8ocTaj0FZg6CZF-s0xwar5pq7zNC6GuYc6COEKzOqwmb7HmLkEzpao3ybFRkZFMxFI4BB_uIJfwen3MzmI24vaK9bN7w5FfA5-FTk1tkPo9_N__cEO3MeTe74ZeoQtGDMGGQ-Ny5yMBSTKUW9e7pASztV670aEIdH0/s16000/20_download.gif" /></div><div class="separator" style="clear: both;"><span style="font-family: inherit; font-size: x-large; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div><div class="separator" style="clear: both;"><span style="font-family: inherit; font-size: x-large; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Operational efficiency: The Orders API</span><span style="font-family: inherit; font-size: x-large; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span></div><div class="separator" style="clear: both;"><span style="font-family: inherit; font-style: italic; white-space-collapse: preserve;">Launch Status: Available now</span></div><span><span style="font-family: inherit;"><span id="docs-internal-guid-598fa3a1-7fff-f90f-7c15-06df086d902c" style="font-family: inherit;"><div><span style="font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-598fa3a1-7fff-f90f-7c15-06df086d902c"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-5e506628-7fff-55f4-43a4-ead966fb356f"><span><span style="font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">The </span><a href="https://developers.google.com/android-publisher/api-ref/rest/v3/orders" style="text-decoration-line: none;"><span style="color: #1155cc; font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">Orders API</span></a><span style="font-style: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> provides programmatic access to one-time and recurring order transaction details. If you haven't integrated it yet, this API allows you to ingest real-time data directly into your internal dashboards for faster reconciliation and improved customer support.</span></span></span></p></span></span></div></span></span></span><div class="separator" style="clear: both;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRm6oskAWoQqp64r1eyOonGHsXbRjubwH9emshyphenhyphen6Rd4yMbMklBf5WBQcXWanyj6qiwcA3JBtu-vTU7uw7ouyt6WwrJBc8OSEJ5ZuFkLeWLOoioCAprr-i006Ykg8Ewn3Dp4WobAkIvBsJ6VGXnbkR8WZrenez7UfZnPzbqpauNM74baDpFHmg8bSUhT1Q/s16000/Frame%201739328245.png" /></div><div class="separator" style="clear: both;"><span style="font-family: inherit; white-space-collapse: preserve;">Feedback so far has been overwhelmingly positive: </span></div><span><span style="font-family: inherit;"><div><span style="font-family: inherit;"><blockquote><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Level Infinite (Tencent) </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">says the API </span><span style="font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">&nbsp;“works so well that we want every app to use it."</span></blockquote></span></div><div><span id="docs-internal-guid-dbd2c3c4-7fff-567b-08bd-1fbb6d50ea36"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit; font-size: x-large;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Continuous improvements towards objective-led reporting</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">You’ve told us that the biggest challenge isn't just accessing data, but connecting the dots across different metrics to see the full picture. We’re enhancing reporting that goes beyond data dumps to provide straightforward, actionable insights that help you reach business objectives faster.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span id="docs-internal-guid-7cb3419b-7fff-8f74-3af6-346681e9f278"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Our goal is to create a more cohesive product experience centered around </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">your</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">objectives</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">. By shifting from static reporting to dynamic, goal-orientated tools, we’re making it easier to track and optimize for revenue, conversion rates, and churn. These updates are just the beginning of a transformation designed to help you turn data into measurable growth.</span></span></span></p><div><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div></span></div><div><span style="white-space-collapse: preserve;"><br /></span></div><div><span style="white-space-collapse: preserve;"><br /></span></div><div><span style="white-space-collapse: preserve;"><br /></span></div><div><span style="white-space-collapse: preserve;"><br /></span></div><div><span style="white-space-collapse: preserve;"><br /></span></div><div><span style="white-space-collapse: preserve;"><br /></span></div><div><span style="white-space-collapse: preserve;"><br /></span></div></span></span>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-50247444245921303442026-01-28T09:00:00.000-08:002026-02-03T06:44:56.317-08:00How Automated Prompt Optimization Unlocks Quality Gains for ML Kit’s GenAI Prompt API<name content="IMG" twitter:image=""><p><em>Posted by Chetan Tekur, PM at AI Innovation and Research, Chao Zhao, SWE at AI Innovation and Research, Paul Zhou, Prompt Quality Lead at GCP Cloud AI and Industry Solutions, and Caren Chang, Developer Relations Engineer at Android</em></p><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzM3vaSLDllo5iph05S1l97RLQ1XKgYStArRkBvdEJ2qejXt-frMkDB_qHxsjoVEQDVXCPjOUYwtXDLB91MaeddmZsFqgeWKFyokTcWTMRY2rxuGp9Y-5ZCRDc7SfivBUukNaC3wmLfVMzykxvl3fm3kh_Be_C-Zo2BdeJhU87mddSniZTJGa0efyWd9Y/s4209/Prompt-API-Banner%20(1).png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1253" data-original-width="4209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzM3vaSLDllo5iph05S1l97RLQ1XKgYStArRkBvdEJ2qejXt-frMkDB_qHxsjoVEQDVXCPjOUYwtXDLB91MaeddmZsFqgeWKFyokTcWTMRY2rxuGp9Y-5ZCRDc7SfivBUukNaC3wmLfVMzykxvl3fm3kh_Be_C-Zo2BdeJhU87mddSniZTJGa0efyWd9Y/s16000/Prompt-API-Banner%20(1).png" /></a></div><span style="font-family: inherit;"><br /><span id="docs-internal-guid-e305b9fe-7fff-1e4b-b89c-fc9b239792e5"><span style="font-family: inherit;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="color: #1f1f1f; white-space-collapse: preserve;"><b><span style="font-family: inherit; font-size: x-large;">Automated Prompt Optimization (APO)</span></b></span></p></span></span></span></name><div><name content="IMG" twitter:image=""><span id="docs-internal-guid-ea993e2b-7fff-8452-d660-3bc80be09d93"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">To further help bring your ML Kit Prompt API use cases to production, we are excited to announce </span><a href="https://docs.cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/zero-shot-optimizer#optimizing_for_smaller_models" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Automated Prompt Optimization (APO) targeting On-Device models on Vertex AI</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. Automated Prompt Optimization is a tool that helps you automatically find the optimal prompt for your use cases.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The era of On-Device AI is no longer a promise—it is a production reality. With the release of </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Gemini Nano v3</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, we are placing unprecedented language understanding and multimodal capabilities directly into the palms of users. Through the Gemini Nano family of models, we have wide coverage of supported devices across the Android Ecosystem. But for developers building the next generation of intelligent apps, access to a powerful model is only step one. The real challenge lies in </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">customization</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">: How do you tailor a foundation model to expert-level performance for your specific use case without breaking the constraints of mobile hardware?</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">In the server-side world, the larger LLMs tend to be highly capable and require less domain adaptation. Even when needed, more advanced options such as LoRA (Low-Rank Adaptation) fine-tuning can be feasible options. However, the unique architecture of Android AICore prioritizes a </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">shared, memory-efficient system model</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. This means that deploying custom LoRA adapters for every individual app comes with challenges on these shared system services.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">But there is an alternate path that can be equally impactful. By leveraging </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Automated Prompt Optimization (APO)</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> on Vertex AI, developers can achieve quality approaching fine-tuning, all while working seamlessly within the native Android execution environment. By focusing on superior system instruction, APO enables developers to tailor model behavior with greater robustness and scalability than traditional fine-tuning solutions.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span id="docs-internal-guid-5c954ba0-7fff-cdf3-65af-51fe569d5d6b"><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Note: </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Gemini Nano V3 is a quality optimized version of the highly acclaimed </span><a href="https://developers.googleblog.com/en/introducing-gemma-3n/" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Gemma 3N</span></a><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> model. Any prompt optimizations that are made on the open source Gemma 3N model will apply to Gemini Nano V3 as well. On </span><a href="https://developers.google.com/ml-kit/genai#prompt-device" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">supported devices</span></a><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, ML Kit GenAI APIs leverage the </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">nano-v3</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> model to maximize the quality for Android Developers</span></span></span></p><div><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4O-6TGBs-g06EHQHaDaoJRSlG5LrgeZfwGHwzBdM87LkbrQ0s6OZVD5J5SXufoy07KdcB10qIy7iAopssbt1fKJpPpWheSHdbETtg8Vyt9ZDn-Yy6xUhGl2WFkVe5LcR-6zhN-t3texV_arqoDIwmz8UlULlzmZ4M17uMBdraiJtEh_vRa4G8S3jGuDY/s960/APO%20block%20diagram.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="960" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4O-6TGBs-g06EHQHaDaoJRSlG5LrgeZfwGHwzBdM87LkbrQ0s6OZVD5J5SXufoy07KdcB10qIy7iAopssbt1fKJpPpWheSHdbETtg8Vyt9ZDn-Yy6xUhGl2WFkVe5LcR-6zhN-t3texV_arqoDIwmz8UlULlzmZ4M17uMBdraiJtEh_vRa4G8S3jGuDY/s16000/APO%20block%20diagram.jpg" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div></span></div></span></name></div><div><name content="IMG" twitter:image=""><span id="docs-internal-guid-a60a3ab8-7fff-6d1f-553d-9011b03e465a"><span style="font-family: inherit;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">APO treats the prompt not as a static text, but as a programmable surface that can be optimized. It leverages server-side models (like Gemini Pro and Flash) to propose prompts, evaluate variations and find the optimal one for your specific task. This process employs three specific technical mechanisms to maximize performance:</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="font-family: inherit;"><span id="docs-internal-guid-6685dd1c-7fff-204c-93e0-3bae18fad340"></span></span></p><ol style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; margin-left: -12pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Automated Error Analysis:</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> APO analyzes error patterns from training data to Automatically identify specific weaknesses in the initial prompt.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; margin-left: -12pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Semantic Instruction Distillation:</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> It analyzes massive training examples to distill the "true intent" of a task, creating instructions that more accurately reflect the real data distribution.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; margin-left: -12pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Parallel Candidate Testing:</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> Instead of testing one idea at a time, APO generates and tests numerous prompt candidates in parallel to identify the global maximum for quality.</span></span></p></li></ol><div><span style="color: #1f1f1f;"><span style="white-space-collapse: preserve;"><br /></span></span></div><div><span id="docs-internal-guid-638fae10-7fff-cef2-e426-75382acd45f1"><h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: x-large;">Why APO Can Approach Fine Tuning Quality</span></span></h2><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">It is a common misconception that fine-tuning always yields better quality than prompting. For modern foundation models like Gemini Nano v3, prompt engineering can be impactful by itself:</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: -12.75pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Preserving General capabilities:</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> Fine-tuning ( PEFT/LoRA) forces a model's weights to over-index on a specific distribution of data. This often leads to "catastrophic forgetting," where the model gets better at your specific syntax but worse at general logic and safety. APO leaves the weights untouched, preserving the capabilities of the base model.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: -12.75pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Instruction Following &amp; Strategy Discovery:</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> Gemini Nano v3 has been rigorously trained to follow complex system instructions. APO exploits this by finding the </span><span style="background-color: transparent; color: #1f1f1f; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">exact</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> instruction structure that unlocks the model's latent capabilities, often discovering strategies that might be hard for human engineers to find.&nbsp;</span></span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span id="docs-internal-guid-55aac14a-7fff-9bab-3900-ba14ee98dd83"><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">To validate this approach, we evaluated APO across diverse production workloads. Our validation has shown consistent </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">5-8% accuracy gains</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> across various use cases.Across multiple deployed on-device features, APO provided significant quality lifts.</span></span></span></p><div dir="ltr" style="margin: 0px auto; width: fit-content;"></div><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /><br /></span></span><p></p><h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 6pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit; font-size: x-large;"><span id="docs-internal-guid-641026f9-7fff-7618-0512-c76ffd65aaad" style="font-weight: normal;"><div align="left" dir="ltr" style="margin-left: -20.25pt;"><table style="border-collapse: collapse; border: none;"><colgroup><col width="152"></col><col width="125"></col><col width="125"></col><col width="125"></col><col width="125"></col></colgroup><tbody><tr style="height: 0pt;"><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 6pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Use Case</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 6pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Task Type</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 6pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Task Description</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 6pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Metric</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 6pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">APO Improvement</span></p></td></tr><tr style="height: 0pt;"><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Topic classification</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Text classification</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Classify a news article into topics such as finance, sports, etc</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Accuracy</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">+5%</span></p></td></tr><tr style="height: 0pt;"><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Intent classification</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Text classification</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Classify a customer service query into intents</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Accuracy</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">+8.0%</span></p></td></tr><tr style="height: 0pt;"><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Webpage translation</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Text translation</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Translate a webpage from English to a local language</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">BLEU</span></p></td><td style="background-color: #f8fafd; border-bottom: solid #000000 0.75pt; border-color: rgb(0, 0, 0); border-left: solid #000000 0.75pt; border-right: solid #000000 0.75pt; border-style: solid; border-top: solid #000000 0.75pt; border-width: 0.75pt; overflow-wrap: break-word; overflow: hidden; padding: 6pt 9pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: transparent; color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">+8.57%</span></p></td></tr></tbody></table></div></span></span></span></h2><h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-family: inherit; font-size: xx-large; white-space-collapse: preserve;">A Seamless, End-to-End Developer Workflow</span></h2><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">It is a common misconception that fine-tuning always yields better quality than prompting. For modern foundation models like Gemini Nano v3, prompt engineering can be impactful by itself:</span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: -12.75pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Preserving General capabilities:</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> Fine-tuning ( PEFT/LoRA) forces a model's weights to over-index on a specific distribution of data. This often leads to "catastrophic forgetting," where the model gets better at your specific syntax but worse at general logic and safety. APO leaves the weights untouched, preserving the capabilities of the base model.</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: -12.75pt; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Instruction Following &amp; Strategy Discovery:</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> Gemini Nano v3 has been rigorously trained to follow complex system instructions. APO exploits this by finding the </span><span style="background-color: transparent; color: #1f1f1f; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">exact</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> instruction structure that unlocks the model's latent capabilities, often discovering strategies that might be hard for human engineers to find.&nbsp;</span></span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 0pt;"><span id="docs-internal-guid-55aac14a-7fff-9bab-3900-ba14ee98dd83"><span style="font-family: inherit;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">To validate this approach, we evaluated APO across diverse production workloads. Our validation has shown consistent </span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">5-8% accuracy gains</span><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> across various use cases.Across multiple deployed on-device features, APO provided significant quality lifts.</span></span></span></p></span></div></span></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><span id="docs-internal-guid-1f807f6a-7fff-57c8-bcf4-d94f6b2cb3a0"><h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 6pt;"><span style="color: #1f1f1f; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Conclusion</span></span></h2><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The release of </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Automated Prompt Optimization (APO)</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> marks a turning point for on-device generative AI. By bridging the gap between foundation models and expert-level performance, we are giving developers the tools to build more robust mobile applications. Whether you are just starting with </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Zero-Shot Optimization</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> or scaling to production with </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Data-Driven</span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> refinement, the path to high-quality on-device intelligence is now clearer.</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Launch your on-device use cases to production today with ML Kit’s Prompt API and Vertex AI’s Automated Prompt Optimization.&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Relevant links:&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit;"><span id="docs-internal-guid-48074f87-7fff-43d7-102d-11786658c541"></span></span></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 6pt;"><span style="font-family: inherit;"><a href="https://developers.google.com/ml-kit/genai/prompt/android/get-started" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">ML Kit Prompt API</span></a><span style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">,</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><a href="https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/prompt-optimizer" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Vertex AI Prompt Optimizer documentation</span></span></a></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: #1f1f1f; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><a href="https://developers.googleblog.com/en/introducing-gemma-3n/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Gemma 3N Announcement Blog</span></span></a></p></li></ul><div><span face="&quot;Google Sans Text&quot;, sans-serif" style="color: #1f1f1f; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div></span></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-32900006518820310412026-01-27T09:00:00.000-08:002026-02-02T07:58:11.622-08:00The Embedded Photo Picker<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY1wEobfsqoXUEoE0OKVXwr70_ve9cWyEyoEXLddqYn98SHHRT3o29pWUojzFFP00wy-t0S8xfXd9AxAZssnEmaSyKIh9IaWGSCVsE_A2PWqAfm7W1YcivEREfNNgdBLgrSehRI4fv1kSoOxs4PK8yk_3GJM1qexLvdD2ONFWpIWmK4igwTwS9zhqs_AI/s1280/AndroidPhotoPicker_Blogger.gif" property="og:image"></meta> <div class="separator"></div><h1 style="text-align: left;"><name content="IMG" twitter:image=""><em style="font-size: medium; font-weight: 400;">Posted by Roxanna Aliabadi Walker, Product Manager and Yacine Rezgui, Developer Relations Engineer</em></name></h1><h1><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY1wEobfsqoXUEoE0OKVXwr70_ve9cWyEyoEXLddqYn98SHHRT3o29pWUojzFFP00wy-t0S8xfXd9AxAZssnEmaSyKIh9IaWGSCVsE_A2PWqAfm7W1YcivEREfNNgdBLgrSehRI4fv1kSoOxs4PK8yk_3GJM1qexLvdD2ONFWpIWmK4igwTwS9zhqs_AI/s16000/AndroidPhotoPicker_Blogger.gif" /></h1><span style="font-family: inherit; font-size: x-large;"><b>The Embedded Photo Picker: A more seamless way to privately request photos and videos in your app</b></span><div><span style="font-size: x-large;"><b><br /></b></span><name content="IMG" twitter:image=""><div class="separator" style="clear: both; text-align: center;"><span style="border: none; display: inline-block; height: 181px; margin-left: 1em; margin-right: 1em; overflow: hidden; width: 610px;"><img height="181" src="https://blogger.googleusercontent.com/img/a/AVvXsEjyYRSFf_nh2g6IPRK7cvFTGgrn-tcdmM_ANQ9BL4YlmLP7prxhaVjo2ujsQz2L9pTzshFwSFUXPiN-NG6gPYwV-jOSyvs-DiCKM4NIfSATmIkcDK143FEEvLkHD1OMRMsmP8s7Y_RwuRZfS4zzkYm2ZAEE5ij09jmCzNRWeA9B-FXR5PvI2t54Ikfjvjc" style="margin-left: 0px; margin-top: 0px;" width="610" /></span></div><p><span><span face="&quot;Google Sans&quot;, sans-serif" style="font-size: 16pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-3bf7a061-7fff-c0c8-dbd7-836db9733d0c"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"></span></span></span></span></p><span style="font-family: inherit;"><div><name content="IMG" twitter:image=""><span style="font-family: inherit;"><br /></span></name></div>Get ready to enhance your app's user experience with an exciting new way to use the Android photo picker! The new embedded photo picker offers a seamless and privacy-focused way for users to select photos and videos, right within your app's interface. Now your app can get all the same benefits available with the photo picker, including access to cloud content, integrated directly into your app’s experience.</span></name><div><br /></div><div><span style="font-family: inherit; font-size: x-large;"><b>Why embedded?</b></span></div><div><span style="font-family: inherit; font-size: x-large;"><span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></span></div><span id="docs-internal-guid-6d097a78-7fff-e0ae-633c-a936f3442dc3"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">We understand that many apps want to provide a highly integrated and seamless experience for users when selecting photos or videos. The embedded photo picker is designed to do just that, allowing users to quickly access their recent photos without ever leaving your app. They can also explore their full library in their preferred cloud media provider (e.g., Google Photos), including favorites, albums and search functionality. This eliminates the need for users to switch between apps or worry about whether the photo they want is stored locally or in the cloud.</span></span></span><br /><span style="font-family: inherit; font-size: x-large;"><b><br />Seamless integration, enhanced privacy</b></span><div><span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></div><div><span style="font-family: inherit;"><span id="docs-internal-guid-30392399-7fff-5950-9c88-344623faf4e7"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">With the embedded photo picker, your app doesn't need access to the user's photos or videos until they actually select something. This means greater privacy for your users and a more streamlined experience. Plus, the embedded photo picker provides users with access to their entire cloud-based media library, whereas the standard photo permission is restricted to local files only.</span></span></span></div><div><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></span></div><span style="font-family: inherit; font-size: x-large;"><b>The embedded photo picker in Google Messages</b></span><div><span style="font-family: inherit;"><br /></span></div><div><span style="font-family: inherit;">Google Messages showcases the power of the embedded photo picker. Here's how they've integrated it:</span></div><div><ul style="text-align: left;"><li><span style="font-family: inherit;"><b>Intuitive placement: </b>The photo picker sits right below the camera button, giving users a clear choice between capturing a new photo or selecting an existing one.</span></li><li><span style="font-family: inherit;"><b>Dynamic preview:</b> Immediately after a user taps a photo, they see a large preview, making it easy to confirm their selection. If they deselect the photo, the preview disappears, keeping the experience clean and uncluttered.</span></li><li><span style="font-family: inherit;"><b>Expand for more content: </b>The initial view is simplified, offering easy access to recent photos. However, users can easily expand the photo picker to browse and choose from all photos and videos in their library, including cloud content from Google Photos.</span></li><li><span style="font-family: inherit;"><b>Respecting user choices:</b> The embedded photo picker only grants access to the specific photos or videos the user selects, meaning they can stop requesting the photo and video permissions altogether. This also saves the Messages from needing to handle situations where users only grant limited access to photos and videos.</span></li></ul><div style="align-items: flex-start; clear: both; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYB1a2iMLle1b_po25Yz2BrOVmJbQsAIqSL9fDYtDYSwg7j3yWet_PK-eR8w9L4cPUW3WaIrmQKw9SzIme2zNRtgE2JtHZVySj63AHT4aYyTHvcCFX4z0SXaRpRYNgoJSKKRAyvxejQ_V4YBfdu7ToQJ-WjMId3FCXREndaIaYY2Sdv5QhGSaCKm3nOTk/s1094/Messages%20and%20collapsed-picker_optimized.gif"> <img height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYB1a2iMLle1b_po25Yz2BrOVmJbQsAIqSL9fDYtDYSwg7j3yWet_PK-eR8w9L4cPUW3WaIrmQKw9SzIme2zNRtgE2JtHZVySj63AHT4aYyTHvcCFX4z0SXaRpRYNgoJSKKRAyvxejQ_V4YBfdu7ToQJ-WjMId3FCXREndaIaYY2Sdv5QhGSaCKm3nOTk/w293-h640/Messages%20and%20collapsed-picker_optimized.gif" style="height: auto; max-width: 100%;" width="293" /> </a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSOEjOGn_EiAzqAC8_pDMkxK3hUVWdd9GiJo2mCRq0g2q1NuagelfjXJxj0qZgtZ1vKDOLeQdePLQAT6PUbDKQ5WxZEDS1hOGH1jUpSB5vO_3bx4O7btuu-bciB7bBJWh1sS2b0Z06hq6a3u3lMiE2Z3qQB66PQ948BRh8gmkupgtbVD74y6mTSLvjp9s/s902/Messages%20and%20picker_optimized.gif"> <img height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSOEjOGn_EiAzqAC8_pDMkxK3hUVWdd9GiJo2mCRq0g2q1NuagelfjXJxj0qZgtZ1vKDOLeQdePLQAT6PUbDKQ5WxZEDS1hOGH1jUpSB5vO_3bx4O7btuu-bciB7bBJWh1sS2b0Z06hq6a3u3lMiE2Z3qQB66PQ948BRh8gmkupgtbVD74y6mTSLvjp9s/w292-h640/Messages%20and%20picker_optimized.gif" style="height: auto; max-width: 100%;" width="292" /> </a> </div><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><span style="font-family: inherit; font-size: x-large;"><b>Implementation</b></span><div><span style="font-family: inherit;"><span id="docs-internal-guid-492f71a7-7fff-adfc-c8c0-bdaaaaa066bc"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Integrating the embedded photo picker is made easy with the </span><a href="https://developer.android.com/jetpack/androidx/releases/photopicker" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Photo Picker Jetpack library</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.&nbsp;&nbsp;</span></span></p></span><span><div><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-15288c3d-7fff-2a74-1da8-17ea3aabe3bd"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit; font-size: x-large;"><b>Jetpack Compose</b></span></span></span></span></div><div><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><br /></span></span></span></span></div></span></span><span style="font-family: inherit;">First, include the Jetpack Photo Picker library as a dependency.</span><span style="font-family: inherit;"><span><div><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><br /></span></span></span></span></div><div><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><pre style="color: #333333; line-height: 16.25px; margin: 0px;">implementation(<span style="color: #a31515;">"androidx.photopicker:photopicker-compose:1.0.0-alpha01"</span>)</pre></span></span></span></span></div></span></span></div><div><span style="font-family: inherit;"><br /></span></div><div><span id="docs-internal-guid-3e71b970-7fff-1cfd-c66c-99956bb7d352"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">The</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">EmbeddedPhotoPicker</span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">composable function provides a mechanism to include the embedded photo picker UI directly within your Compose screen. This composable creates a</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">SurfaceView</span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">which hosts the embedded photo picker UI. It manages the connection to the</span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">EmbeddedPhotoPicker</span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">service, handles user interactions, and communicates selected media URIs to the calling application.&nbsp; </span></span></span></div><br /><pre style="color: #333333; line-height: 16.25px; margin: 0px;">@Composable <span style="color: blue;">fun</span> EmbeddedPhotoPickerDemo() { <span style="color: green;">// We keep track of the list of selected attachments</span> <span style="color: blue;">var</span> attachments <span style="color: blue;">by</span> remember { mutableStateOf(emptyList&lt;Uri&gt;()) } <span style="color: blue;">val</span> coroutineScope = rememberCoroutineScope() <span style="color: green;">// We hide the bottom sheet by default but we show it when the user clicks on the button</span> <span style="color: blue;">val</span> scaffoldState = rememberBottomSheetScaffoldState( bottomSheetState = rememberStandardBottomSheetState( initialValue = SheetValue.Hidden, skipHiddenState = <span style="color: blue;">false</span> ) ) <span style="color: green;">// Customize the embedded photo picker</span> <span style="color: blue;">val</span> photoPickerInfo = EmbeddedPhotoPickerFeatureInfo .Builder() <span style="color: green;">// Set limit the selection to 5 items</span> .setMaxSelectionLimit(5) <span style="color: green;">// Order the items selection (each item will have an index visible in the photo picker)</span> .setOrderedSelection(<span style="color: blue;">true</span>) <span style="color: green;">// Set the accent color (red in this case, otherwise it follows the device's accent color)</span> .setAccentColor(0xFF0000) .build() <span style="color: green;">// The embedded photo picker state will be stored in this variable</span> <span style="color: blue;">val</span> photoPickerState = rememberEmbeddedPhotoPickerState( onSelectionComplete = { coroutineScope.launch { <span style="color: green;">// Hide the bottom sheet once the user has clicked on the done button inside the picker</span> scaffoldState.bottomSheetState.hide() } }, onUriPermissionGranted = { <span style="color: green;">// We update our list of attachments with the new Uris granted</span> attachments += it }, onUriPermissionRevoked = { <span style="color: green;">// We update our list of attachments with the Uris revoked</span> attachments -= it } ) SideEffect { <span style="color: blue;">val</span> isExpanded = scaffoldState.bottomSheetState.targetValue == SheetValue.Expanded <span style="color: green;">// We show/hide the embedded photo picker to match the bottom sheet state</span> photoPickerState.setCurrentExpanded(isExpanded) } BottomSheetScaffold( topBar = { TopAppBar(title = { Text(<span style="color: #a31515;">"Embedded Photo Picker demo"</span>) }) }, scaffoldState = scaffoldState, sheetPeekHeight = <span style="color: blue;">if</span> (scaffoldState.bottomSheetState.isVisible) 400.dp <span style="color: blue;">else</span> 0.dp, sheetContent = { Column(Modifier.fillMaxWidth()) { <span style="color: green;">// We render the embedded photo picker inside the bottom sheet</span> EmbeddedPhotoPicker( state = photoPickerState, embeddedPhotoPickerFeatureInfo = photoPickerInfo ) } } ) { innerPadding -&gt; Column(Modifier.padding(innerPadding).fillMaxSize().padding(horizontal = 16.dp)) { Button(onClick = { coroutineScope.launch { <span style="color: green;">// We expand the bottom sheet, which will trigger the embedded picker to be shown</span> scaffoldState.bottomSheetState.partialExpand() } }) { Text(<span style="color: #a31515;">"Open photo picker"</span>) } LazyVerticalGrid(columns = GridCells.Adaptive(minSize = 64.dp)) { <span style="color: green;">// We render the image using the Coil library</span> itemsIndexed(attachments) { index, uri -&gt; AsyncImage( model = uri, contentDescription = <span style="color: #a31515;">"Image ${</span>index + 1<span style="color: #a31515;">}"</span>, contentScale = ContentScale.Crop, modifier = Modifier.clickable { coroutineScope.launch { <span style="color: green;">// When the user clicks on the media from the app's UI, we deselect it</span> <span style="color: green;">// from the embedded photo picker by calling the method deselectUri</span> photoPickerState.deselectUri(uri) } } ) } } } } }</pre><div><span style="font-family: inherit;"><br /></span></div><span style="font-family: inherit; font-size: x-large;"><b>Views</b></span><span style="font-family: inherit;"><br /><br /></span><div><span style="font-family: inherit;">First, include the Jetpack Photo Picker library as a dependency.</span><div><br /><div><pre style="color: #333333; line-height: 16.25px; margin: 0px;">implementation(<span style="color: #a31515;">"androidx.photopicker:photopicker:1.0.0-alpha01"</span>)</pre></div><div><span face="Arial, sans-serif" style="font-size: 11pt; white-space-collapse: preserve;"><br /></span></div><div><span style="white-space-collapse: preserve;"><span style="font-family: inherit;">To add the embedded photo picker, you need to add an entry to your layout file.&nbsp; </span></span></div><div><span style="white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></span></div><div><pre style="color: #333333; line-height: 16.25px; margin: 0px;">&lt;view class=<span style="color: #a31515;">"androidx.photopicker.EmbeddedPhotoPickerView"</span> android:id=<span style="color: #a31515;">"@+id/photopicker"</span> android:layout_width=<span style="color: #a31515;">"match_parent"</span> android:layout_height=<span style="color: #a31515;">"match_parent"</span> /&gt;</pre></div><div><span style="font-family: inherit;"><br /></span></div><div><span style="font-family: inherit;">And initialize it in your activity/fragment.</span></div><div><br /></div><div><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: green;">// We keep track of the list of selected attachments</span> <span style="color: blue;">private</span> <span style="color: blue;">val</span> _attachments = MutableStateFlow(emptyList&lt;Uri&gt;()) <span style="color: blue;">val</span> attachments = _attachments.asStateFlow() <span style="color: blue;">private</span> <span style="color: blue;">lateinit</span> <span style="color: blue;">var</span> picker: EmbeddedPhotoPickerView <span style="color: blue;">private</span> <span style="color: blue;">var</span> openSession: EmbeddedPhotoPickerSession? = <span style="color: blue;">null</span> <span style="color: blue;">val</span> pickerListener = <span style="color: blue;">object</span> <span style="color: #2b91af;">EmbeddedPhotoPickerStateChangeListener</span> { <span style="color: blue;">override</span> <span style="color: blue;">fun</span> onSessionOpened (newSession: EmbeddedPhotoPickerSession) { openSession = newSession } <span style="color: blue;">override</span> <span style="color: blue;">fun</span> onSessionError (throwable: Throwable) {} <span style="color: blue;">override</span> <span style="color: blue;">fun</span> onUriPermissionGranted(uris: List&lt;Uri&gt;) { _attachments += uris } <span style="color: blue;">override</span> <span style="color: blue;">fun</span> onUriPermissionRevoked (uris: List&lt;Uri&gt;) { _attachments -= uris } <span style="color: blue;">override</span> <span style="color: blue;">fun</span> onSelectionComplete() { <span style="color: green;">// Hide the embedded photo picker as the user is done with the photo/video selection</span> } } <span style="color: blue;">override</span> <span style="color: blue;">fun</span> onCreate(savedInstanceState: Bundle?) { <span style="color: blue;">super</span>.onCreate(savedInstanceState) setContentView(R.layout.main_view) <span style="color: green;">//</span> <span style="color: green;">// Add the embedded photo picker to a bottom sheet to allow the dragging to display the full photo library</span> <span style="color: green;">//</span> picker = findViewById(R.id.photopicker) picker.addEmbeddedPhotoPickerStateChangeListener(pickerListener) picker.setEmbeddedPhotoPickerFeatureInfo( <span style="color: green;">// Set a custom accent color</span> EmbeddedPhotoPickerFeatureInfo.Builder().setAccentColor(0xFF0000).build() ) }</pre><span style="font-family: inherit;"></span><div><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;"><br /></span></span></div><div><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">You can call different methods of </span><span style="color: #188038; font-family: Roboto Mono, monospace;"><span style="font-size: 11pt; white-space-collapse: preserve;">EmbeddedPhotoPickerSession</span></span></span><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-family: inherit;">to interact with the embedded picker.</span></div><div><br /></div><div><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: green;">// Notify the embedded picker of a configuration change</span> openSession.notifyConfigurationChanged(newConfig) <span style="color: green;">// Update the embedded picker to expand following a user interaction</span> openSession.notifyPhotoPickerExpanded(<span style="color: green;">/* expanded: */</span> <span style="color: blue;">true</span>) <span style="color: green;">// Resize the embedded picker</span> openSession.notifyResized(<span style="color: green;">/* width: */</span> 512, <span style="color: green;">/* height: */</span> 256) <span style="color: green;">// Show/hide the embedded picker (after a form has been submitted)</span> openSession.notifyVisibilityChanged(<span style="color: green;">/* visible: */</span> <span style="color: blue;">false</span>) <span style="color: green;">// Remove unselected media from the embedded picker after they have been</span> <span style="color: green;">// unselected from the host app's UI</span> openSession.requestRevokeUriPermission(removedUris)</pre></div><div><span style="font-family: inherit;"><br /></span></div><div><span style="font-family: inherit;">It's important to note that the embedded photo picker experience is available for users running Android 14 (API level 34) or higher with SDK Extensions 15+. <a href="https://developer.android.com/training/data-storage/shared/photo-picker/embedded#device-availability">Read more about photo picker device availability</a>.</span></div><div><span id="docs-internal-guid-37dd1c67-7fff-4bfa-2b90-f28a2a2564ec"><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"><span style="font-family: inherit;">For enhanced user privacy and security, the system renders the embedded photo picker in a way that prevents any drawing or overlaying. This intentional design choice means that your UX should consider the photo picker's display area as a distinct and dedicated element, much like you would plan for an advertising banner.<br /><br />If you have any feedback or suggestions, submit tickets to our </span><a href="https://developer.android.com/about/versions/14/feedback#create_vote" style="text-decoration-line: none;"><span face="Arial, sans-serif" style="background-color: white; color: #1769e0; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">issue tracker</span></a><span face="Arial, sans-serif" style="background-color: white; color: #202124; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.</span></p><div><span face="Arial, sans-serif" style="background-color: white; color: #202124; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div></span></div><div><span style="font-family: inherit; font-size: x-large;"><b><br /></b></span></div></div></div></div></div>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-29542086298160238212026-01-26T19:30:00.000-08:002026-01-26T19:30:00.121-08:00Beyond the smartphone: How JioHotstar optimized its UX for foldables and tablets<span style="font-family: inherit;"><i>Posted by Prateek Batra, Developer Relations Engineer, Android Adaptive Apps</i></span><name content="IMG" twitter:image=""><p></p></name><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxkdTthP8A7AMul1rBwU1dJgplW3Ckc2iwnD0K19coPlps-xHa4HcMJoo-6FqUFPCDBAERlTO0qZ4oduKoyBFxLvnY8FtyQ2JecKqJPt9l2rAA9U-LW4URdgB1Z5mWJcboiEq4QeMc8npaUl_v8ItwEDR76wQA3V6s3xgmFfki34hShzyHGSnlq755XzE/s8419/Beyond%20Phones%20How%20JioHotstar%20Built%20an%20Adaptive%20UX%20Blog%20.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="2507" data-original-width="8419" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxkdTthP8A7AMul1rBwU1dJgplW3Ckc2iwnD0K19coPlps-xHa4HcMJoo-6FqUFPCDBAERlTO0qZ4oduKoyBFxLvnY8FtyQ2JecKqJPt9l2rAA9U-LW4URdgB1Z5mWJcboiEq4QeMc8npaUl_v8ItwEDR76wQA3V6s3xgmFfki34hShzyHGSnlq755XzE/s16000/Beyond%20Phones%20How%20JioHotstar%20Built%20an%20Adaptive%20UX%20Blog%20.png" /></a></div><br /></div><div><br /></div><div><span style="font-family: inherit;"><span id="docs-internal-guid-220a4402-7fff-671c-c5c1-4665259d844c"><span face="Arial, sans-serif" style="font-size: 16pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Beyond Phones: How JioHotstar Built an Adaptive UX</span></span></span></div><div><br /></div><div><a href="https://play.google.com/store/apps/details?id=in.startv.hotstar&amp;hl=en_IN" style="font-family: inherit; text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">JioHotstar</span></a><span style="background-color: white; color: #444746; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="background-color: white; font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">is a leading streaming platform in India, serving a user base exceeding 400 million. With a vast content library encompassing over 330,000 hours of video on demand (VOD) and real-time delivery of major sporting events, the platform operates at a massive scale.</span></div><div><span style="font-family: inherit;"><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: white; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">T</span><span style="background-color: white; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">o help ensure a premium experience for its vast audience, JioHotstar elevated the viewing experience by optimizing their app for foldables and tablets. They accomplished this by following Google’s adaptive app guidance and utilizing resources like</span><span style="background-color: white; color: #444746; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">&nbsp;</span><a href="https://developer.android.com/design/ui/large-screens/samples" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">samples</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, </span><a href="https://github.com/android/large-screen-codelabs" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">codelabs</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, </span><a href="https://developer.android.com/guide/topics/large-screens/large-screen-cookbook" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">cookbooks</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, and </span><a href="https://developer.android.com/guide/topics/large-screens" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">documentation</span></a><span style="background-color: white; color: #444746; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="background-color: white; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">to help create a consistently seamless and engaging experience across all display sizes.</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: white; color: #444746; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: white; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-64c03026-7fff-1bb2-a98a-9a93c53967f8"><span face="&quot;Google Sans&quot;, sans-serif" style="background-color: transparent; font-size: 18pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline;">JioHotstar's large screen challenge</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: white; color: #444746; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span id="docs-internal-guid-f7c3fd7e-7fff-355d-78ff-eab6df19dbd9"></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">JioHotstar offered an excellent user experience on standard phones and the team wanted to take advantage of new form factors. To start, the team evaluated their app against the </span><a href="https://developer.android.com/docs/quality-guidelines/large-screen-app-quality" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">large screen app quality guidelines</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to understand the optimizations required to extend their user experience to foldables and tablets. To achieve </span><a href="https://developer.android.com/docs/quality-guidelines/large-screen-app-quality?hl=en#tier_1_best_large_screen_differentiated" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Tier 1</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> large screen app status, the team implemented two strategic updates to adapt the app across various form factors and differentiate on foldables. By addressing the unique challenges posed by foldable and tablet devices, JioHotstar aims </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">to deliver</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> a high-quality and immersive experience across all display sizes and aspect ratios.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span id="docs-internal-guid-75f81b7f-7fff-b6db-2a79-cd5199bf2129"><span face="&quot;Google Sans&quot;, sans-serif" style="font-size: 18pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 600; vertical-align: baseline; white-space-collapse: preserve;">What they needed to do</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span id="docs-internal-guid-35690295-7fff-d426-4a6d-ded8dbc3d789"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">JioHotstar’s user interface, designed primarily for standard phone displays, encountered challenges in adapting hero image aspect ratios, menus, and show screens to the diverse screen sizes and resolutions of other form factors. This often led to image cropping, letterboxing, low resolution, and unutilized space, particularly in landscape mode. To help fully leverage the capabilities of tablets and foldables and deliver an optimized user experience across these device types, JioHotstar focused on refining the UI to ensure optimal layout flexibility, image rendering, and navigation across a wider range of devices.</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span id="docs-internal-guid-45c30fe9-7fff-e408-7197-4293cfed2e1a"><span face="&quot;Google Sans&quot;, sans-serif" style="font-size: 18pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 600; vertical-align: baseline; white-space-collapse: preserve;">What they did</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span><span face="&quot;Google Sans&quot;, sans-serif" style="color: #3ddc84; font-size: 18pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 600; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">For a better viewing experience on large screens, JioHotstar took the initiative to enhance its app by incorporating </span><a href="https://developer.android.com/develop/ui/compose/layouts/adaptive/use-window-size-classes" style="font-family: inherit; text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">WindowSizeClass</span></a><span style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> and creating optimized layouts for compact, medium and extended widths. This allowed the app to adapt its user interface to various screen dimensions and aspect ratios, ensuring a consistent and visually appealing UI across different devices.</span></p></span><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span id="docs-internal-guid-5f6d2eb9-7fff-fa4c-4f36-255526a935a8"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">JioHotstar followed this pattern using Material 3 Adaptive library to know how much space the app has available. First invoking the</span></span></span><span><span face="&quot;Google Sans&quot;, sans-serif" style="font-family: inherit; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span></span></span><span id="docs-internal-guid-13cbb1fc-7fff-3ea0-4aff-5af0ca3ce1f4"><a href="https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/package-summary#currentWindowAdaptiveInfo(kotlin.Boolean)" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">currentWindowAdaptiveInfo()</span></span></a></span><span id="docs-internal-guid-30bd9ab3-7fff-9940-b3a9-52599c6ffeed"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"> </span>function</span></span></span><span style="font-family: inherit;">, </span><span style="font-family: inherit;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">then using new layouts accordingly for the three window size classes:</span></span></span></span></p><span style="font-family: inherit;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></span></span></p><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: blue;">val</span> sizeClass = currentWindowAdaptiveInfo().windowSizeClass <span style="color: blue;">if</span>(sizeClass.isWidthAtLeastBreakpoint(WIDTH_DP_EXPANDED_LOWER_BOUND)) { showExpandedLayout() } <span style="color: blue;">else</span> <span style="color: blue;">if</span>(sizeClass.isHeightAtLeastBreakpoint(WIDTH_DP_MEDIUM_LOWER_BOUND)) { showMediumLayout() } <span style="color: blue;">else</span> { showCompactLayout() }<br /></pre><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The breakpoints are in order, from the biggest to the smallest, as internally the API checks for with a greater or equal then, so any width that is at least greater or equal then </span><span style="background-color: transparent; color: #188038; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">EXPANDED</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> will always be greater than </span><span style="background-color: transparent; color: #188038; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">MEDIUM</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span id="docs-internal-guid-08ca4571-7fff-bc2a-dd7f-20660ca00457"><span style="font-family: inherit;"><br /><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">JioHotstar is able to provide the premium experience unique to foldable devices: </span><span id="docs-internal-guid-74bb3cf1-7fff-526d-abb0-dba9002e9e45"><a href="https://developer.android.com/develop/ui/compose/layouts/adaptive/foldables/make-your-app-fold-aware#tabletop_posture" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Tabletop Mode</span></span></a></span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">.</span> This feature conveniently relocates the video player to the top half of the screen and the video controls to the bottom half when a foldable device is partially folded for a handsfree experience.</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"></span></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dxJjljTvXxBjRwnceWCE5DZQ-qImsc0pA8OTg8OVAPdONVrKASWJA9Onbj6EX9wQFLDuwo6V4Mk1SLXfqxoUw' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div><div class="separator" style="clear: both; text-align: center;"><br /></div></span></div><div style="text-align: left;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><br /></span></span></span></div><div><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">To accomplish this, also using the Material 3 Adaptive library, the same </span></span></span><span id="docs-internal-guid-0020e610-7fff-17c4-638e-421605d5fdc0"><a href="https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture#isTabletop()" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">currentWindowAdaptiveInfo()</span></span></a></span><span style="font-family: inherit;"><span style="font-family: inherit;"> </span>can</span><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"> be used to query for the tabletop mode. Once the device is held in tabletop mode, a change of layout to match the top and bottom half of the posture can be done with a column to place the player in the top half and the controllers in the bottom half:</span></span></span></div><div><span style="white-space-collapse: preserve;"><br /></span><span style="font-family: inherit;"><pre style="color: #333333; line-height: 16.25px; margin: 0px;"><span style="color: blue;">val</span> isTabletTop = currentWindowAdaptiveInfo().windowPosture.isTabletop <span style="color: blue;">if</span>(isTabletopMode) { Column { Player(Modifier.weight(1f)) Controls(Modifier.weight(1f)) } } <span style="color: blue;">else</span> { usualPlayerLayout() }</pre><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span id="docs-internal-guid-a8b0f8c2-7fff-2815-1358-989526214405"></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><br /></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span id="docs-internal-guid-707771a4-7fff-5162-acae-bb0647b3758b"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">JioHotstar is now meeting the </span><a href="https://developer.android.com/docs/quality-guidelines/large-screen-app-quality" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">Large Screen app quality guidelines</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> for Tier 1. The team leveraged </span><a href="https://developer.android.com/adaptive-apps" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">adaptive app</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> guidance, utilizing </span><a href="https://developer.android.com/design/ui/large-screens/samples" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">samples</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, </span><a href="https://github.com/android/large-screen-codelabs" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">codelabs</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, </span><a href="https://developer.android.com/guide/topics/large-screens/large-screen-cookbook" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">cookbooks</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">, and </span><a href="https://developer.android.com/guide/topics/large-screens" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">documentation</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> to incorporate these recommendations.</span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;"><b id="docs-internal-guid-e7c70eec-7fff-5537-efd0-a05b1fe5dd99" style="font-weight: normal;"><br /></b></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span id="docs-internal-guid-9df7aa2e-7fff-3c4f-b174-d84418a709dc"></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span id="docs-internal-guid-664aeea6-7fff-eed6-835d-a1f7ddcfe0a2"></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">To further improve the user experience, JioHotstar increased touch target sizes, to the recommended 48dp, on video discovery pages, ensuring accessibility across large screen devices. Their video details page is now adaptive, adjusting to screen sizes and orientations. They moved beyond simple image scaling, instead leveraging window size classes to detect window size and density in real time and load the most appropriate hero image for each form factor, helping to enhance visual fidelity. Navigation was also improved, with layouts adapting to suit different screen sizes.</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Now users can view their favorite content from JioHotstar on large screens devices with an improved and highly optimized viewing experience.</span></span></p><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;"><span id="docs-internal-guid-87b0ce7b-7fff-992e-0fcd-2ac73366b01f"></span></span></span></p><p style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span face="&quot;Google Sans&quot;, sans-serif" style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></p><blockquote><p style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span face="&quot;Google Sans&quot;, sans-serif" style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Achieving Tier 1 large screen app status with Google is a milestone that reflects the strength of our shared vision. At JioHotstar, we have always believed that optimizing for large screen devices goes beyond adaptability, it’s about elevating the viewing experience for audiences who are rapidly embracing foldables, tablets, and connected TVs.</span></p><p style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span face="&quot;Google Sans&quot;, sans-serif" style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-f2b4d23f-7fff-b4ba-6dca-f1972de0d851"></span></span></p><p style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span face="&quot;Google Sans&quot;, sans-serif" style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Leveraging Google's Jetpack libraries and guides allowed us to combine our insights on content consumption with their expertise in platform innovation. This collaboration allowed both teams to push boundaries, address gaps, and co-create a seamless, immersive experience across every screen size.</span></p><p style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span face="&quot;Google Sans&quot;, sans-serif" style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Together, we’re proud to bring this enhanced experience to millions of users and to set new benchmarks in how India and the world experience streaming.</span></p><p style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span id="docs-internal-guid-46e5d24c-7fff-d718-dda6-249ac7912035"></span></p><p style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span face="&quot;Google Sans&quot;, sans-serif" style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Sonu Sanjeev</span><span face="&quot;Google Sans&quot;, sans-serif" style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span><span face="&quot;Google Sans&quot;, sans-serif" style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Senior Software Development Engineer</span></p></blockquote><p style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: left;"><span face="&quot;Google Sans&quot;, sans-serif" style="background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></p></span></div>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-5208831521336969602026-01-26T09:00:00.000-08:002026-01-26T09:00:00.111-08:00Trade-in mode on Android 16+ <name content="IMG" twitter:image=""><p><span style="font-family: inherit;"></span></p><h4 style="text-align: left; white-space-collapse: preserve;"><b style="font-size: x-large;"><i>Supporting Longevity through Faster Diagnostics</i></b></h4><p><span style="font-family: inherit;"><i>Posted by&nbsp;<span style="white-space-collapse: preserve;">Rachel S, Android Product Manager</span></i></span></p><p><span style="font-family: inherit;"><i></i></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: inherit;"><i><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6Aq4lb9qsSAAh7hBxqYjCIYImJREOYZUqPO7yYdvbr-81VWa3lPQdkT-ekLr3Xd-YBWbEShGKr0fuYMoW0skg_vtHrzQxYf42jUqkAgqwo-11igWWNa_gxW-Rpb1TJAGgeumE0LjzoJej8efMSW6Ce7mUmaA0x_n6RxG6-5SpYQYIofO7bRF31J2v4wI/s4209/Android_TradeIN_Mode_Blog.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1253" data-original-width="4209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6Aq4lb9qsSAAh7hBxqYjCIYImJREOYZUqPO7yYdvbr-81VWa3lPQdkT-ekLr3Xd-YBWbEShGKr0fuYMoW0skg_vtHrzQxYf42jUqkAgqwo-11igWWNa_gxW-Rpb1TJAGgeumE0LjzoJej8efMSW6Ce7mUmaA0x_n6RxG6-5SpYQYIofO7bRF31J2v4wI/s16000/Android_TradeIN_Mode_Blog.png" /></a></i></span></div><span style="font-family: inherit;"><span style="font-family: inherit; white-space-collapse: preserve;"><p style="font-style: italic;"><i style="font-family: inherit;">Trade-in mode: faster assessment of a factory-reset phone or tablet, bypassing setup wizard, a new feature on Android 16 and above.</i></p><h3 style="text-align: left;"><span style="font-family: inherit; font-size: x-large;">Supporting device longevity</span></h3></span></span><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">Android is committed to making devices last longer. With device longevity comes device circularity: phones and tablets traded-in and resold. <span style="font-family: inherit;"><a href="https://www.gsma.com/solutions-and-impact/connectivity-for-good/external-affairs/climate-action/rethinking-mobile-phones/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">GSMA reported</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> that secondhand phones have around 80-90% lower carbon emissions than new phones. The secondhand device market has grown substantially both in volume and value, a trend projected to continue.</span></span></p><p><span id="docs-internal-guid-7ebb36e1-7fff-1fb1-9f1b-742bf18d2765"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><span style="font-family: inherit;">Android 16 and above offers an easy way to access device information on any factory reset phone or tablet via the new </span><span style="color: #188038; font-family: Roboto Mono, monospace;"><span style="font-size: 10pt; white-space-collapse: preserve;">tradeinmode </span></span></span></span><span><span style="font-family: inherit;">parameter, accessed via adb commands. This means you can view quality indicators of a phone or tablet, skipping each setup wizard step. Simply connect a phone or tablet with adb, and use&nbsp;</span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">tradeinmode</span><span face="&quot;Google Sans&quot;, sans-serif" style="font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-family: inherit;"><a href="https://androidsource.devsite.corp.google.com/docs/core/perf/trade-in-mode" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">commands</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span></span></span><span style="font-family: inherit;">to get information about the device.</span></p><p><span id="docs-internal-guid-aaa80139-7fff-cde7-5ee4-78a7e10ff168"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit; font-size: large;">Trade-in mode: What took minutes, now takes seconds </span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Faster trade-in processing – </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">By bypassing setup wizard, trade-in mode improves device trade ins. The mode enables immediate access to understand the ‘health’ of a device, helping everyone along the secondhand value chain check the quality of devices that are wiped. We’ve already seen significant increases in processing secondhand Android devices!&nbsp;</span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Secure evaluation </span><span style="font-weight: 700; white-space-collapse: preserve;">– </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">To ensure the device information is only accessed in secure situations, the device must 1) be factory reset, 2) not have cellular service, 3) not have connectivity or a connected account, and 4) be running a non-debuggable build.</span></span></p><p><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">Get device health information with one command – </span></span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">You can view all the below device information with adb command from your workstation</span> </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">adb shell tradeinmode getstatus</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">, skipping setup wizard:&nbsp;</span></span></p><p></p><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Device information&nbsp;</span></span></p></li><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Device IMEI(s)&nbsp;</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Device serial number&nbsp;</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Brand&nbsp;</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Model&nbsp;</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Manufacturer&nbsp;</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Device model, e.g., Pixel 9</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Device brand, e.g., Google</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Device manufacturer, e.g., Google</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Device name, e.g., tokay</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">API level to ensure correct OS version, e.g., launch_level : 34</span></span></p></li></ul><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Battery heath&nbsp;</span></span></p></li><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Cycle count</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Health</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">State, e.g., unknown, good, overheat, dead, over_voltage, unspecified_failure, cold, fair, not_available, inconsistent</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Battery manufacturing date&nbsp;</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Date first used&nbsp;</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Serial number (to help provide indication of genuine parts, if OEM supported)</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Part status, e.g., replaced, original, unsupported</span></span></p></li></ul><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Storage&nbsp;</span></span></p></li><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Useful lifetime remaining&nbsp;</span></span></p></li><li aria-level="2" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Total capacity&nbsp;</span></span></p></li></ul><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Screen Part status, e.g., replaced, original, unsupported</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Foldables (number of times devices has been folded and total fold lifespan)&nbsp;</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Moisture intrusion&nbsp;</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">UICCS information i.e., Indication if there is an e-SIM or removable SIM and the microchip ID for the SIM slot</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Camera count and location, e.g., 3 cameras on front and 2 on back</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">Lock detection for select device locks</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">And the list keeps growing! Stay up to date </span><a href="https://androidsource.devsite.corp.google.com/docs/core/perf/trade-in-mode" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">here</span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.&nbsp;</span></span></p></li></ul><div><span style="white-space-collapse: preserve;"><br /></span></div><div><span id="docs-internal-guid-97633792-7fff-687e-131b-86e29c702b30"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Run your own tests – </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Trade-in mode enables you to run your own diagnostic commands or applications by entering the evaluation flow using </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">tradeinmode evaluate</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">. The device will automatically factory reset on reboot after evaluation mode to ensure nothing remains on the device.&nbsp;</span></span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Ensure the device is running an approved build – </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Further, when connected to the internet, with a single command </span></span><span style="color: #188038; font-family: &quot;Roboto Mono&quot;, monospace; font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">tradeinmode getstatus --challenge</span><span face="&quot;Google Sans&quot;, sans-serif" style="font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span face="&quot;Google Sans Text&quot;, sans-serif" style="background-color: white; color: #d01884; font-size: 10pt; font-style: italic; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">CHALLENGE</span><span face="&quot;Google Sans&quot;, sans-serif" style="font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-family: inherit;">you can test the device’s operating system (OS) authenticity, to be sure the device is running a trusted build. If the build passes the test, you can be sure the diagnostics results are coming from a trusted OS.&nbsp;</span></span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">There’s more</span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> – You can use commands to factory reset, power off, reboot, reboot directly into trade-in mode, check if trade-in mode is active, revert to the previous mode, and pause tests until system services are ready.&nbsp;</span></span></p><span style="font-family: inherit;"><br /></span><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: inherit;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;">Want to try it? </span><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Learn more about the </span><a href="https://source.android.com/docs/core/perf/trade-in-mode" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">developer steps and commands</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">.&nbsp;</span></span></p><div><span face="&quot;Google Sans&quot;, sans-serif" style="font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div></span></div><p></p></name>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0tag:blogger.com,1999:blog-6755709643044947179.post-83969529779970389682026-01-21T09:00:00.000-08:002026-01-21T09:00:00.112-08:00Ready to review some changes but not others? Try using Play Console’s new Save for later feature<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg1EmDV3Y8uNfK-CXOMdkXyxrWV2Le1mOJm-dz8w0EwrHf18-dKg-jQ-egS82IuvMhTVETf22pgosyKDOw4g33rlvhYOSoyHSEEF4k4klhNzKkTOlo0ByXvuMyuVwI7sLpQezY4IzDaTN8lUeMD9V6NDHA3axVQ8X0CxB7bOrugKEaYrpJ0YbBUWoWDbs/s4209/260120_Header.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg1EmDV3Y8uNfK-CXOMdkXyxrWV2Le1mOJm-dz8w0EwrHf18-dKg-jQ-egS82IuvMhTVETf22pgosyKDOw4g33rlvhYOSoyHSEEF4k4klhNzKkTOlo0ByXvuMyuVwI7sLpQezY4IzDaTN8lUeMD9V6NDHA3axVQ8X0CxB7bOrugKEaYrpJ0YbBUWoWDbs/s4209/260120_Header.png" style="display: none;" /> <span id="docs-internal-guid-d8610420-7fff-dab5-6b1b-0271a5af5774"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><i><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Posted by Georgia Doyle, Senior UX Writer and Content Designer, </span></i><i><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">and</span></i><i><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"> Kanu Tibrewal, </span><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;">Software Engineer</span></i></p></span><span><div><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg1EmDV3Y8uNfK-CXOMdkXyxrWV2Le1mOJm-dz8w0EwrHf18-dKg-jQ-egS82IuvMhTVETf22pgosyKDOw4g33rlvhYOSoyHSEEF4k4klhNzKkTOlo0ByXvuMyuVwI7sLpQezY4IzDaTN8lUeMD9V6NDHA3axVQ8X0CxB7bOrugKEaYrpJ0YbBUWoWDbs/s4209/260120_Header.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1253" data-original-width="4209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg1EmDV3Y8uNfK-CXOMdkXyxrWV2Le1mOJm-dz8w0EwrHf18-dKg-jQ-egS82IuvMhTVETf22pgosyKDOw4g33rlvhYOSoyHSEEF4k4klhNzKkTOlo0ByXvuMyuVwI7sLpQezY4IzDaTN8lUeMD9V6NDHA3axVQ8X0CxB7bOrugKEaYrpJ0YbBUWoWDbs/s16000/260120_Header.png" /></a></div><span face="&quot;Google Sans Text&quot;, sans-serif" style="font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div></span><div><span><span style="font-family: inherit;"><p dir="ltr" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;">We’ve launched a new Save for later feature on Google Play Console’s </span><a href="https://play.google.com/console/about/publishingoverview/" style="text-decoration-line: none;"><span style="color: #1155cc; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline;">Publishing overview</span></a><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"> to give you more control over when you send changes for review.&nbsp;</span></p></span></span><span style="font-family: inherit;"><br />In the past, changes to your app were bundled together before being sent for review. This presented challenges if you needed to reprioritize changes, or if the changes were no longer relevant. For example, updates to your test tracks grouped with marketing changes that need to be rescheduled. This lack of flexibility meant that if some changes were ready for review but not others, you could end up delaying urgent fixes, or publishing changes that you weren’t quite ready to make.<br /><br />Now, you have the ability to hold back the changes you’re not ready to have reviewed.</span></div><p style="text-align: left;"><span style="font-size: large; font-weight: 700; white-space-collapse: preserve;">How it works</span></p><span style="font-family: inherit;">In the 'Changes not yet sent for review' section of the Publishing overview page, select ‘Save for later’ on the groups of changes that you don’t want to include in your next review. You can view and edit the list of saved changes, and return them to the Publishing overview if you change your mind. Once the review has started, your saved changes will be added back to ‘Changes not yet sent for review’. </span><div><span style="font-family: inherit;"></span><span><span face="&quot;Google Sans Text&quot;, sans-serif"><br /><p dir="ltr" style="font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT42ooaXQWCbZ8YOQuf1CJlIVGCViuEfaxEqzEpue3HhC_oz-ywLsnYD_H5ozkHzNf4IHUuzaqZWYyAmjOtXU9GeK5VcZhv6Ux3TroijzXYWE08zwvwcm28SKNrOBeF5blLls7WxJ4cHZSsUUUYV9kVWdClRQZrbJRc-O_9q1n7pLCy1JQaQvDa25YYWc/s6888/Blog%20post%20image.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3796" data-original-width="6888" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT42ooaXQWCbZ8YOQuf1CJlIVGCViuEfaxEqzEpue3HhC_oz-ywLsnYD_H5ozkHzNf4IHUuzaqZWYyAmjOtXU9GeK5VcZhv6Ux3TroijzXYWE08zwvwcm28SKNrOBeF5blLls7WxJ4cHZSsUUUYV9kVWdClRQZrbJRc-O_9q1n7pLCy1JQaQvDa25YYWc/s16000/Blog%20post%20image.jpg" /></a></div><p></p><p dir="ltr" style="font-size: 10pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; vertical-align: baseline; white-space-collapse: preserve;"></p><div class="separator" style="clear: both; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; text-align: center; vertical-align: baseline; white-space-collapse: preserve;"><br /></div><span id="docs-internal-guid-7ba0bbd1-7fff-5481-d988-0913ad2d2b38" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline;"><p style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;"><span style="font-size: large;"><b>Integration with our pre-review checks</b></span></p></span></span></span></span></div><div><span style="font-family: inherit;"><br /></span></div><div><span style="font-family: inherit;">Save for later also works with our <a href="https://support.google.com/googleplay/android-developer/answer/14807773">pre-review checks</a>. Pre-review checks look for issues in your changes that may prevent your app from being published, so that you can fix them before you send changes for review. If checks find issues with your app, there are two ways you can proceed:</span></div><div><span style="font-family: inherit;"><br /></span></div><span style="font-family: inherit;"><ul style="text-align: left;"><li><span style="font-family: inherit;">If issues are isolated to an individual track, we’ll show you an error beside that change, so you know what to save for later in order to proceed to review with your other changes.</span></li><li><span style="font-family: inherit;">If you have issues that affect your whole app, for example, App content issues, Save for later will be unavailable and you will need to fix them before you can send any changes for review.</span></li></ul></span><p style="text-align: left;"><span style="white-space-collapse: preserve;"><b><span style="font-size: large;">Greater flexibility in your workflows</span></b></span></p><span style="font-family: inherit;">Our goal for Save for later is to give you greater flexibility over your release schedule. With this feature you can manage what changes you send for review, and address issues affecting individual tracks without holding up ready-to-release changes, so you can iterate faster and minimize the impact of rejections on your release timeline.</span><div><div><p style="text-align: left;"><span style="font-family: inherit;"><span style="font-size: large; white-space-collapse: preserve;"><b>So, what's next?</b></span></span></p></div><div><span style="font-family: inherit;">We're committed to continuously improving your publishing experience. Save for later is a significant step towards providing you with more granular control over this all-important stage in the journey to publishing your app. We'll continue to gather your feedback and look at ways we can provide greater flexibility to the review and publishing process.</span></div><div><span style="font-family: inherit;"><br />We're excited to see how Save for later helps you to streamline your release process and bring your app innovations to users even faster.</span></div><name content="IMG" twitter:image=""><p></p></name></div>Android Developershttp://www.blogger.com/profile/08588467489110681140[email protected]0