Tuesday, February 18, 2025

Latest Posts

The First Beta of Android 16



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

The primary beta of Android 16 is now accessible, 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 help for the way forward for app adaptivity, Stay Updates, the Superior Skilled Video format, and extra. We’re trying ahead to listening to what you suppose, and thanks upfront on your continued help make Android a platform that works for everybody.

Android adaptive apps

Customers count on apps to work seamlessly on all their units, no matter show dimension and type issue. To that finish, Android 16 is phasing out the power for apps to limit display orientation and resizability on massive screens. That is just like options OEMs have added over the past a number of years to massive display units to permit customers to run apps at any window dimension and side ratio.

On screens bigger than 600dp extensive, apps that concentrate on API stage 36 may have app home windows that resize; it’s best to verify your apps to make sure your present UIs scale seamlessly, working nicely throughout portrait and panorama side ratios. We’re offering frameworks, tooling, and libraries to assist.

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.

Key modifications:

Timeline:

Stay Updates

Stay Updates are a brand new class of notifications that assist customers monitor and shortly entry necessary ongoing actions.

The brand new ProgressStyle notification template offers a constant consumer expertise for Stay Updates, serving to you construct for these progress-centric consumer journeys: rideshare, supply, and navigation. It contains help for customized icons for the begin, finish, and present progress monitoring, segments and factors, consumer journey states, milestones, and extra.

ProgressStyle notifications are advised just for trip sharing, meals supply, and navigation use circumstances.

@Override
protected Notification getNotification() {
   return new Notification.Builder(mContext, CHANNEL_ID)
      .setSmallIcon(R.drawable.ic_app_icon)
      .setContentTitle("Trip requested")
      .setContentText("Searching for close by drivers")
      .setStyle(
          new Notification.ProgressStyle()
          .addProgressSegment(
              new Notification.ProgressStyle.Phase(100)
                  .setColor(COLOR_ORANGE)
           ).setProgressIndeterminate(true)
      ).construct();
}

Digicam and media updates

Android 16 advances help for the playback, creation, and modifying of high-quality media, a important use case for social and productiveness apps.

Superior Skilled Video

Android 16 introduces help 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 customary 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 raised help modifying workflows
    • Assist for prime bit-rate vary up to some 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 numerous 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 challenge. Android 16 will implement help 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.

Digicam evening mode scene detection

To assist your app know when to modify to and from an evening mode digital camera session, Android 16 provides EXTENSION_NIGHT_MODE_INDICATOR. If supported, it is accessible within the CaptureResult inside Camera2.

That is the API we briefly talked about as coming quickly within the “How Instagram enabled customers to take gorgeous low mild pictures” blogpost. That submit is a sensible information on find out how to implement evening mode along with a case research that hyperlinks higher-quality, in-app, evening mode pictures with a rise within the variety of pictures shared from the in-app digital camera.

Vertical Textual content

Android 16 provides low-level help for rendering and measuring textual content vertically to offer foundational vertical writing help for library builders. That is notably 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.

Observe: Present excessive stage textual content APIs, comparable to Textual content in Jetpack Compose, TextView, Format courses and their subclasses don’t help vertical writing programs, and don’t help 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 top = paint.measureText(textual content)
       canvas.nativeCanvas.drawText(
         textual content, 0, textual content.size, dimension.width / 2, (dimension.top - top) / 2, paint
       )
     }
  }) 
{}

Accessibility

Android 16 provides new accessibility APIs that can assist you convey your app to each consumer.

Supplemental descriptions

When an accessibility service describes a ViewGroup, it combines content material labels from its youngster views. If you happen to present a contentDescription for the ViewGroup, accessibility companies assume you’re additionally overriding the content material of non-focusable youngster 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 possibly can present textual content that gives details about a ViewGroup with out overriding data from its youngsters.

Required type fields

Android 16 provides setFieldRequired to AccessibilityNodeInfo so apps can inform an accessibility service that enter to a type discipline is required. This is a crucial situation for customers filling out many kinds of kinds, even issues so simple as a required phrases and circumstances checkbox, serving to customers to persistently establish and shortly 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 comparable 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 towards issues like system efficiency and battery life. This may end up in habits modifications that impression compatibility.

ART inner modifications

Code that leverages inner buildings of the Android Runtime (ART) could not work accurately on units working Android 16 together with earlier Android variations that replace the ART module by way of Google Play system updates. These buildings are altering in ways in which assist enhance the Android Runtime’s (ART’s) efficiency.

Impacted apps will have to be up to date. Counting on inner buildings can all the time result in compatibility issues, nevertheless it’s notably necessary to keep away from counting on code (or libraries containing code) that leverages inner ART buildings, since ART modifications aren’t tied to the platform model the system is working on; they exit to over a billion units 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 focusing 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 referred to as and KeyEvent.KEYCODE_BACK is 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 briefly decide out by setting the android:enableOnBackInvokedCallback attribute to false within the <utility> or <exercise> tag of your app’s AndroidManifest.xml file.

Predictive again help for 3-button navigation

Android 16 brings predictive again help 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 habits applies throughout all areas of the system that help predictive again animations, together with the system animations (back-to-home, cross-task, and cross-activity).

Mounted charge work scheduling optimization

Previous to focusing on Android 16, when scheduleAtFixedRate missed a activity execution resulting from being outdoors a legitimate course of lifecycle, all missed executions will instantly execute when app returns to a legitimate lifecycle.

When focusing on Android 16, at most one missed execution of scheduleAtFixedRate can be instantly executed when the app returns to a legitimate lifecycle. This habits change is predicted to enhance app efficiency. Please take a look at the habits to make sure your utility is just not impacted. You can too take a look at by utilizing the app compatibility framework and enabling the STPE_SKIP_MULTIPLE_MISSED_PERIODIC_TASKS compat flag.

Ordered broadcast precedence scope not international

In Android 16, broadcast supply order utilizing the android:precedence attribute or IntentFilter#setPriority() throughout totally different processes is not going to be assured. Broadcast priorities for ordered broadcasts will solely be revered inside the similar utility course of reasonably than throughout all system processes.

Moreover, broadcast priorities can be robotically confined to the vary (SYSTEM_LOW_PRIORITY + 1, SYSTEM_HIGH_PRIORITY – 1).

Your utility could also be impacted if it does both of the next:

      1. Your utility has declared a number of processes which have set broadcast receiver priorities for a similar intent.

      2. Your utility course of interacts with different processes and has expectations round receiving a broadcast intent in a sure order.

If the processes have to 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 accessible on much more type components.

This preview is for the subsequent 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 fall. The Q2 main launch would be the solely launch in 2025 to incorporate deliberate habits modifications that would have an effect on apps. The This fall minor launch will decide up function updates, optimizations, and bug fixes; it is not going to embody any app-impacting habits modifications.

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, which is able to land in-between the Q2 and This fall API releases, will present incremental updates to make sure steady high quality. We’re placing extra vitality into working with our system companions to convey the Q2 launch to as many units 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 foremost API stage.

Learn how to prepare

Along with performing compatibility testing on this subsequent main launch, just remember to’re compiling your apps towards the brand new SDK, and use the compatibility framework to allow targetSdkVersion-gated habits modifications as they grow to be 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 growth milestones, we’ll ship updates on your growth and testing environments. Every replace contains SDK instruments, system pictures, emulators, API reference, and API diffs. We’ll spotlight important APIs as they’re prepared to check within the preview program in blogs and on the Android 16 developer web site.

We’re focusing on March of 2025 for our Platform Stability milestone. At this milestone, we’ll ship remaining SDK/NDK APIs and in addition remaining inner 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 possibly can 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 possibly can use the 64-bit system pictures with the Android Emulator in Android Studio.

If you’re presently on Android 16 Developer Preview 2 or are already within the Android Beta program, you’ll 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, you should ignore the over-the-air replace to 25Q2 Beta 1 and watch for the discharge of 25Q1.

We’re in search of 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 embody in our work on the ultimate launch.

For one of the best growth expertise with Android 16, we advocate that you just use the most recent preview of Android Studio (Meerkat). When you’re arrange, listed here are among the issues it’s best to do:

    • Compile towards the brand new SDK, take a look at 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 take a look at it.

We’ll replace the preview/beta system pictures and SDK commonly 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 data, go to the Android 16 developer web site.

Latest Posts

Stay in touch

To be updated with all the latest news, offers and special announcements.