First preview of Android 12

Android 12 logo

Posted by Dave Burke, VP of Engineering

On daily basis, Android apps assist billions of individuals work, play, talk, and create on a variety of gadgets from telephones and laptops to tablets, TVs, and vehicles. As extra individuals come to depend on the experiences you construct, their expectations can rise simply as quick. It’s one of many causes we share Android releases with you early: your suggestions helps us construct a greater platform on your apps and all the individuals who use them. Right this moment, we’re releasing the primary Developer Preview of Android 12, the following model of Android, on your testing and suggestions.

With every model, we’re working to make the OS smarter, simpler to make use of, and higher performing, with privateness and safety on the core. In Android 12 we’re additionally working to provide you new instruments for constructing nice experiences for customers. Beginning with issues like suitable media transcoding, which helps your app to work with the newest video codecs in the event you don’t already help them, and simpler copy/paste of wealthy content material into your apps, like photographs and movies. We’re additionally including privateness protections and optimizing efficiency to maintain your apps responsive.

Right this moment’s first preview is simply the beginning for Android 12, and we’ll have heaps extra to share as we transfer by way of the discharge. Learn on for a style of what’s new in Android 12, and go to the Android 12 developer site for particulars on downloads for Pixel and launch timeline. As all the time, it’s essential to get your suggestions early, to assist us incorporate it into the ultimate product, so let us know what you think!

Alongside the work we’re doing in Android 12, later this month we’ll have extra to share on one other essential software that helps you create nice consumer experiences extra simply: Jetpack Compose, our trendy toolkit for constructing native UI. Join us on #TheAndroidShow for a behind-the-scenes have a look at Jetpack Compose, livestreamed on February 24 at 9AM PT, and tweet your Jetpack Compose questions utilizing #TheAndroidShow to have them answered stay on the present.

Belief and security

Privateness is on the coronary heart of all the things we do, and in Android 12 we’re persevering with to give attention to giving customers extra transparency and management whereas holding their gadgets and information safe. In right this moment’s launch we’ve added new controls over identifiers that can be utilized for monitoring, safer defaults for app parts, and extra. These modifications could have an effect on your apps, so we suggest testing as quickly as potential. Look ahead to extra privateness and safety features coming in later preview releases.

Fashionable SameSite cookie behaviors in WebView – According to changes to Chrome and different browsers, WebView consists of new SameSite cookie behaviors to offer further safety and privateness and provides customers extra transparency and management over how cookies can be utilized throughout websites. More here.

Restricted Netlink MAC – We’re persevering with to assist builders migrate to privacy-protecting resettable identifiers. In a multi-release effort to ease migration of device-scoped Netlink MAC, in Android 11 we restricted entry to it primarily based on API stage 30, and in Android 12 we’re making use of the restriction for all apps – no matter targetSDK stage. More here.

Safer exporting of parts – To stop apps from inadvertently exporting actions, companies, and receivers, we’re altering the default dealing with of the android:exported attribute to be extra specific. With this alteration, parts that declare a number of intent filters should now explicitly declare an android:exported attribute. You must examine your parts within the manifest so as to keep away from set up errors associated to this alteration. More here.

Safer dealing with of Intents – To make dealing with PendingIntents safer, Android 12 requires apps to explicitly declare a mutability flag, both FLAG_MUTABLE or the brand new FLAG_IMMUTABLE, for every PendingIntent. More here.

You may learn extra about these and different privateness and safety modifications here.

Higher consumer expertise instruments

In Android 12 we’re investing in key areas to assist ship a cultured expertise and higher efficiency for customers. Listed here are a few of the updates to date.

Suitable media transcoding – With the prevalence of HEVC {hardware} encoders on cell gadgets, digicam apps are more and more capturing in HEVC format, which provides vital enhancements in high quality and compression over older codecs. Most apps ought to help HEVC, however for apps that may’t, we’re introducing suitable media transcoding.

With this function, an app that doesn’t help HEVC can have the platform routinely transcode the file into AVC, a format that’s extensively suitable. The transcoding course of takes time, relying on the video and {hardware} properties of the machine. For example, a one minute 1080p video at 30fps takes round 9 seconds to transcode on a Pixel 4. You may opt-in to make use of the transcoding service by simply declaring the media codecs that your apps do not help. For builders, we strongly suggest that your apps help HEVC, and if that’s not potential, allow suitable media transcoding. The function shall be lively on all gadgets utilizing HEVC format for video seize. We might love to listen to your suggestions on this function. More here.

AVIF picture help – To provide you greater picture high quality with extra environment friendly compression, Android 12 introduces platform help for AV1 Image File Format (AVIF). AVIF is a container format for photographs and sequences of photographs encoded utilizing AV1. Like different trendy picture codecs, AVIF takes benefit of the intra-frame encoded content material from video compression. This dramatically improves picture high quality for a similar file measurement when in comparison with older picture codecs, resembling JPEG.

AVIF (18.2kB)

JPEG (20.7kB)

race car photo in AVIF (18.2kB)
race car photo in JPEG (20.7kB)

Credit score: Image comparison from AVIF has landed by Jake Archibald

Foreground service optimizations – Foreground companies are an essential manner for apps to handle sure sorts of user-facing duties, however when overused they will have an effect on efficiency and even result in app kills. To make sure a greater expertise for customers, we shall be blocking foreground service begins from the background for apps which are focusing on the brand new platform. To make it simpler to transition away from this sample, we’re introducing a brand new expedited job in JobScheduler that will get elevated course of precedence, community entry, and runs instantly no matter energy constraints like Battery Saver or Doze. For back-compatibility, we’ve additionally constructed expedited jobs into the newest launch of Jetpack WorkManager library. Additionally, to scale back distraction for customers, we’re now delaying the show of some foreground service notifications by as much as 10 seconds. This offers short-lived duties an opportunity to finish earlier than their notifications are proven. More here.

Wealthy content material insertion – Customers love photographs, movies and different expressive content material, however inserting and transferring this content material in apps just isn’t all the time simple. To make it easy on your apps to obtain wealthy content material, we’re introducing a brand new unified API that permits you to settle for content material from any supply: clipboard, keyboard, or drag and drop. You may connect a brand new interface, OnReceiveContentListener, to UI parts and get a callback when content material is inserted by way of any mechanism. This callback turns into the only place on your code to deal with insertion of all content material, from plain and styled textual content to markup, photographs, movies, audio recordsdata, and extra. For back-compatibility, we’ve added the unified API to AndroidX. More here.

Audio-coupled haptic impact – In Android 12 apps can present audio-coupled haptic suggestions by way of the telephone’s vibrator. The vibration energy and frequency are derived from an audio session, permitting you to create extra immersive recreation and audio experiences. For instance, a video calling app may use customized ringtones to determine the caller by way of haptic suggestions, or you may simulate tough terrain in a racing recreation. More here.

Multi-channel audio – Android 12 consists of a number of enhancements for audio with spatial info. It provides help for MPEG-H playback in passthrough and offload mode, and the audio mixers, resamplers and results have been optimized for as much as 24 channels (the earlier most was 8).

Immersive mode API enhancements for gesture nav – We’ve simplified immersive mode in order that gesture navigation is less complicated and extra constant, for instance when watching a video, studying a guide, or enjoying a recreation. We’re nonetheless protecting apps from accidental gestures when in full-screen experiences associated to gaming, however in all different full-screen or immersive experiences (e.g. video viewers, studying, photograph gallery), for apps focusing on the brand new platform, we’re altering the default to permit customers to navigate their telephone with one swipe. More here.

Notification UI updates – We’re refreshing notification designs to make them extra trendy, simpler to make use of, and extra practical. On this first preview you’ll discover modifications from the drawer and controls to the templates themselves. We’re additionally optimizing transitions and animations throughout the system to make them extra clean. As a part of the updates, for apps focusing on Android 12 we’re adorning notifications with customized content material with icon and broaden affordances to match all different notifications. More here.

Sooner, extra responsive notifications – When customers faucet a notification, they count on to leap instantly into the app – the sooner the higher. To fulfill that expectation, builders ought to guarantee that notification faucets set off Exercise begins instantly, slightly than utilizing “trampolines” – an middleman broadcast receiver or service – to start out the Exercise. Notification trampolines may cause vital delays and have an effect on the consumer expertise. To maintain notifications responsive, Android 12 will block notification trampolines by stopping them from launching their goal Actions, and we’re asking builders emigrate away from this sample. The change applies solely to apps focusing on the brand new platform, however for all apps we’ll show a toast to make trampolines seen to you and to customers. More here.

Improved Binder IPC calls – As a part of our work on efficiency, we’ve put a give attention to decreasing system variability. We’ve taken a have a look at latency and workload distribution, and made optimizations that scale back the median expertise from the tail finish, or 99% percentile use case. In doing so, we’ve focused enhancements to system binder calls including light-weight caching methods and specializing in eradicating lock rivalry to enhance latency distribution. This has yielded roughly a 2x efficiency improve on Binder calls total, with vital enhancements in particular calls, for instance a 47x enchancment in refContentProvider(), 15x in releaseWakeLock(), and seven.9x in JobScheduler.schedule().

App compatibility

We’re working to make updates sooner and smoother by prioritizing app compatibility as we roll out new platform variations. In Android 12 we’ve made most app-facing modifications opt-in to provide you extra time, and we’ve up to date our instruments and processes that can assist you prepare sooner. We’ve additionally added new performance to Google Play system updates to provide your apps a greater surroundings on Android 12 gadgets.

Extra of Android up to date by way of Google Play – We’re persevering with to broaden our funding in Google Play system updates (Undertaking Mainline) to provide apps a extra constant, safe surroundings throughout gadgets. In Android 12 we’ve added the Android Runtime (ART) module that lets us push updates to the core runtime and libraries on gadgets operating Android 12. We are able to enhance runtime efficiency and correctness, handle reminiscence extra effectively, and make Kotlin operations sooner – all with out requiring a full system replace. We’ve additionally expanded the performance of current modules – for instance, we’re delivering our suitable media transcoding function inside an updatable module.

Optimizing for tablets, foldables, and TVs – With extra individuals than ever utilizing apps on large-screen gadgets like foldables, tablets, and TVs, now is a good time to verify your app or recreation is prepared. Get began by optimizing for tablets and building apps for foldables. And, for the most important display within the dwelling, the primary Android 12 preview for Android TV can also be out there. Along with bringing the newest Android options to the TV with this preview, additionally, you will have the ability to take a look at your apps on the all-new Google TV expertise. Study extra on the Android TV Developers website and get began along with your ADT-3 developer kit.

Up to date lists of non-SDK interfaces – We’ve restricted further non-SDK interfaces, and as all the time your suggestions and requests for public API equivalents are welcome.

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’ve made lots of them toggleable. WIth the toggles you may force-enable or disable the modifications individually from Developer choices or adb. Check out the details here.

mobile display of App Compatibility Changes with toggles

App compatibility toggles in Developer Choices.

Platform stability milestone – Like final yr, we’re letting you already know our Platform Stability milestone properly prematurely, to provide you extra time to plan for app compatibility work. At this milestone we’ll ship not solely remaining SDK/NDK APIs, but additionally remaining inner APIs and app-facing system behaviors. We’re anticipating to achieve Platform Stability by August 2021, and also you’ll have a number of weeks earlier than the official launch to do your remaining testing. The discharge timeline particulars are here.

The Developer Preview has all the things it is advisable strive the Android 12 options, take a look at your apps, and provides us feedback. You will get began right this moment by flashing a device system image to a Pixel 3 / 3 XL, Pixel 3a / 3a XL, Pixel 4 / 4 XL, Pixel 4a / 4a 5G, or Pixel 5 machine. Should you don’t have a Pixel machine, you should utilize the 64-bit system photographs with the Android Emulator in Android Studio.

Whenever you’re set up, listed here are a few of the issues it’s best to do:

  • Attempt the brand new options and APIs – your suggestions is vital throughout the early a part of the developer preview. Report points in our tracker or give us direct suggestions by survey for chosen options from the feedback and requests web page.
  • Take a look at your present app for compatibility – the objective right here is to study whether or not your app is affected by default habits modifications in Android 12. Simply set up your present printed app onto a tool or emulator operating Android 12 and take a look at.
  • Take a look at your app with opt-in modifications – Android 12 has opt-in habits modifications that solely have an effect on your app when it’s focusing on the brand new platform. It’s extraordinarily essential to know and assess these modifications early. To make it simpler to check, you may toggle the changes on and off individually.

We’ll replace the preview system photographs and SDK commonly all through the Android 12 launch cycle. This preliminary preview launch is for builders solely and never supposed for every day or shopper use, so we’re making it out there by handbook obtain solely. You may flash a manufacturing unit picture to your Pixel machine, or you may sideload an OTA picture to a Pixel machine operating Android 11, through which case you gained’t have to unlock your bootloader or wipe information. Both manner, when you’ve manually put in a preview construct, you’ll routinely get future updates over-the-air for all later previews and Betas. More here.

As we get nearer to a remaining product, we’ll be inviting customers to strive it out as properly, and we’ll open up enrollments by way of Android Beta at the moment. Keep tuned for particulars, however for now please word that Android Beta just isn’t at the moment out there for Android 12.

For full info, visit the Android 12 developer site.

Recent Articles

Report: PlayStation 5 to achieve SSD expandable storage help this yr

Credit score: Oliver Cragg / Android AuthoritySony might quickly allow M.2 SSD-based high-speed exterior storage help for the PlayStation 5.The function will probably be...

Anker beats Apple to market, new iPhone 12 MagSafe-compatible battery pack now accessible – 9to5Mac

The favored accent maker Anker has formally launched a brand new MagSafe-compatible wi-fi energy financial institution for iPhone 12 customers. This comes as rumors...

European Downloads of Enterprise Apps Surged 132% to 706 Million in 2020

Downloads for Enterprise class apps like Zoom and Microsoft Teams surged by roughly 132 p.c in Europe throughout 2020 to 705.8 million, Sensor Tower...

Get Noise Cancelled With Anker’s Soundcore Q30 Headphones for $68

Best Tech DealsBest Tech DealsThe very best tech offers from across the net, up to date every day.Soundcore Q30 headphones, that are right down...

Related Stories

Stay on op - Ge the daily news in your inbox