Pipes Feed Preview: Android Developers Blog

  1. The First Beta of Android 16

    Thu, 23 Jan 2025 19:30:00 -0000

    <meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjImJmFDXwpMRSRUyK3OsYHltR8btqa-mzT2Q34suhjJjOAOlKO_0DwVXzqtjCz_oRM8CD6UOFOGySl8HJTI16R7eMLEPT5-moqhGzQxtAPvnfsMpiPLLY-P5xgJ34XLSsDmj09xlsoPxt3upGcWzj4WMUa9XaeSp-nA16SxU8eQ58lONjZ9cdy13ylUAU/s1600/A16DP1-Feature%20%281%29.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjImJmFDXwpMRSRUyK3OsYHltR8btqa-mzT2Q34suhjJjOAOlKO_0DwVXzqtjCz_oRM8CD6UOFOGySl8HJTI16R7eMLEPT5-moqhGzQxtAPvnfsMpiPLLY-P5xgJ34XLSsDmj09xlsoPxt3upGcWzj4WMUa9XaeSp-nA16SxU8eQ58lONjZ9cdy13ylUAU/s1600/A16DP1-Feature%20%281%29.png" style="display: none;" /> <em> Posted by Matthew McCullough – VP of Product Management, Android Developer</em> <p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9v1k9OJQJO50aFpos2ASIgjXE7nmTVN-CW65Pczg7bo1ttpaPNkO7mvQs6RBWEVwG70qgEiO0rNL5ARmP22Z42_G1KNz0kFFCs9TxrXifEuar13GP9aQ-2ql03rl99e7rPZm5sBKxo_uLL5hNP_lBPK82h2aRG7YcaN1r2QHCqnJIK-nOedMtxJnyJCY/s1600/android_16_platlogo_512px.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/AVvXsEj9v1k9OJQJO50aFpos2ASIgjXE7nmTVN-CW65Pczg7bo1ttpaPNkO7mvQs6RBWEVwG70qgEiO0rNL5ARmP22Z42_G1KNz0kFFCs9TxrXifEuar13GP9aQ-2ql03rl99e7rPZm5sBKxo_uLL5hNP_lBPK82h2aRG7YcaN1r2QHCqnJIK-nOedMtxJnyJCY/s1600/android_16_platlogo_512px.png" width="200" /></a></div> <p>The first beta of Android 16 is now available, which means it's time to open the experience up to both developers and early adopters. You can now <a href="https://www.google.com/android/beta" target="_blank">enroll any supported Pixel device here</a> to get this and future Android Beta updates over-the-air.</p> <p>This build includes support for the future of app adaptivity, Live Updates, the Advanced Professional Video format, and more. We’re looking forward to <a href="https://developer.android.com/about/versions/16/feedback" target="_blank">hearing what you think</a>, and thank you in advance for your continued help in making Android a platform that works for everyone.</p> <h2><span style="font-size: x-large;">Android adaptive apps</span></h2> <p>Users expect apps to work seamlessly on all their devices, regardless of display size and form factor. To that end, Android 16 is <a href="https://android-developers.googleblog.com/2025/01/orientation-and-resizability-changes-in-android-16.html" target="_blank">phasing out the ability</a> for apps to restrict screen orientation and resizability on large screens. This is similar to features OEMs have added over the last several years to large screen devices to allow users to run apps at any window size and aspect ratio.</p> <p>On screens larger than 600dp wide, apps that target API level 36 will have app windows that resize; you should check your apps to ensure your existing UIs scale seamlessly, working well across portrait and landscape aspect ratios. We're providing <a href="https://developer.android.com/develop/ui/compose/layouts/adaptive" target="_blank">frameworks, tooling, and libraries</a> to help.</p> <image><div style="text-align: center;"><img alt="Two hands hold a folding phone, showing the Developer News feed in both the folded and unfolded states. The unfolded view shows more news items." border="0" height="360" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKxgc_eab40yKECqgwds3zvkDle2fG1UsRtIXMDHur_3IQrZiDEhKJ_AtXsq8bCg8sYNPKJkotyCQYf9xwLb1Mzj7BHtSQBMWlYWIlS42y8BmJ5sRaRHdGqaqt6J10RuXaSvAyOU68oxuhTvfAmKgtpi9UylaLuYQ4folY4PvmBUIZ61T76XhWZw7zupc/w640-h360/image2.png" width="640" /></div></image><br /> <h4><span style="font-size: large;">Key changes:</span></h4> <ul><ul> <li><a href="https://developer.android.com/about/versions/16/behavior-changes-16#implementation-details" target="_blank">Manifest attributes and APIs that restrict orientation and resizing</a> will be ignored for apps — but not games — on large screens.</li> </ul></ul> <h4><span style="font-size: large;">Timeline:</span></h4> <ul><ul> <li><b>Android 16 (2025):</b> Changes apply to large screens (600dp in width) for apps targeting API level 36 (developers can opt-out)</li> <li><b>Android release in 2026:</b> Changes apply to large screens for apps targeting API level 37 (no opt-out)</li> <li>It's a great time to make your app adaptive! You can test these overrides without targeting using the <a href="https://developer.android.com/guide/app-compatibility/test-debug" target="_blank">app compatibility framework</a> by enabling the <span style="font-family: Courier;"><a href="https://developer.android.com/about/versions/16/reference/compat-framework-changes#universal_resizable_by_default" target="_blank">UNIVERSAL_RESIZABLE_BY_DEFAULT</a></span> flag. Learn more about <a href="https://android-developers.googleblog.com/2025/01/orientation-and-resizability-changes-in-android-16.html" target="_blank">changes to orientation and resizability APIs in Android 16</a>.</li> </ul></ul> <h2><span style="font-size: x-large;">Live Updates</span></h2> <p>Live Updates are a new class of notifications that help users monitor and quickly access important ongoing activities.</p> <p>The new <a href="https://developer.android.com/reference/android/app/Notification.ProgressStyle" target="_blank"><span style="font-family: Courier;">ProgressStyle</span></a> notification template provides a consistent user experience for Live Updates, helping you build for these progress-centric user journeys: rideshare, delivery, and navigation. It includes support for custom icons for the <a href="https://developer.android.com/reference/android/app/Notification.ProgressStyle#getProgressStartIcon%28%29" target="_blank">start</a>, <a href="https://developer.android.com/reference/android/app/Notification.ProgressStyle#setProgressEndIcon%28android.graphics.drawable.Icon%29" target="_blank">end</a>, and <a href="https://developer.android.com/reference/android/app/Notification.ProgressStyle#setProgressTrackerIcon%28android.graphics.drawable.Icon%29" target="_blank">current</a> progress tracking, <a href="https://developer.android.com/reference/android/app/Notification.ProgressStyle.Segment" target="_blank">segments</a> and <a href="https://developer.android.com/reference/android/app/Notification.ProgressStyle.Point" target="_blank">points</a>, user journey states, milestones, and more.</p> <p>ProgressStyle notifications are suggested only for ride sharing, food delivery, and navigation use cases.</p> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;">@Override <span style="color: green; font-weight: bold;">protected</span> Notification <span style="color: blue;">getNotification</span>() { <span style="color: green; font-weight: bold;">return</span> <span style="color: green; font-weight: bold;">new</span> Notification.Builder(mContext, CHANNEL_ID) .setSmallIcon(R.drawable.ic_app_icon) .setContentTitle(<span style="color: #ba2121;">"Ride requested"</span>) .setContentText(<span style="color: #ba2121;">"Looking for nearby drivers"</span>) .setStyle( <span style="color: green; font-weight: bold;">new</span> Notification.ProgressStyle() .addProgressSegment( <span style="color: green; font-weight: bold;">new</span> Notification.ProgressStyle.Segment(<span style="color: #666666;">100</span>) .setColor(COLOR_ORANGE) ).setProgressIndeterminate(<span style="color: green; font-weight: bold;">true</span>) ).build(); } </pre></div> <h2><span style="font-size: x-large;">Camera and media updates</span></h2> <p>Android 16 advances support for the playback, creation, and editing of high-quality media, a critical use case for social and productivity apps.</p> <h3><span style="font-size: large;">Advanced Professional Video</span></h3> <p>Android 16 introduces support for the <a href="https://www.ietf.org/archive/id/draft-lim-apv-00.html" target="_blank">Advanced Professional Video</a> (APV) codec which is designed to be used for professional level high quality video recording and post production.</p> <p>The APV codec standard has the following features:</p> <ul><ul> <li>Perceptually lossless video quality (close to raw video quality)</li> <li>Low complexity and high throughput intra-frame-only coding (without pixel domain prediction) to better support editing workflows</li> <li>Support for high bit-rate range up to a few Gbps for 2K, 4K and 8K resolution content, enabled by a lightweight entropy coding scheme</li> <li>Frame tiling for immersive content and for enabling parallel encoding and decoding</li> <li>Support for various chroma sampling formats and bit-depths</li> <li>Support for multiple decoding and re-encoding without severe visual quality degradation</li> <li>Support multi-view video and auxiliary video like depth, alpha, and preview</li> <li>Support for HDR10/10+ and user-defined metadata</li> </ul></ul> <p>A reference implementation of APV is provided through the <a href="https://github.com/openapv/openapv" target="_blank">OpenAPV project</a>. Android 16 will <a href="https://developer.android.com/reference/android/media/MediaFormat#MIMETYPE_VIDEO_APV" target="_blank">implement support</a> for the APV 422-10 Profile that provides YUV 422 color sampling along with 10-bit encoding and for target bitrates of up to 2Gbps.</p> <h3><span style="font-size: large;">Camera night mode scene detection</span></h3> <p>To help your app know when to switch to and from a night mode camera session, Android 16 adds <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/hardware/camera2/CaptureResult#EXTENSION_NIGHT_MODE_INDICATOR" target="_blank">EXTENSION_NIGHT_MODE_INDICATOR</a></span>. If supported, it's available in the <a href="https://developer.android.com/reference/android/hardware/camera2/CaptureResult" target="_blank"><span style="font-family: Courier;">CaptureResult</span></a> within Camera2.</p> <p>This is the API we briefly mentioned as coming soon in the <a href="https://android-developers.googleblog.com/2024/12/instagram-on-android-low-light-photos.html" target="_blank">"How Instagram enabled users to take stunning low light photos" blogpost</a>. That post is a practical guide on how to implement night mode together with a case study that links higher-quality, in-app, night mode photos with an increase in the number of photos shared from the in-app camera.</p> <h2><span style="font-size: x-large;">Vertical Text</span></h2> <p>Android 16 adds low-level support for rendering and measuring text vertically to provide foundational vertical writing support for library developers. This is particularly useful for languages like Japanese that commonly use vertical writing systems. A new flag, <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/graphics/Paint#VERTICAL_TEXT_FLAG" target="_blank">VERTICAL_TEXT_FLAG</a></span>, has been added to the <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/graphics/Paint" target="_blank">Paint</a></span> class. When this flag is set using <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/graphics/Paint#setFlags%28int%29" target="_blank">Paint.setFlags</a></span>, Paint’s text measurement APIs will report vertical advances instead of horizontal advances, and <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/graphics/Canvas" target="_blank">Canvas</a></span> will draw text vertically.</p> <blockquote><b>Note:</b> Current high level text APIs, such as Text in Jetpack Compose, TextView, Layout classes and their subclasses do not support vertical writing systems, and do not support using the <span style="color: #0d904f; font-family: Courier;">VERTICAL_TEXT_FLAG</span>.</blockquote> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: green; font-weight: bold;">val</span> text = <span style="color: #ba2121;">"「春は、曙。」"</span> Box(Modifier .padding(innerPadding) .background(Color.White) .fillMaxSize() .drawWithContent { drawIntoCanvas { canvas -&gt; <span style="color: green; font-weight: bold;">val</span> paint = Paint().apply { textSize = <span style="color: #666666;">64.</span>sp.toPx() } <span style="color: #408080; font-style: italic;">// Draw text vertically</span> paint.flags = paint.flags or VERTICAL_TEXT_FLAG <span style="color: green; font-weight: bold;">val</span> height = paint.measureText(text) canvas.nativeCanvas.drawText( text, <span style="color: #666666;">0</span>, text.length, size.width / <span style="color: #666666;">2</span>, (size.height - height) / <span style="color: #666666;">2</span>, paint ) } }) {} </pre></div> <h2><span style="font-size: x-large;">Accessibility</span></h2> <p>Android 16 adds new accessibility APIs to help you bring your app to every user.</p> <h3><span style="font-size: large;">Supplemental descriptions</span></h3> <p>When an accessibility service describes a <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/view/ViewGroup" target="_blank">ViewGroup</a></span>, it combines content labels from its child views. If you provide a <span style="color: #0d904f; font-family: Courier;">contentDescription</span> for the <span style="color: #0d904f; font-family: Courier;">ViewGroup</span>, accessibility services assume you are also overriding the content of non-focusable child views. This can be problematic if you want to label things like a drop down (e.g. "Font Family") while preserving the current selection for accessibility (e.g. "Roboto"). Android 16 adds <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/view/View#setSupplementalDescription%28java.lang.CharSequence%29" target="_blank">setSupplementalDescription</a></span> so you can provide text that provides information about a <span style="color: #0d904f; font-family: Courier;">ViewGroup</span> without overriding information from its children.</p> <h3><span style="font-size: large;">Required form fields</span></h3> <p>Android 16 adds <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setFieldRequired%28boolean%29" target="_blank">setFieldRequired</a></span> to <span style="font-family: Courier;"><a href="https://developer.android.com/sdk/api_diff/b-beta1-incr/changes/android.view.accessibility.AccessibilityNodeInfo" target="_blank">AccessibilityNodeInfo</a></span> so apps can tell an accessibility service that input to a form field is required. This is an important scenario for users filling out many types of forms, even things as simple as a required terms and conditions checkbox, helping users to consistently identify and quickly navigate between required fields.</p> <h2><span style="font-size: x-large;">Generic ranging APIs</span></h2> <p>Android 16 includes the new <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/ranging/RangingManager" target="_blank">RangingManager</a></span>, which provides ways to determine the distance and angle on supported hardware between the local device and a remote device. RangingManager supports the usage of a variety of ranging technologies such as BLE channel sounding, BLE RSSI-based ranging, Ultra-Wideband, and WiFi round trip time.</p> <h2><span style="font-size: x-large;">Behavior changes</span></h2> <p>With every Android release, we seek to make the platform more efficient and robust, balancing the needs of your apps against things like system performance and battery life. This can result in behavior changes that impact compatibility.</p> <h3><span style="font-size: large;">ART internal changes</span></h3> <p>Code that leverages internal structures of the Android Runtime (ART) may not work correctly on devices running Android 16 along with earlier Android versions that update the ART module through Google Play system updates. These structures are changing in ways that help improve the Android Runtime's (ART's) performance.</p> <p>Impacted apps will need to be updated. Relying on internal structures can always lead to compatibility problems, but it's particularly important to avoid relying on code (or libraries containing code) that leverages internal ART structures, since ART changes aren't tied to the platform version the device is running on; they go out to over a <a href="https://android-developers.googleblog.com/2023/11/the-secret-to-androids-improved-memory-latest-android-runtime-update.html" target="_blank">billion devices through Google Play system updates</a>.</p> <p>For more information, see the <a href="https://developer.android.com/about/versions/16/behavior-changes-all" target="_blank">Android 16 changes affecting all apps</a> and <a href="https://g.co/dev/appcompat" target="_blank">the restrictions on non-SDK interfaces</a>.</p> <h3><span style="font-size: large;">Migration or opt-out required for predictive back</span></h3> <p>For apps targeting Android 16 or higher and running on an Android 16 or higher device, the predictive back system animations (back-to-home, cross-task, and cross-activity) are enabled by default. Additionally, the deprecated <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/app/Activity#onBackPressed%28%29" target="_blank">onBackPressed</a></span> is not called and <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BACK" target="_blank">KeyEvent.KEYCODE_BACK</a></span> is no longer dispatched.</p> <p>If your app intercepts the back event and you haven't migrated to predictive back yet, <a href="https://developer.android.com/guide/navigation/custom-back/predictive-back-gesture#update-custom" target="_blank">update your app to use supported back navigation APIs</a> or temporarily opt out by setting the <span style="font-family: Courier;"><a href="https://developer.android.com/guide/topics/manifest/activity-element#enabledCallback" target="_blank">android:enableOnBackInvokedCallback</a></span> attribute to <span style="color: #0d904f; font-family: Courier;">false</span> in the <span style="color: #0d904f; font-family: Courier;">&lt;application&gt;</span> or <span style="color: #0d904f; font-family: Courier;">&lt;activity&gt;</span> tag of your app’s AndroidManifest.xml file.</p> <h3><span style="font-size: large;">Predictive back support for 3-button navigation</span></h3> <p>Android 16 brings predictive back support to 3-button navigation for apps that have <a href="https://developer.android.com/guide/navigation/custom-back/predictive-back-gesture" target="_blank">properly migrated to predictive back</a>. Long-pressing the back button initiates a predictive back animation, giving users a preview of where the back button takes them.</p> <p>This behavior applies across all areas of the system that support predictive back animations, including the system animations (back-to-home, cross-task, and cross-activity).</p> <h3><span style="font-size: large;">Fixed rate work scheduling optimization</span></h3> <p>Prior to targeting Android 16, when <span style="font-family: Courier;"><a href="https://developer.android.com/reference/java/util/concurrent/ScheduledExecutorService#scheduleAtFixedRate%28java.lang.Runnable,%20long,%20long,%20java.util.concurrent.TimeUnit%29" target="_blank">scheduleAtFixedRate</a></span> missed a task execution due to being outside a valid <a href="https://developer.android.com/guide/components/activities/process-lifecycle" target="_blank">process lifecycle</a>, all missed executions will immediately execute when app returns to a valid lifecycle.</p> <p>When targeting Android 16, at most one missed execution of <span style="font-family: Courier;"><a href="https://developer.android.com/reference/java/util/concurrent/ScheduledExecutorService#scheduleAtFixedRate%28java.lang.Runnable,%20long,%20long,%20java.util.concurrent.TimeUnit%29" target="_blank">scheduleAtFixedRate</a></span> will be immediately executed when the app returns to a valid lifecycle. This behavior change is expected to improve app performance. Please test the behavior to ensure your application is not impacted. You can also test by using the <a href="https://developer.android.com/guide/app-compatibility/test-debug" target="_blank">app compatibility framework</a> and enabling the <span style="font-family: Courier;"><a href="https://developer.android.com/about/versions/16/reference/compat-framework-changes#stpe_skip_multiple_missed_periodic_tasks" target="_blank">STPE_SKIP_MULTIPLE_MISSED_PERIODIC_TASKS</a></span> compat flag.</p> <h3><span style="font-size: large;">Ordered broadcast priority scope no longer global</span></h3> <p>In Android 16, broadcast delivery order using the <span style="font-family: Courier;"><a href="https://developer.android.com/guide/topics/manifest/intent-filter-element#priority" target="_blank">android:priority</a></span> attribute or <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/content/IntentFilter#setPriority%28int%29" target="_blank">IntentFilter#setPriority()</a></span> across different processes will not be guaranteed. Broadcast priorities for ordered broadcasts will only be respected within the same application process rather than across all system processes.</p> <p>Additionally, broadcast priorities will be automatically confined to the range (<span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/content/IntentFilter#SYSTEM_LOW_PRIORITY" target="_blank">SYSTEM_LOW_PRIORITY</a></span> + 1, <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/content/IntentFilter#SYSTEM_HIGH_PRIORITY" target="_blank">SYSTEM_HIGH_PRIORITY</a></span> - 1).</p> <p>Your application may be impacted if it does either of the following:</p> <ul><ul> <p> 1. Your application has declared multiple processes that have set broadcast receiver priorities for the same intent.</p></ul><ul> <p> 2. Your application process interacts with other processes and has expectations around receiving a broadcast intent in a certain order.</p> </ul></ul> <p>If the processes need to coordinate with each other, they should communicate using other coordination channels.</p> <h2><span style="font-size: x-large;">Gemini Extensions</span></h2> <p><a href="https://blog.google/products/gemini/new-gemini-app-updates-android/" target="_blank">Samsung just launched new Gemini Extensions</a> on the S25 series, demonstrating new ways Android apps can integrate with the power of Gemini. We're working to make this functionality available on even more form factors.</p> <h2><span style="font-size: x-large;"><a href="https://android-developers.googleblog.com/2024/10/android-sdk-release-update.html" target="_blank">Two Android API releases in 2025</a></span></h2> <p>This preview is for the next major release of Android with a planned launch in Q2 of 2025 and we plan to have another release with new developer APIs in Q4. The Q2 major release will be the only release in 2025 to include planned behavior changes that could affect apps. The Q4 minor release will pick up feature updates, optimizations, and bug fixes; it will not include any app-impacting behavior changes.</p> <image><img alt="2025 SDK release timeline showing a features only update in Q1 and Q3, a major SDK release with behavior changes, APIs, and features in Q2, and a minor SDK release with APIs and features in Q4" border="0" height="164" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSeVe1-ddLYBDekoJnJP_c3Qq3BOxmM8IOvx6DbeaQCpau5VrnpHG8G0UFayJsIrVZehmY-Sf85Wt8iDvxJ5M8D0fGOl4M_ucFffyosC4AgRae6R6gN-mNrm3Jp8XYsJtQVHGqv84obbkuy4DvFbDgwdBXeuQ_JOveA2IWC1hbned7OkXJfWClTO2Szac/w640-h164/image2.png" width="640" /></image> <p>We'll continue to have quarterly Android releases. The Q1 and Q3 updates, which will land in-between the Q2 and Q4 API releases, will provide incremental updates to ensure continuous quality. We’re putting additional energy into working with our device partners to bring the Q2 release to as many devices as possible.</p> <p>There’s no change to the target API level requirements and the associated dates for apps in Google Play; our plans are for one annual requirement each year, tied to the major API level.</p> <h3><span style="font-size: large;">How to get ready</span></h3> <p>In addition to performing compatibility testing on this next major release, make sure that you're compiling your apps against the new SDK, and use the compatibility framework to enable <span style="color: #0d904f; font-family: Courier;">targetSdkVersion</span>-gated behavior changes as they become available for early testing.</p> <h2><span style="font-size: x-large;">App compatibility</span></h2> <image><img alt="The Android 16 production timeline shows the release stages, highlighting 'Beta Releases' and 'Platform Stability' in blue and green, respectively, from December to the final release." border="0" height="164" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBbIuWqc3CLlqC4HX6rYhlCxZY49JWtSbwP-hMLXp0ye65hGqDaVIO4vs1bbtP62ppppFKgikvBl0bFV3-a0Y6qzFGTLsW1cjr0-NxV110nJ_jYigMqSuQbZURg8uTRo0BdqQgkUZsRrtIvrNq2wc8bFNr3VYN2hBaTpgTppwTgv5feWz2r7xIqhyphenhyphenyEm4/s1600/image2.png" width="640" /></image> <p>The Android 16 Preview program runs from November 2024 until the final public release in Q2 of 2025. At key development milestones, we'll deliver updates for your development and testing environments. Each update includes SDK tools, system images, emulators, API reference, and API diffs. We'll highlight critical APIs as they are ready to test in the preview program in blogs and on the <a href="https://developer.android.com/about/versions/16" target="_blank">Android 16 developer website</a>.</p> <p>We’re targeting March of 2025 for our Platform Stability milestone. At this milestone, we’ll deliver final SDK/NDK APIs and also final internal APIs and app-facing system behaviors. From that time you’ll have several months before the final release to complete your testing. The release timeline details are here.</p> <h2><span style="font-size: x-large;">Get started with Android 16</span></h2> <p>Now that we've entered the beta phase, you can <a href="https://www.google.com/android/beta" target="_blank">enroll any supported Pixel device</a> to get this and future Android Beta updates over-the-air. If you don’t have a Pixel device, you can <a href="https://developer.android.com/about/versions/16/get#on_emulator" target="_blank">use the 64-bit system images with the Android Emulator</a> in Android Studio.</p> <p>If you are currently on Android 16 Developer Preview 2 or are already in the Android Beta program, you will be offered an over-the-air update to Beta 1.</p> <p><b>If you are in Android 25Q1 Beta and would like to take the final stable release of 25Q1 and exit Beta, you need to ignore the over-the-air update to 25Q2 Beta 1 and wait for the release of 25Q1.</b></p> <p>We're looking for your feedback so please <a href="https://developer.android.com/about/versions/16/feedback" target="_blank">report issues and submit feature requests</a> on the <a href="https://developer.android.com/about/versions/16/feedback" target="_blank">feedback page</a>. The earlier we get your feedback, the more we can include in our work on the final release.</p> <p>For the best development experience with Android 16, we recommend that you use the latest preview of <a href="https://developer.android.com/studio/preview" target="_blank">Android Studio (Meerkat)</a>. Once you’re set up, here are some of the things you should do:</p> <ul><ul> <li>Compile against the new SDK, test in CI environments, and report any issues in our tracker on the <a href="https://developer.android.com/about/versions/16/feedback" target="_blank">feedback page</a>.</li> <li>Test your current app for compatibility, learn whether your app is affected by changes in Android 16, and install your app onto a device or emulator running Android 16 and extensively test it.</li> </ul></ul> <p>We’ll update the <a href="https://developer.android.com/about/versions/16/download" target="_blank">preview/beta system images</a> and SDK regularly throughout the Android 16 release cycle. Once you’ve installed a beta build, you’ll automatically get future updates over-the-air for all later previews and Betas.</p> <p>For complete information, visit the <a href="https://developer.android.com/about/versions/16" target="_blank">Android 16 developer site</a>.</p>
  2. The future is adaptive: Changes to orientation and resizability APIs in Android 16

    Thu, 23 Jan 2025 17:00:00 -0000

    <meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmQqZ7VvbZkwrbocrk-dKTUW_cRjjftPgAkJwPv-rm-h8sG90w03nafxe3H-ltfCvgU7gzpK0a5n2I_p0_PVcgFj1MftaIXbNFfRNbBVbwPt3aAh5yt3ksesAsHA-yaQFBX6Opec2KGrYtONACXd3dezufwU-YcjQ71BOg5mMdKMH2RZ7z3CY4BgEfS3U/s1600/AfD%20_%20%20Android%2016%20Beta%201%20Blog%20Assets%20_%20Blog%20Header%20and%20Metadata%20Card_meta%20card.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmQqZ7VvbZkwrbocrk-dKTUW_cRjjftPgAkJwPv-rm-h8sG90w03nafxe3H-ltfCvgU7gzpK0a5n2I_p0_PVcgFj1MftaIXbNFfRNbBVbwPt3aAh5yt3ksesAsHA-yaQFBX6Opec2KGrYtONACXd3dezufwU-YcjQ71BOg5mMdKMH2RZ7z3CY4BgEfS3U/s1600/AfD%20_%20%20Android%2016%20Beta%201%20Blog%20Assets%20_%20Blog%20Header%20and%20Metadata%20Card_meta%20card.png" style="display: none;" /> <em>Posted by Maru Ahues Bouza – Director, Product Management</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzRItaoZNxXwt1uVdUHwtDpRRjmvA8Qa6FYS3w9JtJELwnHDLqgufyNq8y-aJs6jfKDBlp4N-csrChTjNzvUzjPd3qNxEoNhh1jeGd5sc8JEisPjzemFjGDSFccyYOu9Y4C1weqZfgtG51-FRrfrwIHPCHURgV_70tAyeEwUrAOxoxUG9_jaJoX1y9vE0/s1600/AfD%20_%20%20Android%2016%20Beta%201%20Blog%20Assets%20_%20Blog%20Header%20and%20Metadata%20Card_banner.png"><img border="0" data-original-height="800" data-original-width="100%" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzRItaoZNxXwt1uVdUHwtDpRRjmvA8Qa6FYS3w9JtJELwnHDLqgufyNq8y-aJs6jfKDBlp4N-csrChTjNzvUzjPd3qNxEoNhh1jeGd5sc8JEisPjzemFjGDSFccyYOu9Y4C1weqZfgtG51-FRrfrwIHPCHURgV_70tAyeEwUrAOxoxUG9_jaJoX1y9vE0/s1600/AfD%20_%20%20Android%2016%20Beta%201%20Blog%20Assets%20_%20Blog%20Header%20and%20Metadata%20Card_banner.png" /></a> <p>With 3+ billion Android devices in use globally, the Android ecosystem is more vibrant than ever. Android mobile apps run on a diverse range of devices, from phones and foldables to tablets, Chromebooks, cars, and most recently XR. Users buy into an entire device ecosystem and expect their apps to work across all devices. To thrive in this multi-device environment, your apps need to adapt seamlessly to different screen sizes and form factors.</p> <p>Many Android apps rely on user interface approaches that work in a single orientation and/or restrict resizability. However, users want apps to make full use of their large screens, so Android device manufacturers added well-received features that override these app restrictions.</p> <p>With this in mind, Android 16 is removing the ability for apps to restrict orientation and resizability at the platform level, and shifting to a consistent model of <a href="https://developer.android.com/adaptive-apps" target="_blank">adaptive apps</a> that seamlessly adjust to different screen sizes and orientations. This change will reduce fragmentation with behavior that better meets user expectations, and improves accessibility by respecting the user’s preferred orientation. We're building tools, libraries, and platform APIs to help you do this to provide a consistently excellent user experience across the entire Android ecosystem.</p> <h3>What's changing?</h3> <p>Starting with Android 16, we're phasing out manifest attributes and runtime APIs used to restrict an app's orientation and resizability, enabling better user experiences for many apps across devices.</p> <p>These changes will initially apply when the app is running on a large screen, where “large screen” means that the smaller dimension of the display is greater than or equal to 600dp. This includes:</p> <ul><ul> <li>Inner displays of large screen foldables</li> <li>Tablets, including desktop windowing</li> <li>Desktop environments, including Chromebooks</li> </ul></ul> <p>The following manifest attributes and APIs will be ignored for apps targeting Android 16 (SDK 36) on large screens:</p> <div align="center"> <table> <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> </table> </div> <p>There are some exceptions to these changes for controlling orientation, aspect ratio, and resizability:</p> <ul><ul> <li>As mentioned before, these changes won't apply for screens that are smaller than sw600dp (e.g. most phones, flippables, outer displays on large screen foldables)</li></ul><ul> <li>Games will be excluded from these changes, based on the <a href="https://developer.android.com/guide/topics/manifest/application-element#appCategory" target="_blank">android:appCategory</a> flag</li> </ul></ul> <p>Also, users have control. They can explicitly opt-in to using the app’s default behavior in the <a href="https://developer.android.com/guide/practices/device-compatibility-mode#user_per-app_overrides" target="_blank">aspect ratio settings</a>.</p> <image><div style="text-align: center;"><img alt="Two hands hold a folding phone, showing the Developer News feed in both the folded and unfolded states. The unfolded view shows more news items." border="0" height="360" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKxgc_eab40yKECqgwds3zvkDle2fG1UsRtIXMDHur_3IQrZiDEhKJ_AtXsq8bCg8sYNPKJkotyCQYf9xwLb1Mzj7BHtSQBMWlYWIlS42y8BmJ5sRaRHdGqaqt6J10RuXaSvAyOU68oxuhTvfAmKgtpi9UylaLuYQ4folY4PvmBUIZ61T76XhWZw7zupc/w640-h360/image2.png" width="640" /></div><imgcaption><center><em>Apps, targeting API level 36, that were previously letterboxed on large screen devices will fill the display in landscape orientation on Android 16</em></center></imgcaption></image><br /> <h2><span style="font-size: x-large;">Get ready for this change, by making your app adaptive</span></h2> <p>Apps will need to support landscape and portrait layouts for window sizes in the full range of aspect ratios that users can choose to use apps in, as there will no longer be a way to restrict the aspect ratio and orientation to portrait or to landscape.</p> <p>To test if your app will be impacted by these changes, use the Android 16 Beta 1 developer preview with the Pixel Tablet and Pixel Fold series emulators in Android Studio, and either set <span style="color: #0d904f; font-family: Courier;">targetSdkPreview = “Baklava”</span> or use the <a href="https://developer.android.com/guide/app-compatibility/test-debug" target="_blank">app compatibility framework</a> by enabling the <span style="color: #0d904f; font-family: Courier;">UNIVERSAL_RESIZABLE_BY_DEFAULT</span> flag.</p> <p>For existing apps that restrict orientation and aspect ratio, these changes may result in problems like overlapping layouts. To solve these issues and meet user expectations, our vision is that apps are built to be adaptive, to provide an optimal experience whether someone is using the app on a phone, foldable, tablet, Chromebook, XR or in a car.</p> <h3><span style="font-size: large;">Resolving common problems</span></h3> <ul><ul> <li><b>Avoid stretched UI components:</b> If layouts were designed and built with the assumption of phone screens, then app functionality may break for other aspect ratios. For example, if a layout was built assuming a portrait aspect ratio, then UI elements that fill the max width of the window will appear stretched in landscape-oriented windows. If layouts aren’t built to scroll, then users may not be able to click on buttons or other UI elements that are offscreen, resulting in confusing or broken behavior. Add a <a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier#%28androidx.compose.ui.Modifier%29.widthIn%28androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp%29" target="_blank">maximum width</a> to components to avoid stretching, and add <a href="https://developer.android.com/develop/ui/compose/touch-input/pointer-input/scroll" target="_blank">scrolling</a> to ensure all content is reachable.</li></ul><ul> <li><b>Ensure camera compatibility in both orientations:</b> Camera viewfinder previews might assume a specific aspect ratio and orientation relative to the camera sensor, resulting in stretching or flipped previews when those assumptions are broken. <a href="https://developer.android.com/media/camera/camerax/orientation-rotation" target="_blank">Ensure viewfinders rotate properly and account for the UI aspect ratio differing from the sensor aspect ratio</a>.</li></ul><ul> <li><b>Preserve state across when window size changes:</b> Removing orientation and aspect ratio restrictions also means that the window sizes of apps will change more frequently in response to how the user prefers to use an app, such as by rotating, folding, or resizing an app in multi-window or free-form windowing modes. Orientation changes and resizing will result in Activity recreation by default. To ensure a good user experience, it is critical that <a href="https://developer.android.com/topic/libraries/architecture/saving-states" target="_blank">app state is preserved</a> through these configuration changes so that users don’t lose their place in the app when changing posture or changing windowing modes.</li> </ul></ul> <p>To account for different window sizes and aspect ratios, use <a href="https://developer.android.com/develop/ui/compose/layouts/adaptive/use-window-size-classes" target="_blank">window size classes</a> to drive layout behavior in a way that doesn’t require device-specific customizations. Apps should also be built with the assumption that window sizes will frequently change. It’s not necessary to build duplicate orientation-specific layouts - instead, ensure your existing UIs can re-layout well no matter what the window size is. If you have a landscape- or portrait-specific layout, those layouts will still be used.</p> <h3><span style="font-size: large;">Optimizing for window sizes by building adaptive</span></h3> <p>If you're already building <a href="https://developer.android.com/develop/ui/compose/layouts/adaptive" target="_blank">adaptive layouts</a> and supporting all orientations, you're set up for success as your app will be prepared for each of the device types and windowing modes your users want to use your app in and these changes should have minimal impact.</p> <p>We've also got a range of testing resources to help you guarantee reliability. You can automate testing with tools like the Espresso testing framework and Jetpack Compose testing APIs.</p> <p><a href="https://android-developers.googleblog.com/2024/10/flipaclip-optimizes-for-tablets-and-stylus.html" target="_blank">FlipaClip</a> is a great example of why building for multiple form-factors matters: they saw 54% growth in tablet users in the four months after they optimized their app to be adaptive.</p> <h3><span style="font-size: large;">Timeline</span></h3> <p>We understand that the changes are significant for apps that have traditionally only supported portrait orientation. UI issues like buttons going off screen, overlapping content, or screens with camera viewfinders may need adjustments.</p> <p>To help you plan ahead and make the necessary adjustments, here’s the planned timeline outlining when these changes will take effect:</p> <ul><ul> <li><b>Android 16 (2025):</b> Changes described above will be the baseline experience for large screen devices (smallest screen width &gt; 600dp) for apps that target API level 36, with the option for developers to opt-out.</li></ul><ul> <li><b>Android release in 2026:</b> Changes described above will be the baseline experience for large screen devices (smallest screen width &gt;600dp) for apps that target API level 37. Developers will not have an option to opt-out.</li> </ul></ul> <div align="center"> <table> <tr> <td><b>Target API level</b></td> <td><b>Applicable devices</b></td> <td><b>Developer opt-out allowed</b></td> </tr> <tr> <td>36 (Android 16)</td> <td>Large screen devices (smallest screen width &gt;600dp)</td> <td>Yes</td> </tr> <tr> <td>37 (Anticipated)</td> <td>Large screen devices (smallest screen width &gt;600dp)</td> <td>No</td> </tr> </table> </div> <p>The deadlines for targeting a specific API level are app store specific. For Google Play, the plan is that targeting API 36 will be required in August 2026 and targeting API 37 will be required in August 2027.</p> <h2><span style="font-size: x-large;">Preparing for Android 16</span></h2> <p>Refer to the <a href="https://developer.android.com/about/versions/16/behavior-changes-16" target="_blank">Android 16 changes page</a> for all changes impacting apps in Android 16, as well as additional resources for updating your apps if you are impacted. To test your app, download the Android 16 Beta 1 developer preview and update to <span style="color: #0d904f; font-family: Courier;">targetSdkPreview = “Baklava”</span> or use the <a href="https://developer.android.com/guide/app-compatibility/test-debug" target="_blank">app compatibility framework</a> to enable specific changes.</p> <p>We're committed to helping developers embrace this new era of <a href="https://developer.android.com/adaptive-apps" target="_blank">adaptive apps</a> and unlock the full potential of their apps across the diverse Android ecosystem. Check out the <a href="https://developer.android.com/develop/ui/compose/layouts/adaptive/adaptive-dos-and-donts" target="_blank">do’s and don’ts</a> for designing and building across multiple window sizes and form factors, as well how to <a href="https://developer.android.com/training/testing/different-screens" target="_blank">test</a> across the variety of devices that your app will be used in.</p> <p>Stay tuned for more updates and resources as we approach the release of Android 16!</p>
  3. The Second Developer Preview of Android 16

    Wed, 18 Dec 2024 19:00:00 -0000

    <meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjImJmFDXwpMRSRUyK3OsYHltR8btqa-mzT2Q34suhjJjOAOlKO_0DwVXzqtjCz_oRM8CD6UOFOGySl8HJTI16R7eMLEPT5-moqhGzQxtAPvnfsMpiPLLY-P5xgJ34XLSsDmj09xlsoPxt3upGcWzj4WMUa9XaeSp-nA16SxU8eQ58lONjZ9cdy13ylUAU/s1600/A16DP1-Feature%20%281%29.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjImJmFDXwpMRSRUyK3OsYHltR8btqa-mzT2Q34suhjJjOAOlKO_0DwVXzqtjCz_oRM8CD6UOFOGySl8HJTI16R7eMLEPT5-moqhGzQxtAPvnfsMpiPLLY-P5xgJ34XLSsDmj09xlsoPxt3upGcWzj4WMUa9XaeSp-nA16SxU8eQ58lONjZ9cdy13ylUAU/s1600/A16DP1-Feature%20%281%29.png" style="display: none;" /> <em> Posted by Matthew McCullough – VP of Product Management, Android Developer</em> <p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9v1k9OJQJO50aFpos2ASIgjXE7nmTVN-CW65Pczg7bo1ttpaPNkO7mvQs6RBWEVwG70qgEiO0rNL5ARmP22Z42_G1KNz0kFFCs9TxrXifEuar13GP9aQ-2ql03rl99e7rPZm5sBKxo_uLL5hNP_lBPK82h2aRG7YcaN1r2QHCqnJIK-nOedMtxJnyJCY/s1600/android_16_platlogo_512px.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/AVvXsEj9v1k9OJQJO50aFpos2ASIgjXE7nmTVN-CW65Pczg7bo1ttpaPNkO7mvQs6RBWEVwG70qgEiO0rNL5ARmP22Z42_G1KNz0kFFCs9TxrXifEuar13GP9aQ-2ql03rl99e7rPZm5sBKxo_uLL5hNP_lBPK82h2aRG7YcaN1r2QHCqnJIK-nOedMtxJnyJCY/s1600/android_16_platlogo_512px.png" width="200" /></a></div> <div style="text-align: left;"><br /></div><p>The second developer preview of Android 16 is now available to test with your apps. This build includes changes designed to enhance the app experience, improve battery life, and boost performance while minimizing incompatibilities, and your feedback is critical in helping us understand the full impact of this work.</p> <h3>System triggered profiling</h3> <p><span style="color: #0d904f; font-family: courier;">ProfilingManager</span> was added in Android 15, giving apps the ability to request profiling data collection using Perfetto on public devices in the field. To help capture challenging trace scenarios such as startups or ANRs, <span style="color: #0d904f; font-family: courier;">ProfilingManager</span> now includes System Triggered Profiling. Apps can use <a href="https://developer.android.com/reference/android/os/ProfilingManager#addProfilingTriggers%28java.util.List%3Candroid.os.ProfilingTrigger%3E%29" target="_blank"><span style="font-family: courier;">ProfilingManager#addProfilingTriggers()</span></a> to register interest in receiving information about these flows. Flows covered in this release include <span style="color: #0d904f; font-family: courier;">onFullyDrawn</span> for activity based cold starts, and ANRs.</p> <div style="background: #f8f8f8; overflow:auto;width:auto;border:0;"><pre style="margin: 0; line-height: 125%"><span style="color: #008000; font-weight: bold">val</span> anrTrigger = ProfilingTrigger.Builder( ProfilingTrigger.TRIGGER_TYPE_ANR ) .setRateLimitingPeriodHours(<span style="color: #666666">1</span>) .build() <span style="color: #008000; font-weight: bold">val</span> startupTrigger: ProfilingTrigger = <span style="color: #408080; font-style: italic">//...</span> mProfilingManager.addProfilingTriggers(listOf(anrTrigger, startupTrigger)) </pre></div> <h3>Start component in <span style="color: #0d904f; font-family: courier;">ApplicationStartInfo</span></h3> <p><span style="color: #0d904f; font-family: courier;">ApplicationStartInfo</span> was added in Android 15, allowing an app to see reasons for process start, start type, start times, throttling, and other useful diagnostic data. Android 16 adds <a href="https://developer.android.com/reference/android/app/ApplicationStartInfo#getStartComponent%28%29" target="_blank"><span style="font-family: courier;">getStartComponent()</span></a> to distinguish what component type triggered the start, which can be helpful for optimizing the startup flow of your app.</p> <h3>Richer Haptics</h3> <p>Android has exposed limited control over the haptic actuator since its inception.</p> <p>Android 11 added support for more complex haptic effects that more advanced actuators can support through <span style="font-family: courier;"><a href="https://developer.android.com/reference/android/os/VibrationEffect.Composition" target="_blank">VibrationEffect.Compositions</a></span> of device-defined semantic primitives.</p> <p>Android 16 adds <a href="https://developer.android.com/reference/android/os/vibrator/package-summary" target="_blank">haptic APIs</a> that let apps define the amplitude and frequency curves of a haptic effect while abstracting away differences between device capabilities.</p> <h3>Better job introspection</h3> <p>Android 16 introduces <a href="https://developer.android.com/reference/android/app/job/JobScheduler#getPendingJobReasons%28int%29" target="_blank"><span style="font-family: courier;">JobScheduler#getPendingJobReasons(int jobId)</span></a> which can return multiple reasons why a job is pending, due to both explicit constraints set by the developer and implicit constraints set by the system.</p> <p>We're also introducing <a href="https://developer.android.com/reference/android/app/job/JobScheduler#getPendingJobReasonsHistory%28int%29" target="_blank"><span style="font-family: courier;">JobScheduler#getPendingJobReasonsHistory(int jobId)</span></a>, which returns a list of the most recent constraint changes.</p> <p>The API can help you debug why your jobs may not be executing, especially if you're seeing reduced success rates with certain tasks or latency issues with job completion as well. This can also better help you understand if certain jobs are not completing due to system defined constraints versus explicitly set constraints.</p> <h3>Adaptive refresh rate</h3> <p>Adaptive refresh rate (ARR), introduced in Android 15, enables the display refresh rate on supported hardware to adapt to the content frame rate using discrete VSync steps. This reduces power consumption while eliminating the need for potentially jank-inducing mode-switching.</p> <p>Android 16 DP2 introduces <a href="https://developer.android.com/reference/android/view/Display#hasArrSupport%28%29" target="_blank"><span style="font-family: courier;">hasArrSupport()</span></a> and <a href="https://developer.android.com/reference/android/view/Display#getSuggestedFrameRate%28int%29" target="_blank"><span style="font-family: courier;">getSuggestedFrameRate(int)</span></a> while restoring <a href="https://developer.android.com/reference/android/view/Display#getSupportedRefreshRates%28%29" target="_blank"><span style="font-family: courier;">getSupportedRefreshRates()</span></a> to make it easier for your apps to take advantage of ARR.</p> <p><a href="https://developer.android.com/jetpack/androidx/releases/recyclerview#version_14_2" target="_blank">RecyclerView 1.4</a> internally supports ARR when it is <a href="https://android.googlesource.com/platform/frameworks/support/+/a1e9ab3e5fd52e885731bd762ff7dd4a64b25505" target="_blank">settling from a fling or smooth scroll</a>, and we're continuing our work to add ARR support into more Jetpack libraries. This <a href="https://developer.android.com/media/optimize/performance/frame-rate" target="_blank">frame rate article</a> covers many of the APIs you can use to set the frame rate so that your app can directly leverage ARR.</p> <h3>Job execution optimizations</h3> <p>Starting in Android 16, we're adjusting regular and expedited job execution runtime quota based on the following factors:</p> <ul><ul> <li>Which <a href="https://developer.android.com/topic/performance/appstandby" target="_blank">app standby bucket</a> the application is in; active standby buckets will be given a generous runtime quota.</li></ul><ul> <li>Jobs started while the app is visible to the user and continues after the app becomes invisible will adhere to the job runtime quota.</li></ul><ul> <li>Jobs that are executing concurrently with a foreground service will adhere to the job runtime quota. If you need to perform a data transfer that may take a long time consider using a <a href="https://developer.android.com/develop/background-work/background-tasks/uidt" target="_blank">user initiated data transfer</a>.</li></ul><ul> </ul></ul> <blockquote><b>Note:</b> To understand how to further debug and test the behavior change, read more about <a href="https://developer.android.com/about/versions/16/behavior-changes-all#job-quota-opt" target="_blank"><span style="font-family: courier;">JobScheduler</span> quota optimizations</a>.</blockquote> <h4><span style="font-size: large;">Fully deprecating <span style="color: #0d904f; font-family: courier;">JobInfo#setImportantWhileForeground</span></span></h4> <p>The <a href="https://developer.android.com/reference/android/app/job/JobInfo.Builder#setImportantWhileForeground%28boolean%29" target="_blank"><span style="font-family: courier;">JobInfo.Builder#setImportantWhileForeground(boolean)</span></a> method indicates the importance of a job while the scheduling app is in the foreground or when temporarily exempted from background restrictions.</p> <p>This method has been deprecated since Android 12 (API 31). Starting in Android 16, it will no longer function effectively and calling this method will be ignored.</p> <p>This removal of functionality also applies to <a href="https://developer.android.com/reference/android/app/job/JobInfo#isImportantWhileForeground%28%29" target="_blank"><span style="font-family: courier;">JobInfo#isImportantWhileForeground()</span></a>. Starting in Android 16, if the method is called, the method will return false.</p> <h3>Deprecated Disruptive Accessibility Announcements</h3> <p>Android 16 DP2 deprecates accessibility announcements, characterized by the use of <a href="https://developer.android.com/reference/android/view/View#announceForAccessibility%28java.lang.CharSequence%29" target="_blank"><span style="font-family: courier;">announceForAccessibility</span></a> or the dispatch of <a href="https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_ANNOUNCEMENT" target="_blank"><span style="font-family: courier;">TYPE_ANNOUNCEMENT AccessibilityEvents</span></a>. They can create inconsistent user experiences for users of TalkBack and Android's screen reader, and alternatives better serve a broader range of user needs across a variety of Android's assistive technologies.</p> <p>Examples of alternatives:</p> <ul><ul> <li>For significant UI changes like window changes, use <a href="https://developer.android.com/reference/android/app/Activity#setTitle%28java.lang.CharSequence%29" target="_blank"><span style="font-family: courier;">Activity.setTitle(CharSequence)</span></a> and <a href="https://developer.android.com/reference/android/view/View#setAccessibilityPaneTitle%28java.lang.CharSequence%29" target="_blank"><span style="font-family: courier;">setAccessibilityPaneTitle(java.lang.CharSequence)</span></a>. In Compose use <a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/package-summary#%28androidx.compose.ui.semantics.SemanticsPropertyReceiver%29.paneTitle%28%29" target="_blank"><span style="font-family: courier;">Modifier.semantics { paneTitle = "paneTitle" }</span></a></li></ul><ul> <li>To inform the user of changes to critical UI, use <a href="https://developer.android.com/reference/android/view/View#setAccessibilityLiveRegion%28int%29" target="_blank"><span style="font-family: courier;">setAccessibilityLiveRegion(int)</span></a>. In Compose use <a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/package-summary#%28androidx.compose.ui.semantics.SemanticsPropertyReceiver%29.liveRegion%28%29" target="_blank"><span style="font-family: courier;">Modifier.semantics { liveRegion = LiveRegionMode.[Polite|Assertive] }</span></a>. These should be used sparingly as they may generate announcements every time a View or composable is updated.</li></ul><ul> <li>To notify users about errors, send an AccessibilityEvent of type <a href="https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#CONTENT_CHANGE_TYPE_ERROR" target="_blank"><span style="font-family: courier;">AccessibilityEvent#CONTENT_CHANGE_TYPE_ERROR</span></a> and set <a href="https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setError%28java.lang.CharSequence%29" target="_blank"><span style="font-family: courier;">AccessibilityNodeInfo#setError(CharSequence)</span></a>, or use <a href="https://developer.android.com/reference/android/widget/TextView#setError%28java.lang.CharSequence%29" target="_blank"><span style="font-family: courier;">TextView#setError(CharSequence)</span></a>.</li> </ul></ul> <p>The deprecated <a href="https://developer.android.com/reference/android/view/View#announceForAccessibility%28java.lang.CharSequence%29" target="_blank"><span style="font-family: courier;">announceForAccessibility</span></a> API includes more detail on suggested alternatives.</p> <h3>Cloud search in photo picker</h3> <p>The <a href="https://developer.android.com/training/data-storage/shared/photopicker" target="_blank">photo picker</a> provides a safe, built-in way for users to grant your app access to selected images and videos from both local and cloud storage, instead of their entire media library. Using a combination of <a href="https://source.android.com/devices/architecture/modular-system" target="_blank">Modular System Components</a> through <a href="https://support.google.com/product-documentation/answer/11412553" target="_blank">Google System Updates</a> and <a href="https://developers.google.com/android/guides/overview" target="_blank">Google Play services</a>, it's supported back to <a href="https://developer.android.com/reference/android/os/Build.VERSION_CODES#KITKAT" target="_blank">Android 4.4 (API level 19)</a>. Integration requires just a few lines of code with the associated <a href="https://developer.android.com/jetpack/androidx/releases/activity" target="_blank">Android Jetpack library</a>.</p> <p>The developer preview includes <a href="https://developer.android.com/sdk/api_diff/b-dp2-incr/changes/pkg_android.provider" target="_blank">new APIs to enable searching</a> from the cloud media provider for the Android photo picker. Search functionality in the photo picker is coming soon.</p> <h3>Ranging with enhanced security</h3> <p>Android 16 adds support for <a href="https://developer.android.com/reference/android/net/wifi/rtt/SecureRangingConfig" target="_blank">robust security features</a> in WiFi location on supported devices with WiFi 6's 802.11az, allowing apps to combine the higher accuracy, greater scalability, and dynamic scheduling of the protocol with security enhancements including AES-256-based encryption and protection against MITM attacks. This allows it to be used more safely in proximity use cases, such as unlocking a laptop or a vehicle door. 802.11az is integrated with the Wi-Fi 6 standard, leveraging its infrastructure and capabilities for wider adoption and easier deployment.</p> <h3>Health Connect updates</h3> <p>Health Connect in the developer preview adds <span style="color: #0d904f; font-family: courier;">ACTIVITY_INTENSITY</span>, a new datatype defined according to World Health Organization guidelines around moderate and vigorous activity. Each record requires the start time, the end time and whether the activity intensity is moderate or vigorous.</p> <p>Health Connect also contains updated APIs supporting health records. This allows apps to read and write medical records in FHIR format with explicit user consent. This API is currently in an early access program. Sign up if you'd like to <a href="https://forms.gle/43HJz4Fm2UQLWy5W8" target="_blank">be part of our early access program</a>.</p> <h3>Predictive back additions</h3> <p>Android 16 adds new APIs to help you enable predictive back system animations in gesture navigation such as the back-to-home animation. <a href="https://developer.android.com/reference/android/window/OnBackInvokedDispatcher#registerOnBackInvokedCallback%28int,%20android.window.OnBackInvokedCallback%29" target="_blank">Registering the <span style="font-family: courier;">onBackInvokedCallback</span></a> with the new <a href="https://developer.android.com/reference/android/window/OnBackInvokedDispatcher#PRIORITY_SYSTEM_NAVIGATION_OBSERVER" target="_blank"><span style="font-family: courier;">PRIORITY_SYSTEM_NAVIGATION_OBSERVER</span></a> allows your app to receive the regular onBackInvoked call whenever the system handles a back navigation without impacting the normal back navigation flow.</p> <p>Android 16 additionally adds the <a href="https://developer.android.com/reference/android/window/SystemOnBackInvokedCallbacks#finishAndRemoveTaskCallback%28android.app.Activity%29" target="_blank"><span style="font-family: courier;">finishAndRemoveTaskCallback()</span></a> and <a href="https://developer.android.com/reference/android/window/SystemOnBackInvokedCallbacks#moveTaskToBackCallback%28android.app.Activity%29" target="_blank"><span style="font-family: courier;">moveTaskToBackCallback()</span></a>. By registering these callbacks with the <span style="color: #0d904f; font-family: courier;">OnBackInvokedDispatcher</span>, the system can trigger specific behaviors and play corresponding ahead-of-time animations when the back gesture is invoked.</p> <h2><span style="font-size: x-large;"><a href="https://android-developers.googleblog.com/2024/10/android-sdk-release-update.html" target="_blank">Two Android API releases in 2025</a></span></h2> <p>This preview is for the next major release of Android with a planned launch in Q2 of 2025 and we plan to have another release with new developer APIs in Q4. The Q2 major release will be the only release in 2025 to include planned behavior changes that could affect apps. The Q4 minor release will pick up feature updates, optimizations, and bug fixes; it will not include any app-impacting behavior changes.</p> <div style="text-align: center;"><img alt="2025 SDK release timeline showing a features only update in Q1 and Q3, a major SDK release with behavior changes, APIs, and features in Q2, and a minor SDK release with APIs and features in Q4" border="0" height="164" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSeVe1-ddLYBDekoJnJP_c3Qq3BOxmM8IOvx6DbeaQCpau5VrnpHG8G0UFayJsIrVZehmY-Sf85Wt8iDvxJ5M8D0fGOl4M_ucFffyosC4AgRae6R6gN-mNrm3Jp8XYsJtQVHGqv84obbkuy4DvFbDgwdBXeuQ_JOveA2IWC1hbned7OkXJfWClTO2Szac/w640-h164/image2.png" width="640" /></div> <p>We'll continue to have quarterly Android releases. The Q1 and Q3 updates in-between the API releases will provide incremental updates to help ensure continuous quality. We’re actively working with our device partners to bring the Q2 release to as many devices as possible.</p> <p>There’s no change to the target API level requirements and the associated dates for apps in Google Play; our plans are for one annual requirement each year, and that will be tied to the major API level.</p> <h3>How to get ready</h3> <p>In addition to performing compatibility testing on the next major release, make sure that you're compiling your apps against the new SDK, and use the compatibility framework to enable <span style="color: #0d904f; font-family: courier;">targetSdkVersion</span>-gated behavior changes as they become available for early testing.</p> <h3>App compatibility</h3> <div style="text-align: center;"><img alt="The Android 16 production timeline shows the release stages, highlighting 'Beta Releases' and 'Platform Stability' in blue and green, respectively, from December to the final release." border="0" height="164" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4OeS_v0qVUAkcecn122Ab6sPyMcFpM9xBQZziUc1ruv-udM_77bI0GDRaL0_KAIQOYwnqVSmNbLZ8tunj_dL-rOKv9Oqq-jM5rAod9-vSdbMr1fYhxRQSK5P8A2U81rEu7fF-lVERVUO5JRhx_HuWp7zZ6egxMjtGIYZRWdrAj-037DyPCiiPEpailMY/s1600/image1.png" width="640" /></div> <p>The Android 16 Preview program runs from November 2024 until the final public release next year. At key development milestones, we'll deliver updates for your development and testing environments. Each update includes SDK tools, system images, emulators, API reference, and API diffs. We'll highlight critical APIs as they are ready to test in the preview program in blogs and on the <a href="https://developer.android.com/about/versions/16" target="_blank">Android 16 developer website</a>.</p> <p>We’re targeting Late Q1 of 2025 for our Platform Stability milestone. At this milestone, we’ll deliver final SDK/NDK APIs and also final internal APIs and app-facing system behaviors. We’re expecting to reach Platform Stability in March 2025, and from that time you’ll have several months before the official release to do your final testing. Learn more in the <a href="https://developer.android.com/about/versions/16/overview#timeline" target="_blank">release timeline details</a>.</p> <h2><span style="font-size: x-large;">Get started with Android 16</span></h2> <p>You can get started today with Developer Preview 2 by flashing a system image and updating the tools. If you are currently on Developer Preview 1, you will automatically get an over-the-air update to Developer Preview 2. We're looking for your feedback so please report issues and submit feature requests on the <a href="https://developer.android.com/about/versions/16/feedback" target="_blank">feedback page</a>. The earlier we get your feedback, the more we can include in the final release.</p> <p>For the best development experience with Android 16, we recommend that you use the latest preview of the Android Studio Ladybug feature drop. Once you’re set up, here are some of the things you should do:</p> <ul><ul> <li>Compile against the new SDK, test in CI environments, and report any issues in our tracker on the <a href="https://developer.android.com/about/versions/16/feedback#issue_tracker" target="_blank">feedback page</a>.</li></ul><ul> <li>Test your current app for compatibility, learn whether your app is affected by changes in Android 16, and install your app onto a device or emulator running Android 16 and extensively test it.</li> </ul></ul> <p>We’ll update the <a href="https://developer.android.com/about/versions/16/download" target="_blank">preview system images</a> and SDK regularly throughout the Android 16 release cycle. This preview release is for developers only and not intended for daily consumer use. We're making it <a href="https://developer.android.com/about/versions/16/get" target="_blank">available by manual download</a>. Once you’ve manually installed a preview build, you’ll automatically get future updates over-the-air for all later previews and Betas.</p> <p>If you've already installed Android 15 QPR Beta 2 and would like to flash Android 16 Developer Preview 2, you can do so without first having to wipe your device.</p> <p>As we reach our Beta releases, we'll be inviting consumers to try Android 16 as well, and we'll open up enrollment for Android 16 in the Android Beta program at that time.</p> <p>For complete information, visit the <a href="https://developer.android.com/about/versions/16" target="_blank">Android 16 developer site</a>.</p>