Android 14 Developer Preview 2 | Digital Noch


Android 14 Developer Preview 2 | Digital Noch Digital Noch

Posted by Dave Burke, VP of EngineeringAndroid 14 Developer Preview 2 | Digital Noch Digital Noch

As we speak, we’re releasing the second Developer Preview of Android 14, constructing on the work of the primary developer preview of Android 14 from final month with extra enhancements to privateness, safety, efficiency, developer productiveness, and consumer customization whereas persevering with to refine the large-screen machine 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 suppose, and thanks upfront to your continued assist in making Android a platform that works for everybody.

Working throughout type components

Android 14 builds on the work executed 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 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, purchasing, 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 improvement. In Android 14, we’re constructing the very best high quality platform for all by offering a safer machine setting and giving customers extra controls to guard their data.

Chosen images entry

We suggest that you just use the Picture Picker in case your app must entry media that the consumer selects; it gives a permissionless expertise on units working Android 4.4 onwards, utilizing a mixture of core platform options, Google Play system updates, and Google Play companies.

Android 14 Developer Preview 2 | Digital Noch Digital Noch
When you can’t use Picture 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 will probably be:

  • Enable entry to all images: the total library of all on-device images & movies is accessible
  • Choose images: solely the consumer’s choice of images & movies will probably be quickly obtainable by way of MediaStore
  • Don’t enable: 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 check this new conduct along with your apps and adapt your UX to deal with the brand new permission and the media file reselection stream.

Credential supervisor

Android 14 provides Credential Supervisor as a platform API, and we’re supporting it again to Android 4.4 (API stage 19) units by way of a Jetpack Library with a Google Play companies 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 trade normal for passwordless sign-in. Passkeys are constructed on trade requirements, can work throughout totally 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 modifications to the API based mostly upon suggestions from Developer Preview 1. Be taught 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 surprising code paths. Apps must both make the pending intent immutable or make the intent express. Be taught 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 consumer and hold them extra answerable for what’s proven on their display screen. To additional scale back cases of surprising interruptions, Android 14 offers foreground apps extra management over the power of apps they work together with to start out actions. Particularly, apps concentrating on Android 14 must 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 contains optimizations to Android’s reminiscence administration system to enhance useful resource utilization whereas purposes are working within the background. A number of seconds after an app goes into the cached state, background work is disallowed outdoors of standard Android app lifecycle APIs akin to foreground companies, 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 will probably be consumer dismissible on unlocked handheld units. Notifications will keep non-dismissible when the machine is locked, and notification listeners won’t be able to dismiss these notifications. Notifications which might be vital to machine performance, like system and machine 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 consumer expertise, together with the requestUserPreapproval() technique that enables the obtain of APKs to be deferred till after the set up has been authorised, the setRequestUpdateOwnership() technique that enables 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 optionally available options of an app by way of cut up APKs whereas the app is in use. Additionally, the InstallConstraints API offers installers a approach to make sure that app updates occur at an opportune second, akin to when an app is not in use.

When you develop an app retailer, please give these APIs a try to tell us what you suppose!

Personalization

Android 14 Developer Preview 2 | Digital Noch Digital Noch

Regional Preferences

Regional preferences allow customers to personalize temperature models, the primary day of the week, and numbering programs. A European dwelling in the US may favor temperature models to be in Celsius fairly than Fahrenheit and for apps to deal with Monday as the start of the week as a substitute 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 by way of backup and restore. A number of APIs and intents grant you learn entry to consumer preferences for adjusting app data show (getTemperatureUnit, getFirstDayOfWeek). You can even register a BroadcastReceiver on ACTION_LOCALE_CHANGED to deal with locale configuration modifications 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 modifications opt-in to offer you extra time to make any mandatory app modifications, and we’ve up to date our instruments and processes that can assist 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 modifications have an effect on your apps, so now could be the time to attempt new options and provides us your suggestions.

It’s additionally time to start out your compatibility testing and establish any work you’ll must do. You possibly can check a few of them with out altering your app’s targetSdkVersion utilizing the conduct change toggles in Developer Choices. This can show you how to get a preliminary thought of how your app could be affected by opt-in modifications 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 once we’ll ship remaining 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 remaining testing. The discharge timeline particulars are right here.

The Developer Preview has all the things it’s essential to attempt the Android 14 options, check your apps, and provides us suggestions. For testing your app with tablets and foldables, the best 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 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. When you don’t have a Pixel machine, you should use the 64-bit system photos with the Android Emulator in Android Studio.

For one of the best improvement expertise with Android 14, we suggest that you just use the most recent preview of Android Studio Giraffe (or more moderen Giraffe+ variations). When you’re arrange, listed here are among the issues it is best to do:

  • Strive 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.
  • Take a look at your present app for compatibility – study whether or not your app is affected by default conduct modifications in Android 14; set up your app onto a tool or emulator working Android 14 and extensively check it.
  • Take a look at your app with opt-in modifications – Android 14 has opt-in conduct modifications that solely have an effect on your app when it’s concentrating on the brand new platform. It’s vital to know and assess these modifications early. To make it simpler to check, you’ll be able to toggle the modifications on and off individually.

We’ll replace the preview system photos and SDK recurrently all through the Android 14 launch cycle. This preview launch is for builders solely and never meant for each day or shopper use, so it is going to solely obtainable by guide obtain for brand new Android 14 developer preview customers. 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.

When you intend to maneuver from the Android 13 QPR Beta program to the Android 14 Developer Preview program and do not wish to should wipe your machine, we suggest 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 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 attempt Android 14 as properly, and we’ll open up enrollment for the Android 14 Beta program at the moment. For now, please word that the Android Beta program is just not 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.

Related articles

spot_img

Leave a reply

Please enter your comment!
Please enter your name here