Author Archives: Android Developers

Photo Picker Everywhere

Posted by Yacine Rezgui - Developer Relations Engineer

Improving privacy remains a top priority on Android. We've been investing in the platform to give users more control, increase transparency, and reduce the scope of access to private data.

Last year, we launched a new feature to emphasize this strategy: the Android photo picker. The photo picker is a browsable interface that presents the user with their media library, sorted by date from newest to oldest, and integrates nicely with your app’s experience without requiring media storage permissions!

 Moving image showing screengrab of Photo Picker on a mobile device

It allows users to browse their photo gallery and grant access to specific items to an app. It’s a powerful tool allowing you to quickly add a photo selection feature to your apps without having to develop a complex in-house picker from scratch. It also eliminates the need to maintain complex logic for handling permissions and querying MediaStore, enabling you to save time and effort that would otherwise be spent on coding and debugging.

The photo picker is easy to implement, as you only need to include a few lines of code with the support library. Furthermore, it’s highly configurable, so you can customize the user experience according to your app’s specific needs.

What’s new?

Availability across all Android versions

One key piece of feedback we’ve heard from developers is the lack of support for older devices, making maintenance costly in terms of development. We are pleased to announce that, as part of the ActivityX 1.7.0 release, the Photo Picker support library will use a backported version provided by Google Play services on devices running Android KitKat (4.4) and later!

To enable the backported photo picker:

  • Update the ActivityX dependency to the version 1.7.0
  • Add the following code snippet that adds the Google Play Services module dependency in your AndroidManifest.xml. It instructs Google Play services to set up the backported photo picker module while installing or updating your application (you can read more in the documentation.

<!-- Prompt Google Play services to install the backported photo picker module --> <service android:name="com.google.android.gms.metadata.ModuleDependencies" android:enabled="false" android:exported="false"> <intent-filter> <action android:name="com.google.android.gms.metadata.MODULE_DEPENDENCIES" /> </intent-filter> <meta-data android:name="photopicker_activity:0:required" android:value="" /> </service>

Register an activity result with PickVisualMedia or PickMultipleVisualMedia and launch the photo picker.

// Register a variant of the photo picker where the user can select at most 5 items val pickMultipleVisualMedia = registerForActivityResult(PickMultipleVisualMedia(5)) { uris -> // Process URIs Log.d("Photo Picker URIs count", uris.size) } // Launching the photo picker (photos & video included) pickMultipleVisualMedia.launch(PickVisualMediaRequest(PickVisualMedia.ImageAndVideo))

And that’s it! In less than 10 lines of code, you have a permission-less photo picker with a nice UX that blends well into your application, and you have a single code path for maintaining the feature’s functionality for all Android versions running KitKat and above.

GET_CONTENT takeover

Since our last blog post, we started rolling out support for the GET_CONTENT intent in the Android photo picker whenever the specified MIME type filter matches image/* and/or video/*. As the rollout will continue in the upcoming months, make sure to test your app once your device has the feature enabled:

adb shell device_config put storage_native_boot take_over_get_content true

Later this year, the photo picker will seamlessly support cloud storage providers like Google Photos, allowing users to select their remote content without having to leave your app, and without any code change on the developers side.

If you have any feedback or suggestions, submit tickets to our issue tracker.

Com2uS brings a seamless multi-platform gameplay experience with Google Play Games on PC

Posted by Arjun Dayal, Director, Google Play Games

Reaching a motivated audience to play on PC

Summoners War: Chronicles is a mobile MMORPG from South Korean game developer Com2uS, released globally in March 2023. To date, Summoners War has earned over $2.7 billion with more than 180 million downloads worldwide. Set in a fantasy world where players must collect and train various monsters to battle against other players, Summoners War is one of the most popular mobile games in the world.

Nearly a decade later, the game continues to grow its large and active community of players, in part because Com2uS continues to release new content and updates to keep the game fresh and exciting. As part of Com2uS’s effort to offer their players the best way to enjoy the games wherever they want to play, they decided to expand their game to PC. They chose to expand to Google Play Games on PC to reach new users and offer the high-end immersive gaming experience to an already motivated audience ready to play mobile games on PC.

Moving image of gameplay across four devices with different screen sizes
Seamless sync across signed-in devices for Summoners War: Chronicles
Subject to game availability and PC compatibility

Optimizing for PC with the same Android build

Google Play Games on PC offered a quick and smooth integration process from mobile to PC using the same Android build. With many developer tools at hand, only few optimization steps were required to create a differentiated PC gaming experience. You can watch our Google Play Games on PC playlist to see more details on the integration process.

The Com2uS team added input support which is an essential feature to enable players to enjoy the game on large screens including tablets and foldables. Summoners War: Chronicles currently supports keyboard, mouse, and game controller, which has been one of the top requests from users. Also, it was important to optimize the user experience with cross-platform ability in mind. For example, the game's interface needed to be easily navigable and intuitive for players on all platforms, and the UI had to be adjusted for different size screens and allow clear explanation of the game controls.

To optimize the graphics settings for each platform, Com2uS chose Vulkan as their primary graphics API for its high performance and multi-platform ability. Even on high-end mobile devices, some players preferred flexible quality settings to avoid overheating and to preserve battery life. Vulkan allowed Com2uS to provide the best possible graphics quality for their key user demographic on both PC and mobile devices.

Using the Google Play Games on PC Emulator, Com2uS could test and debug the build in various player configurations, identical to the user environment. The emulator supports streamlined testing across multiple aspect ratios, directly accessible from the Play store and enables ADB access for developing and debugging. Having developed the game with Unity, they were able to automatically detect the emulator and directly deploy the game. Google Play Games on PC Emulator is coming soon for all developers, with support for the most popular game engines including Unity, Unreal, Cocos and more.

Providing the best user experience with simultaneous release

In November 2022, Com2uS simultaneously released Summoners War: Chronicles on both PC and mobile. Players can now enjoy the game on mobile or PC via Google Play Games. The release of the game on PC offers players a new level of gaming experience, allowing them to enjoy Summoners War on a larger screen and with more advanced hardware.

With Play Games Services, players can sync their progress automatically whenever they launch the game on a new device and can continue to collect rewards and Play Points no matter where they choose to play.

Get started with Google Play Games on PC

Starting today, we’re excited to announce that Google Play Games beta is opening up sign-ups for all players in Japan! Enable your players to experience immersive and seamless multi-platform gameplay with Google Play Games on PC. To join, express interest in our beta program today.


Google Play Games on PC is available to download in 14 countries as of April 19, 2023.
Please see g.co/googleplaygames for more information. Game titles may vary by region.



Google Play Logo

Delivering an immersive sound experience with Spatial Audio

Posted by Nevin Mital - Developer Relations Engineer, Android Media

In Android 13 (API level 33), we introduced a new standardized platform architecture for spatial audio, a premium and more engaging sound experience. With spatial audio, your content sounds more realistic to users by making it sound as though they are in the middle of the action. The individual instruments from a band can be separated and “placed” around the user, or the sound from a whale might grow as it approaches from behind and taper off as it swims away. Read on to learn more about Android’s support for spatial audio and how to implement the feature in your app.

Spatial audio on Android

There are two main distinctions of spatial audio:

  • With static spatial audio, the sounds are anchored to the user and move with them. A bird chirping to their left will always be on their left, no matter how they turn or move their head.
  • With spatial audio with head tracking, the sounds are positioned in the environment around the user. By turning their head to the left, the user will now hear the bird chirping in front of them.
ALT TEXT

On Android, only multi-channel audio configured with the right AudioAttributes and AudioFormat is spatialized by default, though OEMs can customize this behavior. On devices where the OEM has integrated a spatializer effect, static spatial audio will work when any headset is connected to the device, though head-tracked spatial audio requires a headset with compatible head tracking sensors. OEMs like Pixel, OnePlus, and Xiaomi have already made these experiences available to their users.

Implementing & testing spatial audio

The easiest way to integrate with this feature is to use ExoPlayer! If you use ExoPlayer from Jetpack Media3 release 1.0.0 or newer, ExoPlayer will configure the decoder to prevent multi-channel audio from being downmixed to stereo and the default track selection behavior will take into account whether or not spatialization is possible. This means your content just needs to include a multi-channel audio track that ExoPlayer can select. ExoPlayer will monitor the device’s state and select a multi-channel track when spatialization is possible, or switch to a stereo track if not.

Android 12L (API level 32) added the new Spatializer class to allow you to query the spatialization capabilities of the device. There are four conditions that must all be true for the device to output spatialized audio:

// Get an instance of the Spatializer from the AudioManager val audioManager = getSystemService(Context.AUDIO_SERVICE) as AudioManager val spatializer = audioManager.spatializer if ( // Does the device have a spatializer effect? spatializer.immersiveAudioLevel != Spatializer.SPATIALIZER_IMMERSIVE_LEVEL_NONE // Is spatial audio enabled in the settings? && spatializer.isEnabled // Is spatialization available, for example for the current audio output routing? && spatializer.isAvailable // Can audio with the given parameters be spatialized? && spatializer.canBeSpatialized(audioAttributes, audioFormat) ) { // Spatialization is possible, so you can select a multi-channel track for playback with // spatial audio. } else { // Spatialization is not possible, so you may choose to select a stereo track for playback // to preserve bandwidth. }

ExoPlayer performs these checks when deciding which audio track to select. To further check if head tracking is available, you can call the isHeadTrackerAvailable() method. The Spatializer class also includes the following listeners to be able to react to changes in the device’s state:

OnSpatializerStateChangedListener

For changes in whether the spatializer is enabled or available.

OnHeadTrackerAvailableListener

For changes in whether head tracking is available.

With these signals, you can manually adjust your playback for spatial audio. Note that if you are not using ExoPlayer, you should make sure to configure the decoder to output multi-channel audio when possible by setting the max channel count to a large number with MediaFormat.setInteger(MediaFormat.KEY_MAX_OUTPUT_CHANNEL_COUNT, ##). See how ExoPlayer does this on GitHub. There are two ways to prevent spatialization depending on your use-case. If your audio is already spatialized, call setIsContentSpatialized(true) when configuring the AudioAttributes for your audio stream to prevent the audio from being double-processed. In all other cases, you can instead call setSpatializationBehavior(AudioAttributes.SPATIALIZATION_BEHAVIOR_NEVER) to disable spatialization altogether.

As mentioned previously, using spatial audio requires a supported device (that is, getImmersiveAudioLevel() does not return SPATIALIZER_IMMERSIVE_LEVEL_NONE) and a connected headset. To test spatial audio, start by making sure the feature is enabled in settings:

  • For wired headsets, go to System settings > Sound & vibration > Spatial audio.
  • For wireless headsets, go to System settings > Connected devices > Gear icon for your wireless device > Spatial audio.

Note that for spatial audio with head tracking, the headset must have head tracking sensors that are compatible with the device, such as Pixel Buds Pro with a Pixel phone, and head tracking must also be enabled in settings.

Next steps

Hearing is believing, so we highly recommend trying out spatial audio for yourself! You can see an example implementation in our sample app, Universal Android Music Player. And for more details on everything discussed here, check out our spatial audio developer guide.

Automatic Update Prompts for Crashing Apps

Posted by Kurt Williams, Product Manager, Google Play

We are excited to announce a new feature that will help you to increase the rollout velocity of app updates and meet Play’s quality bar. On phones and tablets running Android 7.0 (SDK level 24) and above, the Play Store will prompt users to update your app if it crashes in the foreground and a more stable version is available. This will reduce your user-perceived crash rate.

Update the app to fix crashes dialog
The Play Store can now automatically prompt users to update your app after a user visible crash.


What you need to do: nothing!

These new prompts don’t require any integration by you and are enabled automatically when Play determines that a newer version of your app has a statistically relevant, lower crash rate. Furthermore, since the dialog is shown by the Play Store and not your app, the update prompt can be shown even if your app crashes on startup.

Data driven improvement over time

There are a few thresholds we take into account, which we will tune over time to achieve the best outcome. These include:

  1. User activity level of an app version according to Vitals to ensure we have statistical relevance
  2. Foreground crash rate of an app version and of its newer version
  3. Number of times a prompt can be shown for each version of your app on a device, if the user doesn’t choose to update

We believe that this new feature will help your users update to the best available version of your app, and help you deliver the best experience to your users.



Google Play Logo

Voice controlled workouts with Google Assistant

Posted by John Richardson, Partner Engineer

With tens of millions of installs of the adidas Running app, users every day turn to adidas as part of their health and fitness routine. Like many in the industry, adidas recognized that in this ever-evolving market, it's important to make it as easy as possible for users to achieve their fitness goals and making their app available on Wear was a natural fit. adidas didn’t stop at bringing their running app to the watch, however, they also realized that in a user situation such as a workout, the ability to engage with the application hands-free, or even eyes-free, further simplified how users could engage with the app.

Integrating Google Assistant

To enable hands-free control, adidas looked to Google Assistant and App Actions, which lets users control apps with their voice using built-in intents (BIIs). Users can perform specific tasks by voice or act upon tasks such as starting a run or swim.

Integrating Health and Fitness BIIs was a simple addition that adidas’ staff Android developer made in their IDE by declaring <capability> tags in their shortcuts.xml file in order to create a consistent experience between the mobile app and a watch surface. It’s a process that looks like this:

  1. First, Assistant parses the user’s request using natural language understanding and identifies the appropriate BII. For example, START_EXERCISE to begin a workout.
  2. Second, Assistant will then fulfill the user’s intent by launching the application to a specified content or action. Besides START_EXERCISE, users can also stop (STOP_EXERCISE), pause (PAUSE_EXERCISE), or resume (RESUME_EXERCISE) their workouts. Haptic feedback or dings can also be added here to show whether a user request was successful or not.

With App Actions being built on Android, the development team was able to deploy quickly. And when partnered with the Health Services and Health Connect APIs which respectively support real-time sensor and health data, end users can have a cohesive and secure experience across mobile and Wear OS devices.

Miving image illustrating adidas Running app launching via Google Assistant on a wearable device

“What’s exciting about Assistant and Wear is that the combination really helps our users reach their fitness goals. The ability for a user to leverage their voice to track their workout makes for a unique and very accessible experience,” says Robert Hellwagner, Director of Product Innovation for adidas Runtastic. “We are excited by the possibility of what can be done by enabling voice based interactions and experiences for our users through App Actions.”

Learn more

Enabling voice controls to unlock hands-free and eyes-free contexts is an easy way to create a more seamless app experience for your users. To bring natural, conversational interactions to your app read our documentation today, explore how to build with one of our codelabs, or subscribe to our App Actions YouTube playlist for more information. You can also sign up to develop for Android Health Connect if you are interested in joining our Google Health and Fitness EAP. To jump right into how this integration was built, learn more about integrating WearOS and App Actions.

Android Studio Flamingo is stable

Posted by Steven Jenkins, Product Manager, Android Studio

Today, we are thrilled to announce the stable release of Android Studio Flamingo🦩: The official IDE for building Android apps!

This release includes improvements to help you build pixel-perfect UI with Live Edit, new features that assist with inspecting your app, IntelliJ updates, and more. Read on or watch the video to learn more about how Android Studio Flamingo🦩 can help supercharge your productivity and download the latest stable version today!

  

UI Tools

Jetpack Compose and Material 3 templates – Jetpack Compose is now recommended for new projects so the templates use Jetpack Compose and Material 3 by default.

Live Edit (Compose) experimental – Iteratively build an app using Compose by pushing code changes directly to an attached device or emulator. Push changes on file save or automatically and watch your UI update in real time. Live Edit is experimental and can be enabled in the Editor Settings. There are known limitations. Please send us your feedback so that we can continue to improve it. Learn more.

Moving image illustrating a live edit
Live edit

Themed app icon Preview support – You can now use the System UI Mode selector on the toolbar to switch wallpapers and see how your themed app icons react to the chosen wallpaper. (Note: required in apps targeting API level 33 and higher.)

Moving image illustrating preview of themed app icons across different wallpapers
Previewing Themed app icons across different wallpapers
Dynamic color Preview

Enable dynamic color in your app and use the new wallpaper attribute in an @Preview composable to switch wallpapers and see how your UI reacts to different wallpapers. (Note: you must use Compose 1.4.0 or higher.)

Moving image illustrating dynamic color wallpaper in Compose Preview
Compose Preview: dynamic color wallpaper

Build

Build Analyzer task categorization – Build Analyzer now groups tasks by categories such as Manifest, Android Resources, Kotlin, Dexing and more. Categories are sorted by duration and can be expanded to display a list of the corresponding tasks for further analysis. This makes it easy to know which categories have the most impact on build time.

Image of Build Analyzer Task Categorization
Build Analyzer Task Categorization

One-click automated profileable build and run – When you are profiling your app, you want to avoid profiling a debuggable build. These are great during development, but the results can be skewed. Instead, you should profile a non-debuggable build because that is what your users will be running. This is now more convenient with one-click automated profileable build and run. Easily configure a profileable app and profile it with one click. You can still choose to profile your debuggable build by selecting Profile app with complete data. Read more on the blog.

Image illustrating One-click Automated Profileable Build and Run
One-click Automated Profileable Build and Run

Lint support for SDK extensions – SDK extensions leverage modular system components to add APIs to the public SDK for previously released API levels. Now, you can scan for and fix SDK extension issues with lint support. Android Studio automatically generates the correct version checks for APIs that are launched using SDK extensions.

Image showing Lint Support for SDK Extensions
Lint Support for SDK Extensions

Android Gradle Plugin 8.0.0 – Android Studio Flamingo ships with a new, major version of the Android Gradle plugin. The plugin brings many improvements, but also introduces a number of behavior changes and the Transform API removal. Please make sure to read about the required changes before you upgrade the AGP version in your projects.

Inspect

Updates to App Quality Insights – Discover, investigate, and reproduce issues reported by Crashlytics with App Quality Insights. You can filter by app version, Crashlytics signals, device type, or operating system version. In the latest update you can now close issues or add useful annotations in the Notes pane.

Image showing how you can annotate and close issues inside the notes pane
Annotate and close issues inside the notes pane

Network Inspector traffic interception – Network Inspector now shows all traffic data for the full timeline by default. Create and manage rules that help test how your app behaves when encountering different responses such as status codes, and response headers and bodies. The rules determine what responses to intercept and how to modify these responses before they reach the app. You can choose which rule to enable or disable by checking the Active box next to each rule. Rules are automatically saved every time you modify them.

Image showing Network Inspector Traffic Interception
Network Inspector Traffic Interception

Auto-connect to foreground process in Layout Inspector – Layout Inspector now automatically connects to the foreground process. You no longer have to click to attach it to your app.

IntelliJ

IntelliJ Platform Update – Android Studio Flamingo (2022.2.1) includes the IntelliJ 2022.2 platform release, which comes with IDE performance improvements, enhanced rendering performance on macOS thanks to the Metal API and more. It also improves the IDE performance when using Kotlin, which positively impacts code highlighting, completion, and find usages. Read the IntelliJ release notes here.

Summary

To recap, Android Studio Flamingo (2022.2.1) includes these new enhancements and features:

UI Tools
  • Live Edit (Compose) - Experimental
  • Themed app icon Preview support
  • Dynamic color Preview
  • Jetpack Compose and Material 3 Templates

Build
  • Build Analyzer Task Categorization
  • One-click Automated Profileable Build and Run
  • Lint Support for SDK Extensions
  • Breaking changes in Android Gradle Plugin 8.0

Inspect
  • Updates to App Quality Insights
  • Network Inspector Traffic Interception
  • Auto-connect to foreground process in Layout Inspector

IntelliJ
  •  IntelliJ Platform 2022.2 Update

Check out the Android Studio release notes, Android Gradle plugin release notes, and the Android Emulator release notes for more details.

Download Studio Today!

Now is the time to download Android Studio Flamingo (2022.2.1) to incorporate the new features into your workflow. As always, we appreciate any feedback on things you like and issues or features you would like to see. If you find a bug or issue, please file an issue and also check out known issues. Remember to also follow us on Twitter, Medium, or YouTube for more Android development updates!

Kotlin DSL is Now the Default for New Gradle Builds

Posted by James Ward, Product Manager, Kotlin and Boris Farber, Developer Relations Engineer

Android has been Kotlin-first for four years and many Android developers have made the switch resulting in higher productivity and more stable apps. However the default language to define builds has been Groovy (build.gradle), even though a Kotlin (build.gradle.kts) option has existed in Gradle for a number of years.

Today we're excited to announce that we're switching the default language for build scripts to Kotlin! This means that Kotlin is the single default language used for all project code, including UI with Jetpack Compose, and now build scripts! We've been working with the Gradle and JetBrains teams on this improvement, and you can read more in their related announcements: Gradle Blog; JetBrains Blog.

This doesn’t affect existing projects using Groovy, as those will continue working with no plans for deprecation. But if you are creating new projects or modules starting from Android Studio Giraffe, you now get the Kotlin DSL by default. The updated project templates are an easy way to get started with the new Kotlin DSL build scripts. To migrate existing builds, check out the Kotlin DSL migration guide.

While the Kotlin DSL is the default for new projects, large, existing Groovy DSL based projects should wait on migrating while Gradle, JetBrains, and Google work on improving build performance further. This work is ongoing and we will share updates as we make progress. Specifically, script compilation performance is slower than with the Groovy DSL. However, unlike with the Groovy DSL, the Kotlin DSL script compilation results are stored in Gradle local and remote caches so that subsequent builds do not need recompilation.

Having a single language for all code in a project isn't the only benefit to this change, so let's look at some other great things about using the Kotlin DSL for Gradle builds.

  • Kotlin is statically typed so you get quick and accurate code hints while editing Kotlin DSL build scripts:
  • Syntax errors are more accurate, and they’re displayed while editing Kotlin DSL build scripts, instead of when trying to sync the project:
  • Get type and method documentation by pressing Control+Q (Command+B on macOS).If you need more details you can go to the underlying source code by pressing Control+Click (Command+Click):
  • You can mix Groovy DSL build scripts and Kotlin DSL build scripts in one project and migrate incrementally module by module. This enables new modules to use the Kotlin DSL while keeping existing modules on Groovy.

An associated change we are also making to the New Project templates is an experimental option to use Gradle Version Catalogs with Kotlin DSL build scripts.

Version Catalogs give you a centralized, scalable way of defining your project’s dependencies. While using Version Catalogs is optional, they pair great with the Kotlin DSL by providing more type safety in your build definitions.

To learn about migrating to Version Catalogs, check out the migration guide.

The new Kotlin DSL default change is available now in Android Studio Giraffe previews. Please try it and let us know how it goes!

Bring your IOT apps to cars

Posted by Brad Hinkel, Product Manager, Android Automotive Developer Platform

To deliver seamless experiences in cars, we’re now enabling developers to bring their internet of things (IOT) apps to cars. This will allow users to easily manage IOT systems like home security and doors directly from their car. You can now launch IOT apps to production for both Android Auto and Android Automotive OS.

IOT apps

You can start building your IOT apps for cars using driving-optimized templates from the Android for Cars App Library.

Android for Cars App Library Grid Template for IOT apps

The Automotive OS emulator for Android Automotive OS and the DHU for Android Auto allow you to easily test apps for this category. To start building your app for the car, check out our updated developer documentation, car quality guidelines, and design guidelines. For additional instructions on building IOT apps, visit here.

Drivers of cars using Android Auto can now download IOT apps developed with the Android for Cars App Library immediately from Google Play. Additionally you can join the Google Group for new beta apps and opt-in to new app's beta on the Google Play store, with your Gmail account.

Samsung SmartThings running on Android Auto

Experience for yourself how your app will look within the different systems, by accessing the OEM emulator system images downloadable in Android Studio.

To publish your app today, follow the below steps.

  1. Design your app’s experience using our developer guide and app quality guidelines.
  2. Develop using the latest release of the car app library so you can get user feedback from now.
  3. Test using the desktop head unit.
  4. Publish your app to Close or Open testing to the Google Play Store to get pre-production feedback from users.
  5. Ship your final app to cars.

We’re excited to see what you’ve built and take it for a spin!

If you’re interested in joining our Early Access Program in the future, please fill out this interest form. You can get started with the Android for Cars App Library today by visiting g.co/androidforcars.

Android 14 Beta 1

Posted by Dave Burke, VP of Engineering

Illustration of badge style Android 14 logo

Today we're releasing the first Beta of Android 14, building around our core themes of privacy, security, performance, developer productivity, and user customization while continuing to improve the large-screen device experience on tablets, foldables, and more. We've been making steady progress refining the features and stability of Android 14, and it's time to open the experience up to both developers and early-adopters.

Android delivers enhancements and new features year-round, and your feedback on the Android beta program plays a key role in helping Android continuously improve. The Android 14 developer site has lots more information about the beta, including downloads for Pixel and the release timeline. We’re looking forward to hearing what you think, and thank you in advance for your continued help in making Android a platform that works for everyone.


Working across form factors

Android 14 builds on the work done in past releases to support tablets and foldable form factors, and we've been building tools and resources to help polish your app experience, including design inspiration and development guides.


Smarter System UI

In the Android operating system, features are implemented by two separate yet equally important packages: the framework, which provides services, and the System UI, which gives the user control of those services. Each Android release brings new refinements to the system UI, and here are some that you might notice in Beta 1.


New back arrow

Image showing the back arrow indicating gesture navigation on a mobile device

The gesture navigation experience includes a more prominent back arrow while interacting with your app to help improve back gesture understanding and usefulness. The back arrow also compliments the user's wallpaper or device theme.



A superior system sharesheet

Screen image of custom sharesheet with direct share targets


In Android 14, apps can now add custom actions to system sharesheets they invoke. Create your custom ChooserAction using ChooserAction.Builder and specify a list of your ChooserActions as the Intent.EXTRA_CHOOSER_CUSTOM_ACTIONS of the Intent created with Intent.createChooser.

In addition, the system now uses more app signals to determine the ranking of the direct share targets. You provide the signal by calling pushDynamicShortcut to report shortcut usage with the corresponding capability bindings.






More graphics capabilities

Android 14 adds new graphics features that you can use to make your app really stand out.


Paths are now queryable and interpolatable

Android's Path API is a powerful and flexible mechanism for creating and rendering vector graphics. Starting in Android 14, you can query paths to find out what's inside of them. The API updates include functionality to interpolate between paths whose structures match exactly, enabling morphing effects, and an AndroidX library provides backwards compatibility back to API 21. More details here.


Personalization

Per-app language preferences

Android 14 enhances per-app language preferences, allowing for dynamic customization of the set of languages displayed in the Android Settings per-app language list, and giving IMEs a way to know the UI language of the current app. Starting with Android Studio Giraffe Canary 7 and AGP 8.1.0-alpha07, you can configure your app to support per-app language preferences automatically. Based on your project resources, the Android Gradle plugin generates the LocaleConfig file and adds a reference to it in the generated manifest file, so you no longer have to create or update the file manually when your language support changes. See Automatic per-app language support for more information and leave feedback.


Privacy

Limiting visibility to disability-focused accessibility services

Android 14 introduces the accessibilityDataSensitive attribute to allow apps to limit visibility of specified views only to accessibility services that claim to help users with disabilities. Play Protect ensures apps downloaded from the Play Store are truthful about these claims. TalkBack and other services that claim to help users with disabilities will not be affected by this attribute.

Apps can consider using accessibilityDataSensitive to:

  • Protect user data (such as personal details or plaintext passwords) 
  • Prevent critical actions from being executed unintentionally (such as transfering money or checking out in a shopping app)
  •  

App compatibility

If you haven't yet tested your app for compatibility with Android 14, now is the time to do it! With Android 14 now in beta, we're opening up access to early-adopter users as well as developers. In the weeks ahead, you can expect more users to be trying your app on Android 14 and raising issues they find.

To test for compatibility, install your published app on a device or emulator running Android 14 Beta and work through all of the app’s flows. Review the behavior changes to focus your testing. After you’ve resolved any issues, publish an update as soon as possible.

Image of Android 14 preview and release timeline indicating we are on target with Beta release in April

It’s also a good time to start getting ready for your app to target Android 14, by testing with the app compatibility changes toggles in Developer Options.

Partial screenshot of App Compatibility Changes in Developer Options
App compatibility toggles in Developer Options.

Get started with Android 14

Today's Beta release has everything you need to try the Android 14 features, test your apps, and give us feedback. For testing your app with tablets and foldables, the easiest way to get started is using the Android Emulator in a tablet or foldable configuration in the latest preview of the Android Studio SDK Manager. Now that we've entered the beta phase, you can enroll any supported Pixel device here to get this and future Android 14 Beta and feature drop Beta updates over-the-air. If you don’t have a Pixel device, you can use the 64-bit system images with the Android Emulator in Android Studio.

For the best development experience with Android 14, we recommend that you use the latest preview of Android Studio Giraffe (or more recent Giraffe+ versions). Once you’re set up, here are some of the things you should do:

  • Try the new features and APIs - your feedback is critical as we finalize the APIs. Report issues in our tracker on the feedback page
  • Test your current app for compatibility - learn whether your app is affected by default behavior changes in Android 14. Install your app onto a device or emulator running Android 14 and extensively test it. 
  • Test your app with opt-in changes - Android 14 has opt-in behavior changes that only affect your app when it’s targeting the new platform. It’s important to understand and assess these changes early. To make it easier to test, you can toggle the changes on and off individually.

We’ll update the preview and beta system images and SDK regularly throughout the Android 14 release cycle.

If you are already enrolled in the Android 13 QPR Beta program and your device is supported, Android 14 Beta 1 will be made available to you without taking any additional action.

For complete information on how to get the Beta, visit the Android 14 developer site.

What’s new in multiplatform Jetpack libraries

Posted by Márton Braun, Developer Relations Engineer

To support developers who are already using Kotlin Multiplatform for sharing business logic across mobile platforms, we previously released experimental multiplatform previews of the Collections and DataStore Jetpack libraries, and we've been receiving great feedback from the community.

The multiplatform Collections and DataStore libraries are now moving from experimental developer previews to alpha releases, and will follow the normal release cycle of Jetpack libraries. Annotations, a core Jetpack library, is now also available for multiplatform.

Please note that Kotlin Multiplatform is still in beta, therefore the non-Android targets of these libraries don’t have Jetpack’s usual stability guarantees.

The alpha releases are available from Google’s Maven repository. You can try them by adding the following dependencies to your Kotlin Multiplatform project:

val commonMain by getting { dependencies { implementation("androidx.annotation:annotation:1.7.0-alpha02") implementation("androidx.collection:collection:1.3.0-alpha04") // Lower-level APIs with support for custom serialization implementation("androidx.datastore:datastore-core-okio:1.1.0-alpha03") // Higher-level APIs for storing values of basic types implementation("androidx.datastore:datastore-preferences-core:1.1.0-alpha03") } }

The multiplatform DiceRoller sample app has also been updated to use the new alpha version of DataStore.

To provide feedback on these multiplatform releases, create a bug on our issue tracker, or join the conversation in the Kotlinlang #multiplatform channel.