The Second Beta of Android 16



The Second Beta of Android 16 1

Posted by Matthew McCullough – VP of Product Administration, Android Developer

The Second Beta of Android 16 2

At this time we’re releasing the second beta of Android 16, persevering with our work to construct a platform that allows artistic expression. You’ll be able to enroll any supported Pixel gadget to get this and future Android Beta updates over-the-air.

This construct provides new assist for skilled digicam experiences, graphical results, extends our efficiency framework, and continues the evolution of options associated to privateness, safety, and background duties. We’re trying ahead to listening to what you suppose, and thanks prematurely in your continued assist in making Android a platform that works for everybody.

Media and digicam updates

Android 16 enhances assist for skilled digicam customers, permitting for hybrid auto publicity together with exact shade temperature and tint changes. It is simpler than ever to seize movement pictures with new Intent actions, and we’re persevering with to enhance UltraHDR pictures, with assist for HEIC encoding and new parameters from the ISO 21496-1 draft commonplace.

Hybrid auto-exposure

Android 16 provides new hybrid auto-exposure modes to Camera2, permitting you to manually management particular facets of publicity whereas letting the auto-exposure (AE) algorithm deal with the remaining. You’ll be able to management ISO + AE, and publicity time + AE, offering larger flexibility in comparison with the present strategy the place you both have full handbook management or rely fully on auto-exposure.

enjoyable setISOPriority() {
    // ... (Your present code earlier than the snippet) ...

    val availablePriorityModes = mStaticInfo.traits.get(
        CameraCharacteristics.CONTROL_AE_AVAILABLE_PRIORITY_MODES
    )

    // ... (Your present code between the snippets) ...

    // Activate AE mode to set precedence mode
    reqBuilder.set(
        CaptureRequest.CONTROL_AE_MODE,
        CameraMetadata.CONTROL_AE_MODE_ON
    )
    reqBuilder.set(
        CaptureRequest.CONTROL_AE_PRIORITY_MODE,
        CameraMetadata.CONTROL_AE_PRIORITY_MODE_SENSOR_SENSITIVITY_PRIORITY
    )
    reqBuilder.set(
        CaptureRequest.SENSOR_SENSITIVITY,
        TEST_SENSITIVITY_VALUE
    )
    val request: CaptureRequest = reqBuilder.construct()

    // ... (Your present code after the snippet) ...
}

Exact shade temperature and tint changes

Android 16 provides digicam assist for wonderful shade temperature and tint changes to raised assist skilled video recording functions. White stability settings are at the moment managed by way of CONTROL_AWB_MODE, which comprises choices restricted to a preset checklist, equivalent to Incandescent, Cloudy, and Twilight. The COLOR_CORRECTION_MODE_CCT permits the usage of COLOR_CORRECTION_COLOR_TEMPERATURE and COLOR_CORRECTION_COLOR_TINT for exact changes of white stability primarily based on the correlated shade temperature.

enjoyable setCCT() {
    // ... (Your present code earlier than this level) ...

    val colorTemperatureRange: Vary<Int> =
        mStaticInfo.traits[CameraCharacteristics.COLOR_CORRECTION_COLOR_TEMPERATURE_RANGE]

    // Set to handbook mode to allow CCT mode
    reqBuilder[CaptureRequest.CONTROL_AWB_MODE] = CameraMetadata.CONTROL_AWB_MODE_OFF
    reqBuilder[CaptureRequest.COLOR_CORRECTION_MODE] = CameraMetadata.COLOR_CORRECTION_MODE_CCT
    reqBuilder[CaptureRequest.COLOR_CORRECTION_COLOR_TEMPERATURE] = 5000
    reqBuilder[CaptureRequest.COLOR_CORRECTION_COLOR_TINT] = 30

    val request: CaptureRequest = reqBuilder.construct()

    // ... (Your present code after this level) ...
}

Five photos of the back of a Google Pixel phone demonstrate different color temperatures and tints. The original photo is in the top left, followed by Tint -50, Tint +50, Temp 3000, and Temp 7000.

Movement picture seize intent actions

Android 16 provides commonplace Intent actions — ACTION_MOTION_PHOTO_CAPTURE, and ACTION_MOTION_PHOTO_CAPTURE_SECURE — which request that the digicam utility seize a movement picture and return it.

Moving image of a diverse group of friends playing a game of horseshoe

You need to both go an additional EXTRA_OUTPUT to regulate the place the picture will likely be written, or a Uri by way of Intent setClipData. In the event you do not set a ClipData, it will likely be copied there for you when calling Context.startActivity.

UltraHDR picture enhancements

A split-screen image compares Standard Dynamic Range (SDR) and High Dynamic Range (HDR) image quality side-by-side using a singular image of a detailed landscape. The HDR side is more vivid and vibrant.

Android 16 continues our work to ship dazzling picture high quality with UltraHDR pictures. It provides assist for UltraHDR pictures within the HEIC file format. These pictures will get ImageFormat sort HEIC_ULTRAHDR and can include an embedded gainmap just like the present UltraHDR JPEG format. We’re engaged on AVIF assist for UltraHDR as effectively, so keep tuned.

As well as, Android 16 implements extra parameters in UltraHDR from the ISO 21496-1 draft commonplace, together with the flexibility to get and set the colorspace that gainmap math needs to be utilized in, in addition to assist for HDR encoded base pictures with SDR gainmaps.

Customized graphical results with AGSL

Android 16 provides RuntimeColorFilter and RuntimeXfermode, permitting you to creator advanced results like Threshold, Sepia, and Hue Saturation and apply them to attract calls. Since Android 13, you’ve got been ready to make use of AGSL to create customized RuntimeShaders that reach Shaders. The brand new API mirrors this, including an AGSL-powered RuntimeColorFilter that extends ColorFilters, and a Xfermode impact that permits you to implement AGSL-based customized compositing and mixing between supply and vacation spot pixels.

personal val thresholdEffectString = """
    uniform half threshold;
    half4 principal(half4 c) {
        half luminosity = dot(c.rgb, half3(0.2126, 0.7152, 0.0722));
        half bw = step(threshold, luminosity);
        return bw.xxx1 * c.a;
    }"""

enjoyable setCustomColorFilter(paint: Paint) {
   val filter = RuntimeColorFilter(thresholdEffectString)
   filter.setFloatUniform(0.5)
   paint.colorFilter = filter
}

Habits adjustments

With each Android launch, we search to make the platform extra environment friendly, privateness aware, internationalization pleasant, and sturdy, balancing the wants of apps in opposition to {hardware} assist, system efficiency, consumer privateness, and battery life. This can lead to conduct adjustments that influence compatibility.

Edge to edge opt-out going away

Android 15 enforced edge-to-edge for apps concentrating on Android 15 (SDK 35), however your app might opt-out by setting R.attr#windowOptOutEdgeToEdgeEnforcement to true. As soon as your app targets Android 16 (Baklava), R.attr#windowOptOutEdgeToEdgeEnforcement is deprecated and disabled and your app can not opt-out of going edge-to-edge. To be suitable with Android 16 Beta 2, guarantee your app helps edge-to-edge and take away any use of R.attr#windowOptOutEdgeToEdgeEnforcement. To assist edge-to-edge, see the Compose and Views steerage. Please tell us about considerations in our tracker on the suggestions web page.

Well being and health permissions

For apps concentrating on Android 16 or increased, BODY_SENSORS permissions are transitioning to the granular permissions underneath android.permissions.well being additionally utilized by Well being Join. Any API beforehand requiring BODY_SENSORS or BODY_SENSORS_BACKGROUND will now require the corresponding android.permissions.well being permission. This impacts the next knowledge varieties, APIs, and foreground service varieties:

In case your app makes use of these APIs, it ought to now request the respective granular permissions:

These permissions are the identical as people who guard entry to studying knowledge from Well being Join, the Android datastore for well being, health, and wellness knowledge.

Deserted empty jobs cease motive

An deserted job happens when the JobParameters object related to the job has been rubbish collected, however jobFinished has not been known as to sign job completion. This means that the job could also be working and being rescheduled with out the appliance’s consciousness.

Purposes in Android 16 that depend on JobScheduler with out sustaining a powerful reference to the JobParameters object will now be granted the brand new job cease motive STOP_REASON_TIMEOUT_ABANDONED on timeout, as a substitute of STOP_REASON_TIMEOUT.

If there are frequent occurrences of the brand new deserted cease motive, the system will take mitigation steps to scale back job frequency. Please use the brand new cease motive to detect and cut back deserted jobs.

Notice: In the event you’re utilizing WorkManager, you are not anticipated to be impacted by this modification — one good aspect impact of utilizing Android Jetpack to schedule your work.

Intent redirect adjustments

Android 16 introduces default safety hardening in opposition to Intent redirection assaults no matter your app’s targetSDK model. The removeLaunchSecurityProtection API permits you to opt-out of this safety in case your testing reveals points.

Notice: Opting out of safety protections needs to be performed with warning and solely when completely vital, as it will probably improve the danger of safety vulnerabilities.

val iSublevel = intent.getParcelableExtra("sub_intent", Intent::class.java)
iSublevel?.let {
    it.removeLaunchSecurityProtection()
    startActivity(it)
}

Elegant font APIs deprecated and disabled

Apps concentrating on Android 15 (API degree 35) have the elegantTextHeight TextView attribute set to true by default, changing the compact font with one that’s way more readable. You would override this by setting the elegantTextHeight attribute to false.

Android 16 deprecates the elegantTextHeight attribute, and the attribute will likely be ignored as soon as your app targets Android 16. The “UI fonts” managed by these APIs are being discontinued, so you must adapt any layouts to make sure constant and future proof textual content rendering in Arabic, Lao, Myanmar, Tamil, Gujarati, Kannada, Malayalam, Odia, Telugu or Thai.

Example of default eleganttextHeight behavior for apps targeting Android 14 (API level 34) and lower

default elegantTextHeight conduct for apps concentrating on Android 14 (API degree 34) and decrease

Example of default elegantTextHeight behavior for apps targeting Android 15 (API level 35) and higher

default elegantTextHeight conduct for apps concentrating on Android 15 (API degree 35) and better

16 KB web page measurement compatibility mode

Android 15 launched assist for 16KB reminiscence pages to optimize efficiency of the platform. Android 16 provides a compatibility mode, permitting some apps constructed for 4K reminiscence pages to run on a tool configured for 16KB reminiscence pages.

If Android detects that your app has 4KB aligned reminiscence pages, it is going to robotically use compatibility mode and show a notification dialog to the consumer. Setting the android:pageSizeCompat property within the AndroidManifest.xml to allow the backwards compatibility mode will stop the show of the dialog when your app launches. For finest efficiency, reliability, and stability, your app ought to nonetheless be 16KB aligned. Learn our current weblog put up about updating your apps to assist 16KB reminiscence pages for extra particulars.

Screenshot of PageSizeCompatTestApp in Android 16

Measurement system customization

Customers can now customise their measurement system in regional preferences inside Settings. The consumer choice is included as a part of the locale code, so you may register a BroadcastReceiver on ACTION_LOCALE_CHANGED to deal with locale configuration adjustments when regional preferences change.

Utilizing formatters will help match the native expertise. For instance, “0.5 in” in English (United States), is “12,7 mm” for a consumer who has set their telephone to English (Denmark) or who makes use of their telephone in English (United States) with the metric system because the measurement system choice.

To seek out these settings in Android 16 Beta 2, open the Settings app and navigate to System > Languages & area.

Content material dealing with for reside wallpapers

In Android 16, the reside wallpaper framework is gaining a brand new content material API to handle the challenges of dynamic, user-driven wallpapers. At present, reside wallpapers incorporating user-provided content material require advanced, service-specific implementations. Android 16 introduces WallpaperDescription and WallpaperInstance. WallpaperDescription permits you to determine distinct situations of a reside wallpaper from the identical service. For instance, a wallpaper that has situations on each the house display and on the lock display could have distinctive content material in each locations. The wallpaper picker and WallpaperManager use this metadata to raised current wallpapers to customers, streamlining the method so that you can create numerous and personalised reside wallpaper experiences.

Headroom APIs in ADPF

The SystemHealthManager introduces the getCpuHeadroom and getGpuHeadroom APIs, designed to supply video games and resource-intensive apps with estimates of accessible CPU and GPU sources. These strategies provide a method so that you can gauge how your app or recreation can finest enhance system well being, significantly when used along with different Android Dynamic Efficiency Framework (ADPF) APIs that detect thermal throttling. By utilizing CpuHeadroomParams and GpuHeadroomParams on supported units, it is possible for you to to customise the time window used to compute the headroom and choose between common or minimal useful resource availability. This will help you cut back your CPU or GPU useful resource utilization accordingly, main to raised consumer experiences and improved battery life.

Key sharing API

Android 16 provides APIs that assist sharing entry to Android Keystore keys with different apps. The brand new KeyStoreManager class helps granting and revoking entry to keys by app uid, and consists of an API for apps to entry shared keys.

Standardized image and audio high quality framework for TVs

The brand new MediaQuality bundle in Android 16 exposes a set of standardized APIs for entry to audio and film profiles and hardware-related settings. This permits streaming apps to question profiles and apply them to media dynamically:

    • Motion pictures mastered with a wider dynamic vary require larger shade accuracy to see delicate particulars in shadows and regulate to ambient gentle, so a profile that prefers shade accuracy over brightness could also be applicable.
    • Dwell sporting occasions are sometimes mastered with a slender dynamic vary, however are sometimes watched in daylight, so a profile that provides choice to brightness over shade accuracy can provide higher outcomes.
    • Absolutely interactive content material desires minimal processing to scale back latency, and desires increased body charges, which is why many TV’s ship with a recreation profile.

The API permits apps to change between profiles and customers to take pleasure in the advantages of tuning supported TVs to finest go well with their content material.

Accessibility

Android 16 provides extra APIs to reinforce UI semantics that assist enhance consistency for customers that depend on accessibility companies, equivalent to TalkBack.

Length added to TtsSpan

Android 16 extends TtsSpan with a TYPE_DURATION, consisting of ARG_HOURS, ARG_MINUTES, and ARG_SECONDS. This lets you straight annotate time length, making certain correct and constant text-to-speech output with companies like TalkBack.

Assist components with a number of labels

Android at the moment permits UI components to derive their accessibility label from one other, and now gives the flexibility for a number of labels to be related, a standard state of affairs in net content material. By introducing a list-based API inside AccessibilityNodeInfo, Android can straight assist these multi-label relationships. As a part of this modification, we have deprecated AccessibilityNodeInfo setLabeledBy and getLabeledBy in favor of addLabeledBy, removeLabeledBy, and getLabeledByList.

Improved assist for expandable components

Android 16 provides accessibility APIs that permit you to convey the expanded or collapsed state of interactive components, equivalent to menus and expandable lists. By setting the expanded state utilizing setExpandedState and dispatching TYPE_WINDOW_CONTENT_CHANGED AccessibilityEvents with a CONTENT_CHANGE_TYPE_EXPANDED content material change sort, you may make sure that display readers like TalkBack announce state adjustments, offering a extra intuitive and inclusive consumer expertise.

Indeterminate ProgressBars

Android 16 provides RANGE_TYPE_INDETERMINATE, giving a method so that you can expose RangeInfo for each determinate and indeterminate ProgressBar widgets, permitting companies like TalkBack to extra constantly present suggestions for progress indicators.

Tri-state CheckBox

The brand new AccessibilityNodeInfo getChecked and setChecked(int) strategies in Android 16 now assist a “partially checked” state along with “checked” and “unchecked.” This replaces the deprecated boolean isChecked and setChecked(boolean).

Two Android API releases in 2025

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 conduct adjustments that would have an effect on apps. The This autumn minor launch will decide up characteristic updates, optimizations, and bug fixes; like our non-SDK quarterly releases, it is not going to embody any intentional app-impacting conduct adjustments.

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

We’ll proceed to have quarterly Android releases. The Q1 and Q3 updates present incremental updates to make sure steady high quality. We’re placing extra power into working with our gadget companions to convey the Q2 launch to as many units as doable.

There’s no change to the goal API degree necessities and the related dates for apps in Google Play; our plans are for one annual requirement every year, tied to the main API degree.

Find out how to prepare

Along with performing compatibility testing on this subsequent main launch, just be sure you’re compiling your apps in opposition to the brand new SDK, and use the compatibility framework to allow targetSdkVersion-gated conduct adjustments as they develop into accessible for early testing.

App compatibility

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.

The Android 16 Preview program runs from November 2024 till the ultimate public launch in Q2 of 2025. At key improvement milestones, we’ll ship updates in your improvement and testing environments. Every replace consists of SDK instruments, system pictures, 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 ultimate SDK/NDK APIs and in addition ultimate 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. Study extra by checking the launch timeline particulars.

Get began with Android 16

You’ll be able to enroll any supported Pixel gadget to get this and future Android Beta updates over-the-air. In the event you don’t have a Pixel gadget, you may use the 64-bit system pictures with the Android Emulator in Android Studio. If you’re at the moment on Android 16 Beta 1 or are already within the Android Beta program, you’ll be supplied an over-the-air replace to Beta 2.

We’re searching for your suggestions so please report points and submit characteristic requests on the suggestions web page. The sooner we get your suggestions, the extra we will embody in our work on the ultimate launch.

For the most effective improvement expertise with Android 16, we advocate that you simply use the most recent preview of Android Studio (Meerkat). When you’re arrange, listed below are among the issues you must 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 adjustments in Android 16, and set up your app onto a tool or emulator working Android 16 and extensively check it.

We’ll replace the beta system pictures and SDK often all through the Android 16 launch cycle. When you’ve put in a beta construct, you’ll robotically get future updates over-the-air for all later previews and Betas.

For full info, go to the Android 16 developer web site.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles