HomeAndroidAndroid 14 Developer Preview 2

Android 14 Developer Preview 2



Posted by Dave Burke, VP of Engineering

At present, we’re releasing the second Developer Preview of Android 14, constructing on the work of the first developer preview of Android 14 from final month with further enhancements to privateness, safety, efficiency, developer productiveness, and person customization whereas persevering with to refine the large-screen gadget expertise on tablets, foldables, and extra.

Android delivers enhancements and new options year-round, and your suggestions on the Android 14 developer preview and Quarterly Platform Launch (QPR) beta program 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 launch timeline. We’re trying 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 type components

Android 14 builds on the work carried out in Android 12L and 13 to assist tablets and foldable type components. See get began with constructing for giant screens and study foldables for a fast jumpstart on the right way to get your apps prepared. Our app high quality steerage for giant screens accommodates detailed checklists to evaluate your app. We have additionally lately launched libraries supporting low latency stylus and movement prediction.

The massive display screen gallery accommodates design inspiration for social and communications, media, productiveness, procuring, and studying app experiences.

Privateness and safety

Privateness and safety have at all times been a core a part of Android’s mission, constructed on the inspiration of app sandboxing, open supply code, and open app growth. In Android 14, we’re constructing the very best high quality platform for all by offering a safer gadget setting and giving customers extra controls to guard their data.

Chosen images entry

We advocate that you just use the Photograph Picker in case your app must entry media that the person selects; it offers a permissionless expertise on gadgets working Android 4.4 onwards, utilizing a mixture of core platform options, Google Play system updates, and Google Play providers.

In case you can not use Photograph Picker, when your app requests any of the visible media permissions (READ_MEDIA_IMAGES / READ_MEDIA_VIDEO) launched in SDK 33, Android 14 customers can now grant your app entry to solely chosen images and movies.

Within the new dialog, the permission decisions can be:

  • Permit entry to all images: the complete library of all on-device images & movies is on the market
  • Choose images: solely the person’s choice of images & movies can be quickly accessible through MediaStore
  • Don’t permit: entry to all images and movies is denied

Apps can immediate customers to pick media once more by requesting the media permissions once more and having the READ_MEDIA_VISUAL_USER_SELECTED permission declared of their app manifest.

Please take a look at this new conduct together with your apps and adapt your UX to deal with the brand new permission and the media file reselection circulation.

Credential supervisor

Android 14 provides Credential Supervisor as a platform API, and we’re supporting it again to Android 4.4 (API stage 19) gadgets via a Jetpack Library with a Google Play providers implementation. It goals to make sign-in simpler for customers with APIs that retrieve and retailer credentials with user-configured credential suppliers. Along with supporting passwords, the API permits your app to sign-in utilizing passkeys, the brand new business normal for passwordless sign-in. Passkeys are constructed on business requirements, can work throughout completely different working programs and browser ecosystems, and can be utilized with each web sites and apps. Developer Preview 2 options enhancements within the UI styling for the account selector, together with adjustments to the API primarily based upon suggestions from Developer Preview 1. Study extra right here.

Safer implicit intents

For apps focusing 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 have to both make the pending intent immutable or make the intent specific. Study extra right here.

Background exercise launching

Android 10 (API stage 29) and better place restrictions on when apps can begin actions when the app is working within the background. These restrictions assist decrease interruptions for the person and hold them extra answerable for what’s proven on their display screen. To additional scale back situations of sudden interruptions, Android 14 provides foreground apps extra management over the flexibility of apps they work together with to start out actions. Particularly, apps focusing on Android 14 have to grant privileges to start out actions within the background when sending a PendingIntent or when binding a Service.

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.

Background optimizations

Developer Preview 2 consists of optimizations to Android’s reminiscence administration system to enhance useful resource utilization whereas functions are working within the background. A number of seconds after an app goes into the cached state, background work is disallowed exterior of standard Android app lifecycle APIs resembling foreground providers, JobScheduler, or WorkManager. Background work is disallowed an order of magnitude quicker than on Android 13.

Fewer non-dismissible notifications

Notifications on Android 14 containing FLAG_ONGOING_EVENT can be person dismissible on unlocked handheld gadgets. Notifications will keep non-dismissible when the gadget is locked, and notification listeners won’t be able to dismiss these notifications. Notifications which can be essential to gadget performance, like system and gadget coverage notifications, will stay totally non-dismissible.

Improved App Retailer Experiences

Android 14 introduces a number of new PackageInstaller APIs which permit app shops to enhance their person expertise, together with the requestUserPreapproval() technique that permits the obtain of APKs to be deferred till after the set up has been accepted, the setRequestUpdateOwnership() technique that permits an installer to point that it’s answerable for future updates to an app it’s putting in, and the setDontKillApp() technique that may seamlessly set up non-obligatory options of an app via break up APKs whereas the app is in use. Additionally, the InstallConstraints API provides installers a method to make sure that app updates occur at an opportune second, resembling when an app is not in use.

In case you develop an app retailer, please give these APIs a try to tell us what you assume!

Personalization

Regional Preferences

Regional preferences allow customers to personalize temperature models, the primary day of the week, and numbering programs. A European residing in the USA would possibly desire temperature models to be in Celsius slightly than Fahrenheit and for apps to deal with Monday as the start of the week as an alternative of the US default of Sunday.

New Android Settings menus for these preferences present customers with a discoverable and centralized location to vary app preferences. These preferences additionally persist via backup and restore. A number of APIs and intents grant you learn entry to person preferences for adjusting app data show (getTemperatureUnit, getFirstDayOfWeek). You can too register a BroadcastReceiver on ACTION_LOCALE_CHANGED to deal with locale configuration adjustments when regional preferences change.

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 present you extra time to make any obligatory app adjustments, and we’ve up to date our instruments and processes that will help you prepare sooner.

Developer Preview 2 is within the interval the place we’re searching for enter on our APIs, together with particulars on how platform adjustments have an effect on your apps, so now could be the time to strive new options and provides us your suggestions.

It’s additionally an excellent time to start out your compatibility testing and establish any work you’ll have to do. You’ll be able to take a look at a few of them with out altering your app’s targetSdkVersion utilizing the conduct change toggles in Developer Choices. This may aid you get a preliminary thought of how your app is likely to be affected by opt-in adjustments in Android 14.

Image of a partial screen shot of a device showing App compatibility toggles in Developer Options
App compatibility toggles in Developer Choices.

Platform Stability is after we’ll ship last SDK/NDK 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 last testing. The discharge timeline particulars are right here.

The Developer Preview has every little thing you should 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 technique 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 may 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) gadget. In case you don’t have a Pixel gadget, you should use the 64-bit system photographs with the Android Emulator in Android Studio.

For the very best growth expertise with Android 14, we advocate that you just use the newest preview of Android Studio Giraffe (or more moderen Giraffe+ variations). When you’re arrange, listed below are among the issues you must do:

  • Attempt the brand new options and APIs – your suggestions is essential through 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 – 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 working 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 focusing on the brand new platform. It’s essential to know and assess these adjustments early. To make it simpler to check, you’ll be able to toggle the adjustments on and off individually.

We’ll replace the preview system photographs and SDK often all through the Android 14 launch cycle. This preview launch is for builders solely and never supposed for day by day or client use, so it would solely accessible by guide obtain for brand spanking new Android 14 developer preview customers. When you’ve manually put in a preview construct, you’ll mechanically get future updates over-the-air for all later previews and Betas. Learn extra right here.

In case you 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 gadget, we advocate that you just transfer to Developer Preview 2 now. In any other case, chances are you’ll run into time durations the place the Android 13 Beta may have a more moderen construct date which can forestall 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 customers to strive Android 14 as nicely, and we’ll open up enrollment for the Android 14 Beta program at the moment. For now, please notice that the Android Beta program is just not but accessible 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.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments