HomeAndroidThe primary developer preview of Android 14

The primary developer preview of Android 14



Posted by Dave Burke, VP of Engineering

Making Android work nicely for each 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

At present we’re releasing the primary Developer Preview of Android 14, and your suggestions in these previews is a important 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 person customization. This preview is only the start, and we’ll have tons extra to share as we transfer by way of 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 repeatedly 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 on your continued assist in making Android a platform that works for everybody.

Working throughout units and kind elements

Android 14 builds on the work achieved in Android 12L and 13 to help tablets and foldable kind elements. That will help you construct apps that adapt to totally different display screen sizes, we have created window dimension lessons, sliding pane structure, Exercise embedding, and field with constraints and extra, all supported in Jetpack Compose. With each launch, our purpose 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 up to date our app high quality steering for big screens, and supplied extra studying alternatives round constructing for big screens and foldables. The massive display screen gallery incorporates confirmed design patterns together with design inspiration round the markets that your app helps akin to social and communications, media, productiveness, buying, and studying apps.

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

Streamlining background work

Android 14 continues our effort to optimize the way in which 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, akin to downloading massive recordsdata when WiFi is accessible. We’re creating a regular path for this work to simplify your app improvement and probably enhance the person expertise. We’re additionally being extra opinionated about how foreground providers needs to be used, reserving them for less than 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 modifications to current Android APIs (Foreground Providers and JobScheduler) together with including new performance for user-initiated knowledge transfers, together with an up to date requirement to declare foreground service varieties. The user-initiated knowledge switch job will make managing person initiated downloads and uploads simpler, significantly after they require constraints akin to downloading on Wi-Fi solely. The requirement to declare foreground service varieties lets you clearly outline the intent of the background work of your app whereas making it clear which use-cases are applicable for foreground providers. As well as, Google Play might 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 interior broadcast system to enhance battery life and responsiveness. Whereas many of the optimizations are inside to Android and mustn’t influence your apps, we’ve 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, akin to BATTERY_CHANGED, could also be merged into one remaining broadcast earlier than it’s delivered as soon as the app comes out of the cached state.

Precise alarms

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

Clock and calendar apps concentrating on Android 13+ (SDK 33+) that depend on precise alarms as a part of their core app workflow will be capable 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 until they qualify based mostly on the coverage language.

Customization

We’re persevering with to ensure that Android customers can tune their expertise round their particular person wants, together with enhanced accessibility and internationalization options.

Larger fonts with non-linear scaling

Beginning in Android 14, customers will be capable to scale up their font to 200%. Beforehand, the utmost font dimension scale on Pixel units 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, you must take a look at your app UI with the utmost font dimension utilizing the Font dimension choice throughout the Accessibility > Show dimension and textual content settings. Be sure that the adjusted massive textual content dimension setting is mirrored within the UI, and that it doesn’t trigger textual content to be lower off. Our documentation has extra on finest practices.

Per-app language preferences

You’ll be able to dynamically replace your app’s localeConfig with LocaleManager.setOverrideLocaleConfig to customise the set of languages displayed within the per-app language listing in Android Settings. This lets you customise the language listing 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 help for customers who converse 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 help viewer gender (who’s viewing the UI; not who’s being talked about) as in comparison with utilizing the SelectFormat in ICU which have to be utilized on a per string foundation.

To indicate personalised 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 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.

Safer implicit intents

To forestall malicious apps from intercepting intents, apps concentrating 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 shops for malware and exploits, since dynamically downloaded executables could be unexpectedly manipulated, inflicting code injection. Apps concentrating on Android 14 require dynamically loaded recordsdata 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 have been 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 units that improve to Android 14, any apps with a targetSdkVersion decrease than 23 will stay put in.

You’ll be able to take a look at apps concentrating on an older API degree utilizing the next ADB command:

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

Credential Supervisor and Passkeys help

We not too long ago introduced the alpha launch of Credential Supervisor, a brand new Jetpack API that lets you simplify your customers’ authentication journey, whereas additionally growing safety with help of passkeys. Passkeys are a considerably safer alternative for passwords and different phishable authentication elements and extra handy for customers (they require only a biometric swipe to securely sign up on any machine). Learn extra right here.

App compatibility

We’re working to make updates sooner and smoother with every platform launch by prioritizing app compatibility. In Android 14 we’ve made most app-facing modifications opt-in to present you extra time to make any crucial app modifications, and we’ve up to date our instruments and processes that will help you prepare sooner.

OpenJDK 17 Assist – This preview contains 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 (Mission Mainline), over 600M units are enabled to obtain the newest Android Runtime (ART) updates that embody these modifications. That is a part of our dedication to present apps a extra constant, safe atmosphere throughout units, and to ship new options and capabilities to customers impartial of platform releases.

Simpler testing and debugging of modifications – To make it simpler so that you can take a look at the opt-in modifications that may have an effect on your app, we’ll make a lot of them toggleable once more this yr. With the toggles, you may force-enable or disable the modifications individually from Developer choices or adb. Try the main points right here.
App compatibility toggles in Developer Choices
Platform stability milestone – Like final yr, we’re letting you recognize our Platform Stability milestone nicely prematurely, to present you extra time to plan for app compatibility work. At this milestone we’ll ship remaining SDK/NDK APIs and in addition remaining inside APIs and app-facing system behaviors. We’re anticipating to succeed in Platform Stability in June 2023, and from that point you’ll have a number of weeks earlier than the official launch to do your remaining testing. The discharge timeline particulars are right here.

Get began with Android 14

The Developer Preview has all the things that you must strive the Android 14 options, take a look at your apps, and provides us suggestions. For testing your app with tablets and foldables, the simplest approach 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) machine. For those who don’t have a Pixel machine, you should utilize the 64-bit system pictures with the Android Emulator in Android Studio.

For one of the best improvement expertise with Android 14, we advocate that you simply use the newest preview of Android Studio Giraffe (or more moderen Giraffe+ variations). When you’re arrange, listed here are a number of the issues you must do:

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

We’ll replace the preview system pictures and SDK commonly all through the Android 14 launch cycle. This preliminary preview launch is for builders solely and never meant for each day or client use, so we’re making it out there by guide 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.

For those who intend to maneuver from the Android 13 QPR Beta program to the Android 14 Developer Preview program and do not need to must wipe your machine, we advocate that you simply transfer to Developer Preview 1 now. In any other case you might run into time intervals the place the Android 13 Beta can have a more moderen construct date which can forestall you from going on to the Android 14 Developer Preview with out doing a knowledge wipe.

As we attain our Beta releases, we’ll be inviting customers to strive Android 14 as nicely, and we’ll open up enrollment for the Android Beta program at the moment. For now, please notice that the Android Beta program shouldn’t be but out there for Android 14.

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

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

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments