Posted by Matthew McCullough – VP of Product Administration, Android Developer
The primary beta of Android 16 is now out there, which implies it is time to open the expertise as much as each builders and early adopters. Now you can enroll any supported Pixel system right here to get this and future Android Beta updates over-the-air.
This construct contains assist for the way forward for app adaptivity, Dwell Updates, the Superior Skilled Video format, and extra. We’re trying ahead to listening to what you suppose, and thanks prematurely on your continued assist in making Android a platform that works for everybody.
Android adaptive apps
Customers anticipate apps to work seamlessly on all their gadgets, no matter show dimension and type issue. To that finish, Android 16 is phasing out the flexibility for apps to limit display orientation and resizability on massive screens. That is much like options OEMs have added during the last a number of years to massive display gadgets to permit customers to run apps at any window dimension and facet ratio.
On screens bigger than 600dp vast, apps that concentrate on API stage 36 could have app home windows that resize; it is best to verify your apps to make sure your present UIs scale seamlessly, working nicely throughout portrait and panorama facet ratios. We’re offering frameworks, tooling, and libraries to assist.
Key modifications:
Timeline:
Dwell Updates
Dwell Updates are a brand new class of notifications that assist customers monitor and rapidly entry essential ongoing actions.
The brand new ProgressStyle notification template offers a constant consumer expertise for Dwell Updates, serving to you construct for these progress-centric consumer journeys: rideshare, supply, and navigation. It contains assist for customized icons for the begin, finish, and present progress monitoring, segments and factors, consumer journey states, milestones, and extra.
ProgressStyle notifications are urged just for trip sharing, meals supply, and navigation use instances.
@Override protected Notification getNotification() { return new Notification.Builder(mContext, CHANNEL_ID) .setSmallIcon(R.drawable.ic_app_icon) .setContentTitle("Journey requested") .setContentText("On the lookout for close by drivers") .setStyle( new Notification.ProgressStyle() .addProgressSegment( new Notification.ProgressStyle.Section(100) .setColor(COLOR_ORANGE) ).setProgressIndeterminate(true) ).construct(); }
Digital camera and media updates
Android 16 advances assist for the playback, creation, and modifying of high-quality media, a crucial use case for social and productiveness apps.
Superior Skilled Video
Android 16 introduces assist for the Superior Skilled Video (APV) codec which is designed for use for skilled stage top quality video recording and submit manufacturing.
The APV codec commonplace has the next options:
- Perceptually lossless video high quality (near uncooked video high quality)
- Low complexity and excessive throughput intra-frame-only coding (with out pixel area prediction) to higher assist modifying workflows
- Assist for prime bit-rate vary up to a couple Gbps for 2K, 4K and 8K decision content material, enabled by a light-weight entropy coding scheme
- Body tiling for immersive content material and for enabling parallel encoding and decoding
- Assist for varied chroma sampling codecs and bit-depths
- Assist for a number of decoding and re-encoding with out extreme visible high quality degradation
- Assist multi-view video and auxiliary video like depth, alpha, and preview
- Assist for HDR10/10+ and user-defined metadata
A reference implementation of APV is offered by way of the OpenAPV mission. Android 16 will implement assist for the APV 422-10 Profile that gives YUV 422 shade sampling together with 10-bit encoding and for goal bitrates of as much as 2Gbps.
Digital camera evening mode scene detection
To assist your app know when to modify to and from an evening mode digicam session, Android 16 provides EXTENSION_NIGHT_MODE_INDICATOR. If supported, it is out there within the CaptureResult inside Camera2.
That is the API we briefly talked about as coming quickly within the “How Instagram enabled customers to take beautiful low mild images” blogpost. That submit is a sensible information on easy methods to implement evening mode along with a case research that hyperlinks higher-quality, in-app, evening mode images with a rise within the variety of images shared from the in-app digicam.
Vertical Textual content
Android 16 provides low-level assist for rendering and measuring textual content vertically to supply foundational vertical writing assist for library builders. That is significantly helpful for languages like Japanese that generally use vertical writing programs. A brand new flag, VERTICAL_TEXT_FLAG, has been added to the Paint class. When this flag is about utilizing Paint.setFlags, Paint’s textual content measurement APIs will report vertical advances as a substitute of horizontal advances, and Canvas will draw textual content vertically.
Word: Present excessive stage textual content APIs, akin to Textual content in Jetpack Compose, TextView, Structure lessons and their subclasses don’t assist vertical writing programs, and don’t assist utilizing the VERTICAL_TEXT_FLAG.
val textual content = "「春は、曙。」" Field(Modifier .padding(innerPadding) .background(Coloration.White) .fillMaxSize() .drawWithContent { drawIntoCanvas { canvas -> val paint = Paint().apply { textSize = 64.sp.toPx() } // Draw textual content vertically paint.flags = paint.flags or VERTICAL_TEXT_FLAG val peak = paint.measureText(textual content) canvas.nativeCanvas.drawText( textual content, 0, textual content.size, dimension.width / 2, (dimension.peak - peak) / 2, paint ) } }) {}
Accessibility
Android 16 provides new accessibility APIs that can assist you carry your app to each consumer.
Supplemental descriptions
When an accessibility service describes a ViewGroup, it combines content material labels from its little one views. If you happen to present a contentDescription for the ViewGroup, accessibility companies assume you might be additionally overriding the content material of non-focusable little one views. This may be problematic if you wish to label issues like a drop down (e.g. “Font Household”) whereas preserving the present choice for accessibility (e.g. “Roboto”). Android 16 provides setSupplementalDescription so you may present textual content that gives details about a ViewGroup with out overriding data from its kids.
Required type fields
Android 16 provides setFieldRequired to AccessibilityNodeInfo so apps can inform an accessibility service that enter to a type area is required. This is a vital state of affairs for customers filling out many varieties of types, even issues so simple as a required phrases and situations checkbox, serving to customers to constantly determine and rapidly navigate between required fields.
Generic ranging APIs
Android 16 contains the brand new RangingManager, which offers methods to find out the space and angle on supported {hardware} between the native system and a distant system. RangingManager helps the utilization of a wide range of ranging applied sciences akin to BLE channel sounding, BLE RSSI-based ranging, Extremely-Wideband, and WiFi spherical journey time.
Habits modifications
With each Android launch, we search to make the platform extra environment friendly and sturdy, balancing the wants of your apps in opposition to issues like system efficiency and battery life. This may end up in conduct modifications that impression compatibility.
ART inside modifications
Code that leverages inside constructions of the Android Runtime (ART) might not work accurately on gadgets working Android 16 together with earlier Android variations that replace the ART module by way of Google Play system updates. These constructions are altering in ways in which assist enhance the Android Runtime’s (ART’s) efficiency.
Impacted apps will must be up to date. Counting on inside constructions can all the time result in compatibility issues, but it surely’s significantly essential to keep away from counting on code (or libraries containing code) that leverages inside ART constructions, since ART modifications aren’t tied to the platform model the system is working on; they exit to over a billion gadgets by way of Google Play system updates.
For extra data, see the Android 16 modifications affecting all apps and the restrictions on non-SDK interfaces.
Migration or opt-out required for predictive again
For apps concentrating on Android 16 or greater and working on an Android 16 or greater system, the predictive again system animations (back-to-home, cross-task, and cross-activity) are enabled by default. Moreover, the deprecated onBackPressed is just not known as and KeyEvent.KEYCODE_BACK is now not dispatched.
In case your app intercepts the again occasion and you have not migrated to predictive again but, replace your app to make use of supported again navigation APIs or quickly decide out by setting the android:enableOnBackInvokedCallback attribute to false within the <software> or <exercise> tag of your app’s AndroidManifest.xml file.
Predictive again assist for 3-button navigation
Android 16 brings predictive again assist to 3-button navigation for apps which have correctly migrated to predictive again. Lengthy-pressing the again button initiates a predictive again animation, giving customers a preview of the place the again button takes them.
This conduct applies throughout all areas of the system that assist predictive again animations, together with the system animations (back-to-home, cross-task, and cross-activity).
Mounted price work scheduling optimization
Previous to concentrating on Android 16, when scheduleAtFixedRate missed a activity execution attributable to being outdoors a sound course of lifecycle, all missed executions will instantly execute when app returns to a sound lifecycle.
When concentrating on Android 16, at most one missed execution of scheduleAtFixedRate will probably be instantly executed when the app returns to a sound lifecycle. This conduct change is predicted to enhance app efficiency. Please check the conduct to make sure your software is just not impacted. You can even check through the use of the app compatibility framework and enabling the STPE_SKIP_MULTIPLE_MISSED_PERIODIC_TASKS compat flag.
Ordered broadcast precedence scope now not international
In Android 16, broadcast supply order utilizing the android:precedence attribute or IntentFilter#setPriority() throughout completely different processes won’t be assured. Broadcast priorities for ordered broadcasts will solely be revered throughout the identical software course of moderately than throughout all system processes.
Moreover, broadcast priorities will probably be routinely confined to the vary (SYSTEM_LOW_PRIORITY + 1, SYSTEM_HIGH_PRIORITY – 1).
Your software could also be impacted if it does both of the next:
1. Your software has declared a number of processes which have set broadcast receiver priorities for a similar intent.
2. Your software course of interacts with different processes and has expectations round receiving a broadcast intent in a sure order.
If the processes must coordinate with one another, they need to talk utilizing different coordination channels.
Gemini Extensions
Samsung simply launched new Gemini Extensions on the S25 collection, demonstrating new methods Android apps can combine with the ability of Gemini. We’re working to make this performance out there on much more type elements.
This preview is for the following main launch of Android with a deliberate launch in Q2 of 2025 and we plan to have one other launch with new developer APIs in This autumn. The Q2 main launch would be the solely launch in 2025 to incorporate deliberate conduct modifications that would have an effect on apps. The This autumn minor launch will choose up function updates, optimizations, and bug fixes; it won’t embrace any app-impacting conduct modifications.
We’ll proceed to have quarterly Android releases. The Q1 and Q3 updates, which is able to land in-between the Q2 and This autumn API releases, will present incremental updates to make sure steady high quality. We’re placing further power into working with our system companions to carry the Q2 launch to as many gadgets as attainable.
There’s no change to the goal API stage necessities and the related dates for apps in Google Play; our plans are for one annual requirement annually, tied to the main API stage.
Methods to prepare
Along with performing compatibility testing on this subsequent main launch, just remember to’re compiling your apps in opposition to the brand new SDK, and use the compatibility framework to allow targetSdkVersion-gated conduct modifications as they turn into out there for early testing.
App compatibility
The Android 16 Preview program runs from November 2024 till the ultimate public launch in Q2 of 2025. At key growth milestones, we’ll ship updates on your growth and testing environments. Every replace contains SDK instruments, system photos, emulators, API reference, and API diffs. We’ll spotlight crucial APIs as they’re prepared to check within the preview program in blogs and on the Android 16 developer web site.
We’re concentrating on March of 2025 for our Platform Stability milestone. At this milestone, we’ll ship closing SDK/NDK APIs and likewise closing inside APIs and app-facing system behaviors. From that point you’ll have a number of months earlier than the ultimate launch to finish your testing. The discharge timeline particulars are right here.
Get began with Android 16
Now that we have entered the beta part, you may enroll any supported Pixel system to get this and future Android Beta updates over-the-air. If you happen to don’t have a Pixel system, you may use the 64-bit system photos with the Android Emulator in Android Studio.
If you’re at the moment on Android 16 Developer Preview 2 or are already within the Android Beta program, you may be supplied an over-the-air replace to Beta 1.
If you’re in Android 25Q1 Beta and want to take the ultimate steady launch of 25Q1 and exit Beta, it’s good to ignore the over-the-air replace to 25Q2 Beta 1 and await the discharge of 25Q1.
We’re on the lookout for your suggestions so please report points and submit function requests on the suggestions web page. The sooner we get your suggestions, the extra we are able to embrace in our work on the ultimate launch.
For one of the best growth expertise with Android 16, we advocate that you just use the newest preview of Android Studio (Meerkat). When you’re arrange, listed here are among the issues it is best to do:
- Compile in opposition to the brand new SDK, check in CI environments, and report any points in our tracker on the suggestions web page.
- Take a look at your present app for compatibility, be taught whether or not your app is affected by modifications in Android 16, and set up your app onto a tool or emulator working Android 16 and extensively check it.
We’ll replace the preview/beta system photos and SDK repeatedly all through the Android 16 launch cycle. When you’ve put in a beta construct, you’ll routinely get future updates over-the-air for all later previews and Betas.
For full data, go to the Android 16 developer website.