Thursday, October 12, 2023
HomeMobileAndroid 14 is reside in AOSP

Android 14 is reside in AOSP



Posted by Dave Burke, VP of Engineering

Immediately we’re releasing Android 14 and pushing the Android 14 supply to the Android Open Supply Challenge (AOSP). Android 14 is designed to enhance your productiveness as builders whereas enhancing efficiency, privateness, safety, and customization for customers.

Android 14 is rolling out to pick Pixel gadgets beginning at this time, and can be accessible later this 12 months on a few of your favourite gadgets from Samsung Galaxy, iQOO, Nothing, OnePlus, Oppo, Realme, Sharp, Sony, Tecno, vivo and Xiaomi.

Thanks for taking the time to take Android 14 for an early spin although our developer preview and beta applications, sharing your suggestions, and ensuring your apps ship an ideal expertise on Android 14. Making Android work nicely for every one of many billions of Android customers is a collaborative course of between us, Android {hardware} producers, and also you, our developer neighborhood.

This publish covers a collection of Android 14 adjustments which have essentially the most developer affect. For a whole record of all the Android 14 adjustments, go to the Android 14 developer web site.

Efficiency and Effectivity

A giant focus of Android 14 was on enhancing the efficiency and effectivity of the platform.

Freezing cached purposes

Previous to Android 14, cached purposes had been allowed to run considerably unconstrained. In Android 14, we freeze cached purposes after a brief time frame, giving them 0 CPU time. In Android 14 Beta populations, we see that cached processes eat as much as 50% much less CPU cycles as in comparison with Android 13 public gadgets. Thus, background work is disallowed exterior of standard Android app lifecycle APIs equivalent to foreground companies, JobScheduler, or WorkManager.

Optimized broadcasts

To maintain frozen purposes frozen longer (i.e. not get CPU time), we adjusted how apps obtain context-registered broadcasts as soon as they go right into a cached state; they might be queued, and repeating ones, equivalent to BATTERY_CHANGED, could also be merged into one broadcast.

Quicker app launches

With cached app and broadcast optimizations In Android 14, we had been capable of enhance long-standing limits on the utmost variety of cached purposes within the platform, resulting in a discount in chilly app begins that scales by the RAM current on the machine. On 8GB gadgets, the beta group noticed 20% fewer chilly app begins, and on 12GB gadgets it was over 30% fewer. Chilly startups are sluggish in comparison with heat startups and they’re costly by way of energy. This work successfully improves each energy utilization and total app startup instances.

Diminished reminiscence footprint

Bettering the Android Runtime (ART) has a huge effect on the Android user-experience. Code measurement is among the key metrics we take a look at; smaller generated information are higher for reminiscence (each RAM and storage). In Android 14, ART contains optimizations that scale back code measurement by a mean of 9.3% with out impacting efficiency.

Customization

Customization is on the core of Android’s DNA, and Android 14 continues our dedication to enabling Android customers to tune their expertise round their particular person wants, together with enhanced accessibility and internationalization options.

Greater fonts with non-linear scaling – Beginning in Android 14, customers will have the ability to scale up their font to 200%. Beforehand, the utmost font measurement scale on Pixel gadgets was 130%. A non-linear font scaling curve is routinely utilized to make sure that textual content that’s already giant sufficient doesn’t enhance on the similar charge as smaller textual content. Study extra right here.

Image showing the differences between font with no scaling at 100% on the left, standard scaling at 200% in the middle, and non-linear scaling at 200% on the right

Per-app language preferences – You may dynamically replace your app’s localeConfig with LocaleManager.setOverrideLocaleConfig to customise the set of languages displayed within the per-app language record in Android Settings. IMEs can now use LocaleManager.getApplicationLocales to know the UI language of the present app to replace the keyboard language. Beginning with Android Studio Giraffe and AGP 8.1, you possibly can configure your app to assist Android 13’s per-app language preferences routinely.

Regional preferencesRegional preferences allow customers to personalize temperature models, the primary day of the week, and numbering methods.

Grammatical Inflection – The Grammatical Inflection API lets you extra simply add assist for customers who communicate languages which have grammatical gender. To point out personalised translations, you simply want so as to add translations inflected for every grammatical gender for impacted languages and combine the API.

New media capabilities


Extremely HDR for photographs
– Android 14 provides assist for 10-bit excessive dynamic vary (HDR) photographs, with assist for the Extremely HDR picture format. The format is totally backward-compatible with JPEG, permitting apps to seamlessly interoperate with HDR photographs.

Zoom, Focus, Postview, and extra in Digicam Extensions – Android 14 upgrades and improves Digicam Extensions, permitting apps to deal with longer processing instances, enabling improved photographs utilizing compute-intensive algorithms like low-light pictures on supported gadgets.

Lossless USB audio – Android 14 gadgets can assist lossless audio codecs for audiophile-level experiences over USB wired headsets.

New graphics capabilities

Customized meshes with vertex and fragment shaders – Android 14 provides assist for customized meshes, which may be outlined as triangles or triangle strips, and might, optionally, be listed. These meshes are specified with customized attributes, vertex strides, various, and vertex/fragment shaders written in AGSL.

{Hardware} buffer renderer for Canvas – Android 14 introduces HardwareBufferRenderer to help in utilizing Android’s Canvas API to attract with {hardware} acceleration right into a HardwareBuffer, which is especially useful when your use case includes communication with the system compositor by SurfaceControl for low-latency drawing.

Growing throughout type elements

Android 14 builds on the work achieved in Android 12L and 13 to assist tablets and foldable type elements together with a taskbar supporting enhanced multitasking, large-screen optimized system apps and notification UI, exercise embedding, enhanced letterboxing, improved media projection, and extra. Our app high quality steering for giant screens together with further studying alternatives round constructing for giant screens and foldables may also help optimize your app throughout all Android surfaces, whereas the giant display gallery accommodates design patterns and inspiration for social and communications, media, productiveness, procuring, and studying apps.

Bettering your productiveness

Android 14 accommodates many updates centered on making your improvement expertise extra constant, enjoyable, and productive. Many of those updates are being made accessible on older platform releases utilizing a mix of Google Play system updates, Jetpack libraries, and Google Play companies, so you possibly can attain extra customers with them.

OpenJDK 17 Assist – Because of Google Play system updates (Challenge Mainline), over 600M gadgets are enabled to obtain the most recent Android Runtime (ART) updates that ship with Android 14. Study extra right here.

Credential Supervisor and Passkeys assistCredential Supervisor is a brand new Jetpack API that helps a number of sign-in strategies, equivalent to username and password, passkeys, and federated sign-in options (equivalent to Signal-in with Google) in a single API, simplifying your integration. Utilizing Google Play companies, Credential Supervisor is supported again to Android 4.4 (API stage 19). Learn extra right here.

Well being JoinWell being Join is a consumer managed on-device repository for consumer well being and health knowledge that makes it simpler than ever to assist an built-in well being and health expertise throughout apps and related gadgets. Well being Join is a part of the Android platform and receives updates by way of Google Play system updates with out requiring a separate obtain, and is accessible to older gadgets as an app on the Google Play retailer. Examine Well being Join and extra in What’s new in Android Well being.

Superior system sharesheets – To make it straightforward to offer your app’s customers a wealthy, constant, sharing expertise, the system sharesheets in Android 14 are configurable with customized actions and improved rating.

Extra constant and dependable foreground companies– We have collaborated with {hardware} producers equivalent to Samsung to create each a extra constant developer expertise and a extra dependable consumer expertise. To this finish, Android 14 has a brand new requirement to declare foreground service sorts and request type-specific permissions and we now have Google Play insurance policies to implement acceptable use of those APIs. We have additionally added a brand new user-initiated knowledge switch job kind, making the expertise of managing giant user-initiated uploads and downloads smoother by leveraging JobScheduler’s constraints (e.g. community constraints equivalent to unmetered WiFi).

Person expertise

Predictive Again – Android 14 introduces new Predictive Again system animations – cross-activity and cross-task – to hitch the back-to-home animation launched in Android 13. The system animations stay behind a developer possibility to permit time for extra polish and for extra apps to opt-into Predictive Again; Materials and Jetpack Predictive Again animations can be found to customers at this time.

Privateness and safety

 

Information sharing updates – Customers will see a brand new part within the location runtime permission dialog that highlights when an app shares location knowledge with third events, the place they’ll get extra data and management the app’s knowledge entry.

Partial entry to images and movies – When your app concentrating on SDK 34 requests any of the visible media permissions launched in SDK 33 (READ_MEDIA_IMAGES / READ_MEDIA_VIDEO), Android 14 customers can now grant your app entry to solely chosen images and movies. To adapt your app to this modification, we suggest following our current greatest practices.

Background exercise launchingAndroid 10 (API stage 29) and better place restrictions on when apps can begin actions when operating within the background. To additional scale back cases of sudden interruptions, apps concentrating on Android 14 must grant privileges to begin actions within the background when sending a PendingIntent or when binding a service.

Block set up of apps concentrating on older SDK variations – To guard towards malware that targets older API ranges to bypass safety and privateness protections, apps with a targetSdkVersion decrease than 23 can’t be put in on Android 14.

Runtime receivers – Apps concentrating on Android 14 should point out if dynamic Context.registerReceiver() utilization needs to be handled as “exported” or “unexported”, a continuation of the manifest-level work from earlier releases. Study extra right here.

Safe full display Intent notifications – Since full-screen intent notifications are designed for terribly high-priority notifications demanding the consumer’s fast consideration, Android 14 limits the apps granted this permission on app set up to those who present calling and alarms solely. Your app can now launch the settings web page the place customers can grant the permission.

Safer dynamic code loading – Apps concentrating on Android 14 require dynamically loaded information to be marked as read-only. Study extra right here.

Safer implicit intents – For apps concentrating on Android 14, making a mutable pending intent with an implicit intent will throw an exception, stopping them from with the ability to be used to set off sudden code paths. Apps must both make the pending intent immutable or make the intent specific. Study extra right here.

App compatibility

We’re working to make updates quicker and smoother with every platform launch by prioritizing app compatibility. In Android 14 we’ve made most app-facing adjustments opt-in till your app targets SDK model 34 to offer you extra time to make any essential app adjustments, and we’ve up to date our instruments and processes that will help you prepare sooner.

Simpler testing and debugging of adjustments – To make it simpler so that you can take a look at the opt-in adjustments that may have an effect on your app, we’ll make a lot of them toggleable once more this 12 months. With the toggles, you possibly can force-enable or disable the adjustments individually from Developer choices or adb. Try the small print right here.

image of app compatibility toggles in Developer Options

App compatibility toggles in Developer Choices.

Get your apps, libraries, instruments, and sport engines prepared!

Now’s the time to complete your remaining compatibility testing and publish any essential updates to make sure a easy app expertise.

If you happen to develop an SDK, library, software, or sport engine, it is much more vital to launch any essential updates now to forestall your downstream app and sport builders from being blocked by compatibility points and permit them to focus on the most recent SDK options. Please make sure that to let your builders know if updates are wanted to completely assist Android 14.

Testing your app includes putting in your manufacturing app onto a tool operating Android 14; you should utilize Google Play or different means. Work by all of the app’s flows and search for useful or UI points. Assessment the conduct adjustments to focus your testing. Every launch of Android accommodates adjustments to the platform that enhance privateness, safety, and the general consumer expertise, and these adjustments can have an effect on your apps. Listed here are some high adjustments to check:

Keep in mind to train libraries and SDKs that your app is utilizing in your compatibility testing. You could must replace to present SDK variations or attain out to the developer for assist.

When you’ve revealed the suitable model of your present app, you can begin the course of to replace your app’s targetSdkVersion. Assessment the conduct adjustments that apply when your app targets Android 14 and use the compatibility framework to assist detect points rapidly.

Get began with Android 14

You probably have a supported Pixel machine, and usually are not enrolled within the Android Beta program, you’ll obtain the general public Android 14 OTA replace because it turns into accessible (it might take per week or longer as this can be a phased rollout depending on machine kind and service). In case you are at present enrolled within the Android Beta program operating Android 14, you seemingly have acquired and put in the beta of the subsequent Android 14 quarterly platform launch (QPR1).

System photographs for Pixel gadgets are accessible right here for guide obtain and flash, and you will get the most recent 64-bit Android Emulator system photographs by way of the Android Studio SDK Supervisor. If you happen to’re on the lookout for the Android 14 supply, you may discover it right here within the Android Open Supply Challenge repository below the Android 14 branches.

For the very best improvement expertise with Android 14, we suggest that you just use the most recent launch of Android Studio Hedgehog. When you’re arrange, listed here are a few of the issues it’s best to do:

  • Attempt the brand new options and APIs. Report 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 default conduct adjustments in Android 14. Set up your app onto a tool or emulator operating Android 14 and extensively take a look at it.
  • Take a look at your app with opt-in adjustments – Android 14 has opt-in conduct adjustments that solely have an effect on your app when it’s concentrating on the brand new platform. It’s vital to grasp and assess these adjustments early. To make it simpler to check, you possibly can toggle the adjustments on and off individually.
  • Replace your app with the Android SDK Improve Assistant – Android Studio Hedgehog now filters and identifies the precise Android 14 API adjustments which can be related to your app, and walks you thru the steps to improve your targetSdkVersion with the Android SDK Improve Assistant.

Screengrab of Android SDK Upgrade Assistant on Google Pixel Fold

Thanks once more for collaborating in our Android developer preview and beta program! We’re trying ahead to seeing how your apps reap the benefits of the updates in Android 14.

Java and OpenJDK are emblems or registered emblems of Oracle and/or its associates.





Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments