Monday, March 27, 2023
HomeMobileThe primary developer preview of Android 14

The primary developer preview of Android 14

Posted by Dave Burke, VP of Engineering

Making Android work effectively for every one of many billions of Android customers is a collaborative course of between us, Android {hardware} producers, and also you, our developer group.

Illustration of badge style Android 14 logo

Right this moment we’re releasing the primary Developer Preview of Android 14, and your suggestions in these previews is a essential a part of making Android higher for everybody. Android 14 continues our work to enhance your productiveness as builders, together with enhancements to efficiency, privateness, safety, and consumer customization. This preview is only the start, and we’ll have tons extra to share as we transfer by the discharge cycle.

Android continues to ship enhancements and new options year-round, and your Android 14 developer preview and Quarterly Platform Launch (QPR) beta program suggestions performs a key position in serving to Android constantly enhance. The Android 14 developer website has tons extra details about the preview, together with downloads for Pixel and the discharge timeline. We’re wanting ahead to listening to what you assume, and thanks prematurely to your continued assist in making Android a platform that works for everybody.

Working throughout gadgets and type components

Android 14 builds on the work achieved in Android 12L and 13 to assist tablets and foldable type components. That can assist you construct apps that adapt to totally different display screen sizes, we have created window measurement lessons, sliding pane structure, Exercise embedding, and field with constraints and extra, all supported in Jetpack Compose. With each launch, our aim is to make it simpler so that you can optimize your app throughout all Android surfaces.

To assist streamline getting your apps prepared we’ve got up to date our app high quality steerage for giant screens, and supplied extra studying alternatives round constructing for giant screens and foldables. The massive display screen gallery accommodates confirmed design patterns together with design inspiration round the markets that your app helps resembling social and communications, media, productiveness, procuring, and studying apps.

Multi-device experiences are an enormous a part of the way forward for Android. You may get began in the present day with the Cross system SDK preview, permitting you to construct wealthy experiences that intuitively work throughout totally different gadgets and type components, and there is extra to come back.

Streamlining background work

Android 14 continues our effort to optimize the best way apps work collectively, enhance system well being and battery life, and polish the end-user expertise.

Updates and additions to JobScheduler and Foreground Providers

It is extra difficult than essential to carry out some background work, resembling downloading massive information when WiFi is out there. We’re creating a normal path for this work to simplify your app growth and probably enhance the consumer expertise. We’re additionally being extra opinionated about how foreground companies must be used, reserving them for under the very best precedence user-facing duties in order that Android can enhance useful resource consumption and battery life.

In Android 14, we’re making adjustments to current Android APIs (Foreground Providers and JobScheduler) together with including new performance for user-initiated information transfers, together with an up to date requirement to declare foreground service sorts. The user-initiated information switch job will make managing consumer initiated downloads and uploads simpler, significantly once they require constraints resembling downloading on Wi-Fi solely. The requirement to declare foreground service sorts lets you clearly outline the intent of the background work of your app whereas making it clear which use-cases are acceptable for foreground companies. As well as, Google Play will probably be rolling out new insurance policies to make sure the suitable use of those APIs, with extra particulars coming quickly.

Optimized broadcasts

We’ve made a number of optimizations to the inner broadcast system to enhance battery life and responsiveness. Whereas many of the optimizations are inside to Android and shouldn’t impression your apps, we’ve got adjusted how apps obtain context-registered broadcasts as soon as the app goes right into a cached state. Broadcasts to context-registered receivers could also be queued and solely delivered to the app as soon as it comes out of the cached state. Moreover, some repeating context-registered broadcasts, resembling BATTERY_CHANGED, could also be merged into one closing broadcast earlier than it’s delivered as soon as the app comes out of the cached state.

Precise alarms

The invocation of actual alarms can considerably have an effect on the system’s assets, resembling battery life. So in Android 14, newly put in apps focusing on Android 13+ (SDK 33+) that aren’t clocks or calendars should request the consumer to grant them the SCHEDULE_EXACT_ALARM particular permission earlier than setting actual alarms. Apps can direct customers to the settings web page through an intent to toggle this permission, however we encourage you to guage your use circumstances and select extra flexibly scheduled alternate options when potential.

Clock and calendar apps focusing on Android 13+ (SDK 33+) that depend on actual alarms as a part of their core app workflow will have the ability to declare the USE_EXACT_ALARM regular permission as an alternative (granted on set up). Apps will be unable to publish a model of their app to the Play retailer with this permission within the manifest except they qualify primarily based on the coverage language.


We’re persevering with to guarantee that Android customers can 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%.

To mitigate points the place textual content will get too massive, beginning in Android 14, a non-linear font scaling curve is robotically utilized. This ensures that textual content that’s already massive sufficient doesn’t improve on the identical fee as smaller textual content.

Examples of text scaling showing the differences between the sizing of standard font at 100% (no scaling)on the left, standard scaling (200%) in the middle, and non-linear scaling (200%)on the rightIn Android 14, it’s best to check your app UI with the utmost font measurement utilizing the Font measurement choice throughout the Accessibility > Show measurement and textual content settings. Be certain that the adjusted massive textual content measurement setting is mirrored within the UI, and that it doesn’t trigger textual content to be reduce off. Our documentation has extra on finest practices.

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. This lets you customise the language record per area, run A/B experiments, and supply up to date locales in case your app makes use of server-side localization pushes.

IMEs can now use LocaleManager.getApplicationLocales to know the UI language of the present app to replace the keyboard language.

Grammatical Inflection API

The Grammatical An infection API lets you extra simply add assist for customers who communicate languages which have grammatical gender. For instance,

Masculine: “Vous êtes abonné à…”

Female: “Vous êtes abonnée à…”

Impartial: “Abonnement à…activé”

Grammatical gender is inherent to the language and can’t be simply labored round in some non-English languages. This new API lowers the hassle to assist viewer gender (who’s viewing the UI; not who’s being talked about) as in comparison with utilizing the SelectFormat in ICU which should be utilized on a per string foundation.

To point out customized translations, you simply want so as to add translations inflected for every grammatical gender for impacted languages and combine the API.

Privateness and Safety

Runtime receivers

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

Safer implicit intents

To forestall malicious apps from intercepting intents, apps focusing on Android 14 are restricted from sending intents internally that do not specify a bundle. Study extra right here.

Safer dynamic code loading

Dynamic code loading (DCL) introduces retailers for malware and exploits, since dynamically downloaded executables may be unexpectedly manipulated, inflicting code injection. Apps focusing on Android 14 require dynamically loaded information to be marked as read-only. Study extra right here.

Block set up of apps

Malware usually targets older API ranges to bypass safety and privateness protections which were launched in newer Android variations. To guard in opposition to this, beginning with Android 14, apps with a targetSdkVersion decrease than 23 can’t be put in. This particular model was chosen as a result of some malware apps use a targetSdkVersion of twenty-two to keep away from being subjected to the runtime permission mannequin launched in 2015 by Android 6.0 (API degree 23).

On gadgets that improve to Android 14, any apps with a targetSdkVersion decrease than 23 will stay put in.

You may check apps focusing on an older API degree utilizing the next ADB command:

adb set up --bypass-low-target-sdk-block FILENAME.apk

Credential Supervisor and Passkeys assist

We lately introduced the alpha launch of Credential Supervisor, a brand new Jetpack API that lets you simplify your customers’ authentication journey, whereas additionally rising safety with assist of passkeys. Passkeys are a considerably safer alternative for passwords and different phishable authentication components and extra handy for customers (they require only a biometric swipe to securely sign up on any system). Learn 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 to provide you extra time to make any vital app adjustments, and we’ve up to date our instruments and processes that can assist you prepare sooner.

OpenJDK 17 Assist – This preview consists of entry to 300 OpenJDK 17 lessons. We’re working laborious to totally allow Java 17 language options in upcoming developer previews. These embody document lessons, multi-line strings and sample matching instanceof. Due to Google Play system updates (Challenge Mainline), over 600M gadgets are enabled to obtain the newest Android Runtime (ART) updates that embody these adjustments. That is a part of our dedication to provide apps a extra constant, safe surroundings throughout gadgets, and to ship new options and capabilities to customers impartial of platform releases.

Simpler testing and debugging of adjustments – To make it simpler so that you can check 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 may force-enable or disable the adjustments individually from Developer choices or adb. Try the small print right here.
App compatibility toggles in Developer Choices
Platform stability milestone – Like final 12 months, we’re letting you realize our Platform Stability milestone effectively prematurely, to provide you extra time to plan for app compatibility work. At this milestone we’ll ship closing SDK/NDK APIs and in addition closing inside APIs and app-facing system behaviors. We’re anticipating to achieve Platform Stability in June 2023, and from that point you’ll have a number of weeks earlier than the official launch to do your closing testing. The discharge timeline particulars are right here.

Get began with Android 14

The Developer Preview has all the pieces you must strive the Android 14 options, check your apps, and provides us suggestions. For testing your app with tablets and foldables, the simplest method to get began is utilizing the Android Emulator in a pill or foldable configuration within the newest preview of the Android Studio SDK Supervisor. For telephones, you will get began in the present day by flashing a system picture onto a Pixel 7 Professional, Pixel 7, Pixel 6a, Pixel 6 Professional, Pixel 6, Pixel 5a 5G, Pixel 5, or Pixel 4a (5G) system. In the event you don’t have a Pixel system, you should utilize the 64-bit system photos with the Android Emulator in Android Studio.

For the perfect growth expertise with Android 14, we advocate that you just use the newest preview of Android Studio Giraffe (or newer Giraffe+ variations). When you’re arrange, listed here are a few of the issues it’s best to do:

  • Strive the brand new options and APIs – your suggestions is essential throughout the early a part of the developer preview. Report points in our tracker on the suggestions web page.
  • Take a look at your present app for compatibility – study whether or not your app is affected by default habits adjustments in Android 14; set up your app onto a tool or emulator operating Android 14 and extensively check it.
  • Take a look at your app with opt-in adjustments – Android 14 has opt-in habits adjustments that solely have an effect on your app when it’s focusing on the brand new platform. It’s necessary to grasp and assess these adjustments early. To make it simpler to check, you may toggle the adjustments on and off individually.

We’ll replace the preview system photos and SDK often all through the Android 14 launch cycle. This preliminary preview launch is for builders solely and never supposed for each day or client use, so we’re making it obtainable by handbook obtain solely. When you’ve manually put in a preview construct, you’ll robotically get future updates over-the-air for all later previews and Betas. Learn extra right here.

In the event you intend to maneuver from the Android 13 QPR Beta program to the Android 14 Developer Preview program and do not need to should wipe your system, we advocate that you just transfer to Developer Preview 1 now. In any other case you could run into time durations the place the Android 13 Beta can have a newer construct date which can stop you from going on to the Android 14 Developer Preview with out doing an information wipe.

As we attain our Beta releases, we’ll be inviting shoppers to strive Android 14 as effectively, and we’ll open up enrollment for the Android Beta program at the moment. For now, please observe that the Android Beta program will not be but obtainable for Android 14.

For full data, go to the Android 14 developer website.

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



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments