Posted by Dave Burke, VP of Engineering
Right now we’re releasing the second beta of Android 15, which continues our work to construct a platform that helps enhance your productiveness, reduce battery impression, maximize easy app efficiency, give customers a premium gadget expertise, defend consumer privateness and safety, and make your app accessible to as many individuals as attainable — all in a vibrant and numerous ecosystem of units, silicon companions, and carriers.
Android delivers enhancements and new options year-round, and your suggestions on the Android beta program performs a key position in serving to Android repeatedly enhance. The Android 15 developer web site has heaps extra details about the beta, together with downloads for Pixel, and the launch timeline. We’re wanting ahead to listening to what you suppose, and thanks upfront in your continued help make Android a platform that works for everybody.
Now accessible on extra units
The Android 15 beta is now accessible on handset, pill, and foldable type components from companions together with Honor, iQOO, Lenovo, Nothing, OnePlus, OPPO, Realme, Sharp, Tecno, vivo, and Xiaomi, so there are such a lot of extra units so that you can take a look at your app on, and so many extra customers that may run your app on the Android 15 beta.
Making Android extra environment friendly
We’re persevering with to optimize the platform to enhance the standard, velocity and battery lifetime of Android units.
Foreground companies modifications
Foreground companies maintain apps working in an lively state to allow them to do one thing vital and user-visible, usually on the expense of battery life. In Android 15 Beta 2, the dataSync and mediaProcessing foreground service sorts now have a ~6 hour timeout, after which the system calls Android 15’s new Service.onTimeout(int, int) technique. At this level, the service is not thought of a foreground service. If the service doesn’t name Service.stopSelf() in response to the timeout, it’s going to get stopped with a failure.
Beta 2 additionally provides new necessities for beginning foreground companies whereas the app is working within the background. – In case your foreground service depends on the SYSTEM_ALERT_WINDOW permission exemption for background begin, you at the moment are required to have a visual overlay when concentrating on Android 15.
For battery-efficient finest practices, debugging community and energy utilization, and element on how we’re bettering battery effectivity of background work in Android 15 and up to date variations of Android, see the “Bettering battery effectivity of background work on Android” I/O speak.
Upcoming required help for 16 KB web page sizes
Android 15 provides help for units that use bigger web page sizes, with help for 16 KB pages along with the usual 4 KB pages. In case your app makes use of any NDK libraries, both instantly or not directly by way of an SDK, then you’ll possible want to easily rebuild your app for it to work on these 16 KB web page dimension units.
Units with bigger web page sizes can have improved efficiency for memory-intensive workloads. Whereas our testing might not be consultant of all units within the ecosystem, listed here are a among the efficiency positive aspects we recognized in our preliminary testing of units configured with 16KB web page sizes:
- Decrease app launch occasions whereas the system is beneath reminiscence stress: 3.16% decrease on common, with extra vital enhancements (as much as 30%) for some apps that we examined
- Lowered energy draw throughout app launch: 4.56% discount on common
- Quicker digicam launch: 4.48% quicker scorching begins on common, and 6.60% quicker chilly begins on common
- Improved system boot time: improved by 1.5% (roughly 0.8 seconds) on common
As gadget producers proceed to construct units with bigger quantities of bodily reminiscence (RAM), many of those units will undertake 16 KB (and finally higher) web page sizes to optimize the gadget’s efficiency. Including help for 16 KB web page dimension units permits your app to run on these units and helps your app profit from the related efficiency enhancements. We plan to make 16 KB web page compatibility required for app uploads to Play Retailer subsequent yr.
That can assist you add help in your app, we have offered steering on how you can test in case your app is impacted, how you can rebuild your app (if relevant), and how you can take a look at your app in a 16 KB atmosphere utilizing emulators (together with Android 15 system photographs for the Android Emulator).
Modernizing Android’s GPU entry
Android {hardware} has developed fairly a bit from the early days the place the core OS would run on a single CPU and GPUs have been accessed utilizing APIs primarily based on fixed-function pipelines. The Vulkan graphics API has been accessible within the NDK since Android 7.0 (API stage 24) with a lower-level abstraction that higher displays fashionable GPU {hardware}, scales higher to help a number of CPU cores, and gives decreased CPU driver overhead — resulting in improved app and sport efficiency. Vulkan is supported by all fashionable sport engines.
Vulkan is Android’s most well-liked interface to the GPU. Subsequently, Android 15 contains ANGLE as an optionally available layer for working OpenGL ES on prime of Vulkan. Shifting to ANGLE will standardize the Android OpenGL implementation for improved compatibility, and, in some circumstances, improved efficiency. You possibly can take a look at out your OpenGL ES app stability and efficiency with ANGLE utilizing the “Developer choices → Experimental: Allow ANGLE” setting in Android 15.
The Android ANGLE on Vulkan roadmap
As a part of streamlining our GPU stack, going ahead we can be delivery ANGLE because the GL system driver on extra new units, with the longer term expectation that OpenGL/ES can be solely accessible by way of ANGLE. That being stated, we plan to proceed help for OpenGL ES on all units.
Really helpful subsequent steps: Use the developer choices to pick the ANGLE driver for OpenGL ES and take a look at. For brand spanking new tasks, we strongly encourage utilizing Vulkan for C/C++.
Fashionable graphics
Android 15 continues our modernization of Android’s Canvas graphics system with new performance:
- Matrix44, offers a 4×4 matrix for reworking coordinates that ought to be used if you need to manipulate the canvas in 3D.
- clipShader intersects the present clip with the required shader, whereas clipOutShader units the clip to the distinction of the present clip and the shader, every treating the shader as an alpha masks. This helps the drawing of complicated shapes effectively.
Extra environment friendly AV1 software program decoding
dav1d, the favored AV1 software program decoder from VideoLAN is now accessible for Android units not supporting AV1 decode in {hardware}. It’s as much as 3x extra performant than the legacy AV1 software program decoder, enabling HD AV1 playback for extra customers, together with some low and mid tier units.
For now, your app must opt-in to utilizing dav1d by invoking it by identify “c2.android.av1-dav1d.decoder“. It is going to be made the default AV1 software program decoder in a subsequent replace . This help is standardized and backported to Android 11 units that obtain Google Play system updates.
For extra on the most recent options and developer options for Android media and digicam, see the “Constructing fashionable Android media and digicam experiences” I/O speak.
A extra non-public, safe Android
We’re at all times seeking to give customers extra transparency and management over their knowledge whereas enhancing the core security measures of the platform. See the “Safeguarding consumer safety on Android” I/O speak for extra of what we’re doing to enhance consumer safeguards and defend your app towards new threats.
Non-public area
Non-public area permits customers to create a separate area on their gadget the place they’ll maintain delicate apps away from prying eyes, beneath a further layer of authentication. Non-public area makes use of a separate consumer profile. When non-public area is locked by the consumer, the profile is paused, i.e. the apps are not lively. The consumer can select to make use of the gadget lock or a separate lock issue for personal area. Non-public area apps present up in a separate container within the launcher, and are hidden from the recents view, notifications, settings, and from different apps when non-public area is locked. Person generated and downloaded content material (media, recordsdata) and accounts are separated between the non-public area and the principle area. The system sharesheet and the picture picker can be utilized to offer apps entry to content material throughout areas when non-public area is unlocked. Android 15 beta 2.1 partially corrects a identified challenge with non-public area in beta 2 that affected dwelling display apps.
Chosen photographs entry enchancment
It’s now attainable for apps to spotlight solely essentially the most lately chosen photographs and movies when partial entry to media permissions is granted. This could enhance the consumer expertise for apps that ceaselessly request entry to photographs and movies. This may be achieved by enabling the QUERY_ARG_LATEST_SELECTION_ONLY argument when querying MediaStore by way of ContentResolver.
valexternalContentUri = MediaStore.Recordsdata.getContentUri("exterior") val mediaColumns = arrayOf( FileColumns._ID, FileColumns.DISPLAY_NAME, FileColumns.MIME_TYPE, ) val queryArgs = bundleOf( // Return solely objects from the final choice (chosen photographs entry) QUERY_ARG_LATEST_SELECTION_ONLY to true, // Kind returned objects chronologically primarily based on once they have been added to the gadget's storage QUERY_ARG_SQL_SORT_ORDER to "${FileColumns.DATE_ADDED} DESC", QUERY_ARG_SQL_SELECTION to "${FileColumns.MEDIA_TYPE} = ? OR ${FileColumns.MEDIA_TYPE} = ?", QUERY_ARG_SQL_SELECTION_ARGS to arrayOf( FileColumns.MEDIA_TYPE_IMAGE.toString(), FileColumns.MEDIA_TYPE_VIDEO.toString() ) ) val cursor = contentResolver.question(externalContentUri, mediaColumns, queryArgs, null)
Permission checks on content material URIs
Android 15 introduces a brand new set of APIs that carry out permission checks on content material URIs. They embody:
Secured background exercise launches
Android 15 protects customers from malicious apps and offers them extra management over their units by including modifications that stop malicious background apps from bringing different apps to the foreground, elevating their privileges, and abusing consumer interplay. Background exercise launches have been restricted since Android 10.
Malicious apps inside the identical process can launch one other app’s exercise, then overlay themselves on prime, creating the phantasm of being that app. This “process hijacking” assault bypasses present background launch restrictions as a result of all of it happens inside the identical seen process. To mitigate this threat, we have added a flag that blocks apps that do not match the highest UID on the stack from launching actions. To choose in for all your app’s actions, replace the allowCrossUidActivitySwitchFromBelow attribute in your app’s AndroidManifest.xml file:
<software android:allowCrossUidActivitySwitchFromBelow="false" >
As soon as your app has opted into the brand new safety, particular actions designed to be shared may be opted-out utilizing this API inside the Exercise:
public void onCreate(Bundle bundle) {
tremendous.onCreate(bundle);
setAllowCrossUidActivitySwitchFromBelow(true);
...
}
Study extra about restrictions on beginning actions from the background.
Safer Intents
Android 15 introduces new safety measures to make intents safer and extra sturdy. These modifications are geared toward stopping potential vulnerabilities and misuse of intents that may be exploited by malicious apps. There are two major enhancements to the safety of intents in Android 15:
- Match goal intent-filters: Intents that concentrate on particular elements should precisely match the goal’s intent-filter specs. For those who ship an intent to launch one other app’s exercise, the goal intent element must align with the receiving exercise’s declared intent-filters.
- Intents will need to have actions: Intents with out an motion will not match any intent-filters. Because of this intents used to begin actions or companies will need to have a clearly outlined motion.
Vital: These enhancements can be a part of Strict Mode. If you need to strive them out please add the next technique:
public void onCreate() {
StrictMode.setVmPolicy(VmPolicy.Builder()
.detectUnsafeIntentLaunch()
.construct());
...
Elevated minimal goal SDK model from 23 to 24
Android 15 will increase the minimal targetSdkVersion required to put in apps from 23 to 24, constructing on the earlier minimal goal SDK change from Android 14, Outdated apps usually lack the most recent safety protections, making units and knowledge weak. Requiring apps to satisfy fashionable API ranges helps to make sure higher safety and privateness.
For those who attempt to set up an app that targets a decrease API stage than 24, you may see an error raised in Logcat:
INSTALL_FAILED_DEPRECATED_SDK_VERSION: App package deal should goal at the least SDK model 24, however discovered 7.
A premium gadget expertise
Android 15 contains options that assist your apps enhance the expertise of utilizing an Android gadget, together with smoother transitions, a extra useful UI, updates for large-screen units, and extra stunning choices for designers.
Improved giant display multitasking
Android 15 beta 2 offers customers higher methods to multitask on giant display units. For instance, customers can pin the taskbar on display to shortly swap between apps or save their favourite split-screen app mixtures for fast entry. Because of this ensuring your app is adaptive is extra necessary than ever. Google I/O has classes on Constructing adaptive Android apps and Constructing UI with the Materials 3 adaptive library that may assist, and our documentation has extra that will help you Design for giant screens.
Window Insets
Along with edge-to-edge enforcement, when concentrating on SDK 35+ in Android 15 Configuration.screenWidthDp and screenHeightDp, now embody the depth of the system bars. Whereas these values should still be used for useful resource choice (e.g. res/layout-h500dp), utilizing them for structure calculations is discouraged.
Image-in-Image
Android 15 introduces new modifications in Image-in-Image (PiP) guaranteeing a fair smoother transition when coming into into PiP mode. This can be useful for apps having UI components overlaid on prime of their major UI, which matches into PiP. Presently, onPictureInPictureModeChanged is used to outline logic that toggles the visibility of the overlaid UI components. This callback is triggered when the PiP enter or exit animation is accomplished. Ranging from Android 15, we’re introducing a brand new state within the PictureInPictureUiState class. The onPictureInPictureUiStateChanged callback can be invoked with isTransitioningToPip() as quickly because the PiP enter animation begins and the app can conceal the overlaid UI components.
override enjoyable onPictureInPictureUiStateChanged(pipState: PictureInPictureUiState) {
if (pipState.isTransitioningToPip()) {
// Cover UI components
}
}
override enjoyable onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean) {
if (isInPictureInPictureMode) {
// Unhide UI components
}
}
This fast visibility toggle of irrelevant UI components (for a PiP window), will guarantee a smoother and flicker free PiP enter animation.
Richer Widget Previews with Generated Previews
Make your widget stand out by exhibiting a personalised preview. Apps concentrating on Android 15 can present Distant Views to the Widget Picker, to allow them to replace the content material within the picker to be extra consultant of what the consumer will see. Apps could use the AppWidgetManager setWidgetPreview, getWidgetPreview and removeWidgetPreview strategies to replace the looks of their widgets with updated and customized data.
Predictive Again
Predictive again offers a smoother, extra intuitive navigation expertise whereas utilizing gesture navigation, leveraging built-in animations to tell customers the place their actions will take them to cut back sudden outcomes. In Android 15, predictive again will not be behind a developer possibility, so system animations equivalent to back-to-home, cross-task, and cross-activity will seem for apps which have correctly migrated.
Set VibrationEffect for notification channels
Android 15 beta 2 now helps setting wealthy vibrations for incoming notifications by channel utilizing NotificationChannel.setVibrationEffect, so your customers can distinguish between several types of notifications with out having to have a look at their gadget.
New knowledge sorts for Well being Join
Well being Join, the centralized approach for customers to regulate and handle entry to their health knowledge, is including help for extra knowledge sorts to help much more well being and health use circumstances. This launch has 2 new knowledge sorts: pores and skin temperature and coaching plans.
Pores and skin temperature monitoring permits customers to retailer and share extra correct temperature knowledge from a wearable or different monitoring gadget.
Coaching plans are structured exercise plans to assist a consumer obtain their health objectives. Coaching plans help contains:
“Select the way you’re addressed” system choice
Initially solely in French, however increasing quickly to extra gendered languages, customers can customise how they’re addressed by the Android system with a grammatical gender choice. The brand new setting may be discovered within the system language settings: Settings → System → Languages & Enter → System languages → Select the way you’re addressed.
French grammatical gender choice
An instance of the place this choice modifications the string being proven
Fashionable internationalization by way of ICU 74
Android 15 Beta 2 contains API-related updates from ICU 74. ICU 74 accommodates updates from Unicode 15.1, together with new characters, emoji, safety mechanisms and corresponding APIs and implementations, in addition to updates to CLDR 44 locale knowledge with new locales and varied additions and corrections.
CJK Variable Font
Ranging from Android 15, the font file for Chinese language, Japanese, and Korean languages, NotoSansCJK, is now a variable font. Variable fonts open up new potentialities for artistic typography in CJK languages. Designers can discover a broader vary of kinds and create visually putting layouts that have been beforehand tough or inconceivable to attain.
New Japanese Hentaigana Font
In Android 15, a brand new font file for previous Japanese Hiragana (often called Hentaigana) is bundled by default. The distinctive shapes of Hentaigana characters can add a particular aptitude to paintings or design whereas additionally serving to to protect correct transmission and understanding of historical Japanese paperwork.
Avoiding clipped textual content
Some cursive fonts or language characters which have complicated shaping could draw the letters within the earlier or subsequent character’s space. Such letters could also be clipped originally or ending place. Beginning in Android 15, TextView allocates extra width for such letters and places further padding to the left.
As a result of this modifications how the TextView decides the width, TextView allocates extra width by default if the purposes goal Android 15 or later. You possibly can allow or disable it by calling setUseBoundsForWidth API on TextView. As a result of including left padding could trigger a misalignment of current layouts, the padding is just not added by default even when concentrating on Android 15 or later.
So as to add further padding to forestall clipping, name setShiftDrawingOffsetForStartOverhang.
<TextView
android:fontFamily="cursive"
android:textual content="java" />
<TextView
android:fontFamily="cursive"
android:textual content="java"
android:useBoundsForWidth="true"
android:shiftDrawingOffsetForStartOverhang="true" />
<TextView
android:textual content="คà¸à¸¡à¸žà¸´à¸§à¹€à¸•à¸à¸£à¹Œ" />
<TextView
android:textual content="คà¸à¸¡à¸žà¸´à¸§à¹€à¸•à¸à¸£à¹Œ"
android:useBoundsForWidth="true"
android:shiftDrawingOffsetForStartOverhang="true" />
App compatibility
If you have not but examined your app for compatibility with Android 15, now could be the time to do it, with many extra units coming into this system. Within the weeks forward, you’ll be able to count on extra customers to strive your app on Android 15 and lift points they discover.
To check for compatibility, set up your revealed app on a tool or emulator working Android 15 beta and work by way of all your app’s flows. Evaluation the conduct modifications to focus your testing. After you’ve got resolved any points, publish an replace as quickly as attainable.
To offer you extra time to plan for app compatibility work, we’re letting you recognize our Platform Stability milestone properly upfront.
At this milestone, we’ll ship ultimate SDK/NDK APIs and likewise ultimate inner APIs and app-facing system behaviors. We’re anticipating to succeed in Platform Stability in June 2024, and from that point you’ll have a number of months earlier than the official launch to do your ultimate testing. The discharge timeline particulars are right here.
Get began with Android 15
Right now’s beta launch has the whole lot you want to strive the Android 15 options, take a look at your apps, and provides us suggestions. Now that we’re within the beta part, you’ll be able to test right here to get details about enrolling your gadget; Enrolling supported Pixel units will get this and future Android Beta updates over-the-air. For those who don’t have a supported gadget, you’ll be able to use the 64-bit system photographs with the Android Emulator in Android Studio. For those who’re already within the Android 14 QPR beta program on a supported gadget, you may mechanically get up to date to Android 15 Beta 2.
For the very best improvement expertise with Android 15, we suggest that you just use the newest model of Android Studio Koala. When you’re arrange, listed here are among the issues it is best to do:
- Attempt the brand new options and APIs – your suggestions is vital through the early a part of the developer preview and beta program. 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 modifications in Android 15; set up your app onto a tool or emulator working Android 15 and extensively take a look at it.
We’ll replace the beta system photographs and SDK often all through the Android 15 launch cycle. Learn extra right here.
For full data, go to the Android 15 developer web site.
Java and OpenJDK are emblems or registered emblems of Oracle and/or its associates.
OpenGL is a registered trademark and the OpenGL ES emblem is a trademark of Hewlett Packard Enterprise utilized by permission by Khronos.
Vulkan and the Vulkan emblem are registered emblems of the Khronos Group Inc.
VideoLAN cone Copyright (c) 1996-2010 VideoLAN. This emblem or a modified model could also be used or modified by anybody to discuss with the VideoLAN venture or any product developed by the VideoLAN crew, however doesn’t point out endorsement by the venture.
All emblems, logos and model names are the property of their respective homeowners.