Author Archives: Android Developers

Top things to know in Android Platform and Quality at Google I/O ’23

Posted by Dan Galpin, Developer Relations Engineer

Google I/O was HUGE for developers with exciting news all across the platform and more around quality. Here are the top three announcements around Android and App Quality from Google I/O 2023:

#1 Android 14 comes with new features in privacy and security, system UI, and more

Android 14 continues our effort to improve privacy and security on the platform with the CredentialManager, which has a unified API that brings support for passkeys and federated login. Health Connect is also now a core part of the platform and available on all Android mobile devices directly in Settings, helping to control how users’ health and fitness data is shared across apps.. In addition, the beta of Privacy Sandbox on Android ensures effective privacy-preserving personalized advertising experiences.

Additionally, you’ll find Foreground Service changes, with required types, new permissions, system runtime checks, and new purpose-built APIs for user initiated data transfers and VoIP telephony that behave more consistently across our entire ecosystem. Android 14 also introduces Grammatical Inflection to help your app correctly address your users, along with updated per-app language and regional preferences. Finally, check out the Updated Predictive Back APIs that support in-app animations.

Watch the sessions that will help you get your app ready:

#2 Premium devices mean premium app experiences with camera & media and on-device ML

To help devices become creative powerhouses, Media3's Transformer supports video editing and transcoding and Android 14 introduces Ultra HDR images and more premium camera extensions. To leverage that CPU and GPU power to enable new productivity experiences, ML Kit adds new, production-ready on-device machine learning models such as document scanning and face mesh, and the Acceleration service for your custom ML models is in public beta.

Check out the sessions from I/O to learn more:

#3 More around app quality: a new quality framework, quality hub, and design hub

We've introduced a quality framework and quality hub which includes insights into how Google Play views app quality. We also created a new UI design hub that gives you a centralized destination for guidance, Figma starter kits, UI samples, and inspirational galleries to help apply our best practices for phones, large screens, wearables, and TVs.

Be sure to catch the full Android Platform and Quality playlist from Google I/O for all these videos!

What it means to be a Google Developer Expert – spotlight stories

Posted by Dawid Ostrowski, Developer Relations Program Manager, Android Developer

Welcome to our Google Developer Expert series where we highlight some incredible Android GDEs. Through the series they’ll explain how they became GDEs and what it means to them to be part of the community.

If you tuned in to #TheAndroidShow you may have already spotted some familiar faces as our Google Developer Experts helped introduce the Android GDE community.

In our first short episode we’re excited to reintroduce Madona, a Senior Android Developer from the USA. She shares her journey to becoming a GDE, from her first steps as a developer through to the impact of being a GDE on her career.

Madona used her knowledge of Java to build her first app which led her to the Women Techmakers Academy. Fast forward to today and she is now a professional Android developer and Google Developer Expert.

Over the coming weeks we’ll be sharing more short videos from Android Google Developer Experts as they share their best advice, tips, and experiences as a GDE. Meet the Android GDEs who’ll be sharing their experiences below:

Headshot of Ahmed, smiling

Meet Ahmed, a Software Engineer from the Netherlands. Ahmed will be explaining how the GDE program has grown from its founding days to now.

Headshot of Zarah, smiling

Meet Zarah, an Android Developer from Australia. Zarah will share her experience as the first woman Android GDE in Australia and how she would encourage more diversity and inclusivity in the Android GDE community.

Headshot of Annyce, smiling

Meet Annyce, Vice President of Engineering from the USA. She’ll share her top career and life advice for other developers.

Headshot of Harun, smiling

Meet Harun, a Software Engineer from Kenya. Harun will share the different routes to becoming a GDE, from contributing to open source to sharing content, there are many ways to share with the Android community.

Headshot of Dinorah, smiling

Last but not least, meet Dinorah, Mobile Lead from Mexico. Dinorah will share how she’s seen the GDE program evolve to help shape the next generation of developers.

Does the community inspire you? Get involved by speaking at your local developer conferences, sharing your latest Android projects, and by not being afraid to experiment with new technology.

Active in the #AndroidDev community? Become an Android Google Developer Expert.

Upcoming changes to InAppProducts API and subscription catalog management

Posted by Rejane França, Product Manager and Serge Beauchamp, Software Engineer at Google Play

Last year, we introduced new capabilities for subscriptions on Google Play, giving you more flexibility and control when it comes to growing and retaining your subscribers. The enhanced developer experience enabled by the monetization.subscriptions APIs, separates your subscription products - what you sell - from how you sell them, allowing you to configure multiple base plans and offers for each subscription. The new model is designed to reduce the complexity and overhead of managing your product configuration - this means:

    • The subscription now defines the benefits and other metadata for the product you are selling, regardless of how the user pays.
    • Each base plan within a subscription defines the base price for a specific billing period and plan renewal type.
    • In addition to auto-renewing plans, you can sell prepaid plans that allow users access to pay a fixed amount of time, and then top-up as desired. With prepaid plans, reach users in regions where pay-as-you-go is standard or provide an alternative for users not ready to purchase an auto-renewing plan.
    • Offers build on the base plan, making it easier to define alternative pricing for eligible users throughout the monetization lifecycle. They can be used to acquire new subscribers, incentivize upgrades, or retain existing subscribers.

Monetization.subscriptions APIs will replace InAppProducts API for subscription catalog management

Starting on January 1, 2024, all new apps must use monetization.subscriptions APIs for managing your subscriptions catalog. Existing apps will have until May 1, 2024 to migrate to the new monetization.subscriptions APIs, at which point support for using the InAppProducts API for managing your subscriptions catalog will end completely.

Starting this month, if we detect that your app has used the InAppProducts API to manage your subscriptions within the last 7 days, you will start seeing a reminder in Play Console to migrate over to monetization.subscriptions APIs.

Additionally, if your app is not using the latest version of Play Billing Library, you’ll need to upgrade to version 5.0 or later before November of this year in order to publish updates to your app.

If you continue to use the InAppProduct API while support is still available, the subscription SKUs you create will be automatically converted into the new model following the backward compatible structure represented below with limited access to new features. Learn more about converted subscriptions here.

New model separates your subscription products – what you sell – from how you sell them.


No changes to selling in-app items with the InAppProducts API

This deprecation will only impact the InAppProducts API when used to manage your subscription product catalog in Play Console. All apps can continue using the InAppProducts API to manage one-time products. The Play Billing Library and Subscription Purchase APIs will not be impacted. Note that both InAppProducts API and monetization.subscriptions APIs are for managing your subscription catalog on Play from your backend, and should not be called directly as part of any in-app flows.


Start your migration to the monetization.subscriptions APIs

If you use the Google Play Developer API client libraries - available for Java, Python, and other popular languages - we recommend upgrading to the latest versions, which already include the monetization.subscriptions APIs. Base plans can be managed with the monetization.subscription.basePlans API, and introductory pricing and free trials can be managed as offers with the monetization.subscriptions.basePlans.offers API.

To use the new monetization.subscriptions APIs with existing subscriptions, make sure that you’ve made your pre-existing subscriptions editable in Play Console.

Start maximizing the latest subscription capabilities available with the monetization.subscriptions APIs. Learn more by visiting the Help Center, getting started guide, documentation, and sample app.

#WeArePlay | Meet Tessa and Saasha from the UK, founders of waste-fighting app Olio

Posted by Leticia Lago, Developer Marketing In our latest #WeArePlay film, we’re spotlighting Tessa and Saasha - best friends turned co-founders of Olio. They’ve been on a mission to help people reduce waste by encouraging communities to share, sell or give-away what they no longer need - from leftover food to household items. The app now helps millions take one big step closer to living in a zero waste world.

Growing up on a farm, Tessa quickly learned how much hard work goes into producing food. Meanwhile, Saasha spent her childhood helping her family make ends meet through scavenging items that others threw away. When they eventually met in college, they bonded over their passion to help to save the environment through recycling and reducing waste.

But it wasn’t until Tessa was one day moving countries when the idea for Olio came - she couldn’t pack leftover food in air-freight, and couldn’t easily find anyone to take it. Feeling like this was a missed opportunity, she told Saasha about the idea for a food-sharing app. Saasha instantly knew she wanted to help make this app a reality, and so Olio was born. Tessa believes that “if no one else is taking action then we have to take action”.

Originally developed to encourage people to give away their surplus food, over time Olio has evolved so that people can give away any items that could have a second life. It’s now used in 62 countries, and Olio also partners with supermarkets and restaurants with the help of Food Waste Heroes - volunteers who collect and redistribute surplus food – saving an estimated 1 million meals per week. Looking to the future, Saasha says their ambition is “to create a world in which sharing becomes the new normal”.

You can read more inspiring stories, including those featuring LGTBQ+ apps celebrating Pride Month, at g.co/play/weareplay.

How useful did you find this blog post?

Top 3 things to know in Modern Android Development at Google I/O ’23

Posted by Rebecca Franks, Android Developer Relations Engineer

Google I/O 2023 was filled with exciting updates and announcements. Modern Android Development (MAD) is all about making Android app development faster and easier! By creating libraries, tools and guidance to speed up your flow and help you write safer, better code so that you can focus on building amazing experiences.

Here are our top three announcements from Google I/O 2023:

#1 Get your development questions answered with Studio Bot

One of the announcements we’re most excited about is Studio Bot, an experimental new AI powered coding assistant, right in your IDE. You can ask it questions or use it to help fix errors — all without ever having to leave Android Studio or upload your source code.

Studio Bot is in its very early days, and is currently available for developers in the US. Download Android Studio canary to try it out and help it improve.



#2 Jetpack Compose has improvements for flow layouts, new Material components, and more

Jetpack Compose continues to be a big focus area, making it easier to build rich UIs. The May 2023 release included many new layouts and improvements such as horizontal and vertical pagers, flow layouts and new Material 3 components such as date and time pickers and bottom sheets.

There have also been large performance improvements to the modifier system, with more updates still in the works. For text alone, this update resulted in an average 22% performance gain that can be seen in the latest alpha release, and these improvements apply across the board. To get these benefits in your app, all you have to do is update your Compose version!

You can now also use Jetpack Compose to build home screen widgets with the Glance library and TV apps with Compose for TV.

Read the blog post for more information about “What’s new in Jetpack Compose”.


#3 Use Kotlin everywhere, throughout your app

Since the official Kotlin for Android support announcement in 2017, we’ve continued to make improvements to helping you develop with Kotlin. Six years later, we are continuing to invest in improvements for Kotlin.

Firstly, we are collaborating with JetBrains on the new K2 compiler which is already showing significant improvements in compilation speed. We are actively working on integration into our tools such as Android Studio, Android Lint, KSP, Compose and more, and leveraging Google’s large Kotlin codebases to verify compatibility of the new compiler.

In addition, we now recommend using Kotlin for your build scripts and version catalogs. With Kotlin in your build and in your UI with Compose, you can now use Kotlin everywhere, throughout your app.


For more information, check out the “What’s new in Kotlin” talk.

And that's our top 3 Modern Android Development announcements from Google I/O 2023, check out this playlist for more.

Designing for Wear OS: Getting started with designing inclusive smartwatch apps

Posted by Matthew Pateman & Mallory Carroll (UX Research), and Josef Burnham (UX Design)

Smartwatches are becoming increasingly popular, with many people using them to stay connected, track their health, and control their devices. Watches enable people to get information at a glance and then take action. These quick and frequent interactions can help people get back to being present in their daily lives.

To help with the challenges of designing and building great watch experiences that work for all, we have created a series of videos. These videos cover a variety of topics starting with how to understand what people want from a smartwatch app. We cover how best to design for your target audience, and how to make the most of the watch’s form factor with a series of design principles. Lastly, we give you an introduction on how to approach product inclusion throughout the whole development lifecycle, and how this approach can help make your products better for all. If you’re interested in learning more, be sure to check out the videos below.


1. Introduction to UX Research & Product Inclusion on Wear OS

If you’re considering building a smartwatch app but don’t know how to begin, this video will help you get started. It shows how to uncover what people want from a smartwatch app, what a great Wear OS experience should look like, and how to ensure it addresses real needs of the people you are building for. Lastly, you’ll find out how to take an equity-focused approach when developing products, apps, and experiences.


2. Introduction to UX Design on Wear OS

Did you know that the average smartwatch interaction is approximately 5 seconds long? In this video you will learn how to design effective and engaging experiences for Wear OS. We’ll guide you on how to make the most out of these short watch interactions by covering key differences between mobile and smartwatch design, the importance of a glanceable user experience, and practical tips for designing for different Wear OS surfaces.


3. Introduction to Product Inclusion & Equity

We will introduce you to Product Inclusion and Equity, and how to approach it when designing for Wear OS. You will learn how to build for belonging and make products more accessible and usable by all.


4. Case Studies: Inclusion and Exclusion in Technology Design

Here you will see a series of case studies showing how product and design choices can be impactful on a personal, community, and systemic level. Designs can both be affirming and inclusive, or harmful and exclusionary to various people and communities. We’ll use some examples to highlight how important inclusion and equity considerations are when making product decisions.


5. Considerations for Community Co-Design

The last video in this series will give you an introduction into community co-design, a powerful approach that focuses on building solutions with, not for, historically marginalized communities. In community co-design, we engage with people based on identity, culture, community, and context. You’ll find out how to engage people and communities in a safe, respectful, and equity-centered way in product development.


Keep your eyes peeled for more updates from us as we continue to share and evolve our latest design thinking and practices, principles, and guidelines.

We also have many more resources to help get you started designing for Wear OS:

  • Find inspiring designs for different types of apps in our gallery
  • Interested in designing for multiple devices from TV’s to mobiles to tablets, check out our design hub
  • Access developer documentation for Wear OS

WPS uses ML Kit to seamlessly translate 43 languages and net $65M in annual savings

Posted by the Android team

WPS is an office suite software that lets users effortlessly view and edit all their documents, presentations, spreadsheets, and more. As a global product, WPS requires a top-notch and reliable in-suite translation technology that doesn’t require users to leave the app. To ensure all its users can enjoy the full benefits of the suite and its content in their preferred language, WPS uses the translation API from ML Kit, Google's on-device and production-ready machine learning toolkit for Android development.

WPS users rely on text translation

Many WPS users rely on ML Kit’s translation tools when reading, writing, or viewing their documents. According to a WPS data sample on single-day usage, there were 6,762 daily active users using ML Kit to translate 17,808 pages across all 43 of its supported languages. Students, who represent 44% of WPS’s userbase, especially rely on translation technology in WPS. WPS helps students better learn to read and write foreign languages by providing them with instant, offline translations through ML Kit.

Moving image of text bubbles with 'hello' in different languages appear (Spanish, French, Korean, English, Greek, Chinese, Italian, Russian, Portuguese, Tamil)

ML Kit provides free, offline translations

When choosing a translation provider, the WPS team looked at a number of popular options. But the other services the company considered only supported cloud-based translation and couldn’t translate text for some complex languages. The WPS team wanted to ensure all of its users could benefit from text translation, regardless of language or network availability. WPS ultimately chose ML Kit because it could both translate text offline and for each of the languages it serves.

“WPS has many African users, among whom are speakers of Swahili and Tamil, which are complex languages that aren’t supported by other translation services,” said Zhou Qi, Android team leader at WPS. “We’re very happy to provide these users with the translation services they need through ML Kit.”

What’s more, the other translation services WPS considered were expensive. ML Kit is completely free to use, and WPS estimates it's saving roughly $65 million per year by choosing ML Kit over another, paid translation software development kit.

Optimizing WPS for ML Kit’s translation API

ML Kit not only provides powerful multilingual translation but also supports App Bundle and Dynamic Delivery, which gives users the option to download ML Kit's translation module on demand. Without App Bundle and Dynamic Delivery, users who don’t need ML Kit would have had to download it anyway, impacting install-time delivery.

“When a user downloads the WPS app, the basic module is downloaded by default. And when the user needs to use the translation feature, only then will it be downloaded. This reduces the initial download size and ensures users who don't need translation assistance won’t be bothered by downloading the module,” said Zhou.

Quote card with headshot of Zhou Qui and text reads, “By using ML Kit’s free API, we provide our users with very useful functions, adding convenience to their daily lives and making document reading and processing more efficient.” — Zhou Qi, Android team leader, WPS

ML Kit’s resources made the process easy

During implementation the WPS team used ML Kit’s official guides frequently to steer their development processes. These tools allowed them to learn the ins and outs of the API and ensure any changes met all of its users’ needs. With the documentation and recommendations provided directly from the ML Kit site, WPS developers were able to quickly and easily integrate the new toolkit to their workflow.

“With the provided resources, we rarely had to search for help. The documentation was clear and concise. Plus, the API was straightforward and developer-friendly, which greatly reduced the learning curve,” said Zhou.

Streamlining UX with ML Kit

Before implementing ML Kit, WPS users had to open a separate application to translate their documents, creating a burdensome user experience. With ML Kit’s automatic language identification and instant translations, WPS now provides its users a streamlined way to translate text quickly, accurately, and without ever leaving the application, significantly improving platform UX.

Moving forward, WPS plans to expand its use of ML Kit, particularly with text recognition. WPS users continue to request the ability to process text on captured photos, so the company plans to use ML Kit to refine the app’s text recognition abilities as well.

Integrate machine learning into your workflow

Learn more about how ML Kit makes on-device machine learning easy.

14 Things to know for Android developers at Google I/O!

Posted by Matthew McCullough, Vice President, Product Management, Android Developer

Today, at Google I/O 2023, you saw how we are ushering in important breakthroughs in AI across all of Google. For Android developers, we see this technology helping you out in your flow, saving you time so you can focus on building engaging new experiences for your users. Time saving tools are going to be even more important, as your users are asking you to support their experiences across an expanding portfolio of screens, like large screens and wearables in particular. Across the Google and Developer Keynotes, Android showed you a number of ways to support you in this mission to help build great experiences for your users; read on for our 14 new things to know in the world of Android Developer (and yes, we also showed you the latest Beta for Android 14!).


BRINGING AI INTO YOUR WORKFLOW

#1: Leverage AI in your development with Studio Bot

As part of Google’s broader push to help unlock the power of AI to help you throughout your day, we introduced Studio Bot, an AI powered conversational experience within Android Studio that helps you generate code, fix coding errors, and be more productive. Studio Bot is in its very early days, and we’re training it to become even better at answering your questions and helping you learn best practices. We encourage you to read the Android Studio blog, download the latest version of Android Studio, and read the documentation to learn how you can get started.


#2: Generate Play Store Listings with AI

Starting today, when you draft a store listing in English, you’ll be able to use Google’s Generative-AI technology to help you get started. Just open our AI helper in Google Play Console, enter a couple of prompts, like an audience and a key theme, and it will generate a draft you can edit, discard, or use. Because you can always review, you’re in complete control of what you submit and publish on Google Play.

Moving image shaing generating Google Play listings with AI

BUILDING FOR A MULTI-DEVICE WORLD

#3: Going big on Android foldables & tablets

Google is all in on large screens, with two new Android devices coming from Pixel - the Pixel Fold and the Pixel Tablet - and 50+ Google apps optimized to look great on the Android large screen ecosystem, alongside a range of apps from developers around the world. It is a great time to invest, with improved tools and guidance like the new Pixel Fold and Pixel Tablet emulator configurations in Android Studio Hedgehog Canary 3, expanded Material design updates, and inspiration for gaming and creativity apps. You can start optimizing for these and other large screen devices by reading the do’s and don’ts of optimizing your Android app for large screens and watching the Developing high quality apps for large screens and foldables session.


#4: Wear OS: Watch faces, Wear OS 4, & Tiles animations

Wear OS active devices have grown 5x since launching Wear OS 3, so there’s more reason than ever to build a great app experience for the wrist. To help you on your way, we announced the new Watch Face Format, a new declarative XML format built in partnership with Samsung to help you bring your great idea to the watch face market. We’re also releasing new APIs to bring rich animations to tiles and helping you get ready for the next generation of platform updates with the Wear OS 4 Developer Preview. Learn more about all the latest updates by checking out our blog, watching the session, and taking a look at the brand new Wear OS gallery.

Moving image shaing generating Google Play listings with AI

#5: Android Health: An interconnected health experience across apps and devices

With 50+ apps in our Health Connect ecosystem and 100+ apps integrated with Health Services, we’re improving Android Health offerings so more developers can work together to bring unique health and fitness experiences to users. Health Connect is coming to Android 14 this fall, making it even easier for users to control how their health data is being shared across apps directly from Settings on their device. Read more about what we announced at I/O and check out our Health Services documentation, Health Connect documentation, and code samples to get started!

#6: Android for Cars: New apps & experiences

Our efforts in cars continue to grow: Android Auto will be available in 200 million cars this year and the number of cars with Google built-in will double in the same period. It’s easier than ever to port existing Android apps to cars and bring entirely new experiences to cars, like video and games. To get started, check out the What’s New with Android for Cars session and check out the developer blog.

#7: Android TV: Compose for TV and more!

We continue our commitment to bringing the best of the app ecosystem to Android TV OS. Today, we’re announcing Compose for TV, the latest UI framework for developing beautiful and functional apps for Android TV OS. To learn more, read the blog post and check out the developer guides, design reference, our new codelab and sample code. Also, please continue to give us feedback so we can continue shaping Compose for TV to fit your needs.

#8: Assistant: Simplified voice experiences across Android

Building Google Assistant integrations inside familiar Android development paths is even easier than before. With the new App Actions Test Library and the Google Assistant plugin for Android Studio–which is now also available for Wear and Auto–it is now easier to code, easier to emulate your user’s experience to forecast user expectations, and easier to deploy App Actions integrations across primary and complementary Android devices. To get started, check out the session What's new in Android development tools and check out the developer documentation.


MODERN ANDROID DEVELOPMENT

#9: Build UI with Compose across screens

Jetpack Compose, our modern UI toolkit for Android development has been steadily growing in the Android community: 24% of the top 1000 apps on Google Play are using Jetpack Compose, which has doubled from last year. We’re bringing Compose to even more surfaces with Compose for TV in alpha, and homescreen widgets with Glance, now in beta. Read more about what we announced at Google I/O, and get started with Compose for building UI across screens.


#10: Use Kotlin everywhere, throughout your app

The Kotlin programming language is at the core of our development platform, and we keep expanding the scale of Kotlin support for Android apps. We’re collaborating with JetBrains on the new K2 compiler, and are actively working on integration into our tools such as Android Studio, Android Lint, KSP, Compose etc and leveraging Google’s large Kotlin codebases to verify compatibility of the new compiler. We now recommend using Kotlin DSL for build scripts. Watch the What’s new in Kotlin for Android talk to learn more.

#11: App Quality Insights now contain Android Vitals reports

Android Studio’s App Quality Insights enables you to access Firebase Crashlytics issue reports directly from the IDE, allowing you to navigate between stack trace and code with a click, use filters to see only the most important issues, and see report details to help you reproduce issues. In the latest release of Android Studio, you can now view important crash reports from Android Vitals, all without adding any additional SDKs or instrumentation to your app. Read more about Android Studio Hedgehog for updates on your favorite Android Studio features.


AND THE LATEST FROM ANDROID & PLAY

#12: What’s new in Play

Get the latest updates from Google Play, including new ways to drive audience growth and monetization. You can now create custom store listings for more user segments including inactive users, and soon for traffic from specific Google Ads campaigns. New listing groups also make it easier to create and maintain multiple listings. Optimize your monetization strategy with price experiments for in-app products and new subscription capabilities that allow you to offer multiple prices per billing period. Learn about these updates and more in our blog post.

#13: Design beautiful Android apps with the new Android UI Design Hub

To make it even easier to build compelling UI across form factors, check out the new Android UI Design Hub. A comprehensive resource to understand how to create user-friendly interfaces for Android with guidance - sharing takeaways, examples and do’s and don’ts, figma starter kits, UI code samples and inspirational galleries.

#14: And of course, Android 14!

We just launched Android 14 Beta 2, bringing enhancements to the platform around camera and media, privacy and security, system UI, and developer productivity. Get excited about new features and changes including Health Connect, ultra HDR for images, predictive back, and ML. ML Kit is launching new APIs like face mesh and document scanner, and Acceleration Service in custom ML stack is now in public beta so you can deliver more fluid, lower latency user experiences. Learn more about Beta 2 and get started by downloading the beta onto a supported device or testing your app in the Emulator.

This was just a small peek of some of the new ways Android is here to help support you. Don’t forget to check out the Android track at Google I/O, including some of our favorite talks like how to Reduce reliance on passwords in Android apps with passkey support and Building for the future of Android. The new Activity embedding learning pathway is also now available to enable you to differentiate your apps on tablets, foldables, and ChromeOS devices. Whether you’re joining us online or in-person at one of the events around the world, we hope you have a great Google I/O - and we can’t wait to see the great experiences you build with the updates that are coming out today!

What’s new in Jetpack Compose

Posted by Jolanda Verhoef, Android Developer Relations Engineer

It has been almost two years since we launched the first stable version of Jetpack Compose, and since then, we’ve seen its adoption and feature set grow spectacularly. Whether you write an application for smartphones, foldables, tablets, ChromeOS devices, smartwatches, or TVs, Compose has got you covered! We recommend you to use Compose for all new Wear OS, phone and large-screen apps. With new tooling and library features, extended Material Design 3, large screen, and Wear OS support, and alpha versions of Compose for homescreen widgets and TV… This is an exciting time!

Compose in the community

In the last year, we’ve seen many companies investigating and choosing Compose to build new features and migrate screens in their production applications. 24% of the top 1000 apps on Google Play have already chosen to adopt Compose! For example, Dropbox engineers told us that they rewrote their search experience in Compose in just a few weeks, which was 40% less time than anticipated, and less than half the time it took the team to build the feature on iOS. They also shared that they were interested in adopting Compose “because of its first-class support for design systems and tooling support”. Our Google Drive team cut their development time nearly in half when using Compose combined with architecture improvements.

It’s great to see how these teams experience faster development cycles, and also feel their UI code is more testable. Inspired? Start by reading our guide How to Adopt Compose for your Team, which outlines how and where to start, and shows the areas of development where Compose can bring huge added value.


Library features & development

Since we released the first Compose Bill of Materials in October last year, we’ve been working on new features, bug fixes, performance improvements, and bringing Compose to everywhere you build UI: phones, tablets, foldables, watches, TV, and your home screen. You can find all changes in the May 2023 release and the latest alpha versions of the Compose libraries.

We’ve heard from you that performance is something you care about, and that it’s not always clear how to create performant Compose applications. We’re continuously improving the performance of Compose. For example, as of last October, we started migrating modifiers to a new and more efficient system, and we’re starting to see the results of that migration. For text alone, this work resulted in an average 22% performance gain that can be seen in the latest alpha release, and these improvements apply across the board. To get these benefits in your app, all you have to do is update your Compose version!

Text and TextField got many upgrades in the past months. Next to the performance improvements we already mentioned, Compose now supports the latest emoji version 🫶 and includes new text features such as outlining text, hyphenation support, and configuring line breaking behavior. Read more in the release notes of the compose-foundation and compose-ui libraries.

The new pager component allows you to horizontally or vertically flip through content, which is similar to ViewPager2 in Views. It allows deep customization options, making it possible to create visually stunning effects:

Moving image showing Hoizontal Pager composable
Choose a song using the HorizontalPager composable. Learn how to implement this and other fancy effects in Rebecca Franks' blog post.

The new flow layouts FlowRow and FlowColumn make it easy to arrange content in a vertical or horizontal flow, much like lines of text in a paragraph. They also enable dynamic sizing using weights to distribute the items across the container.

Image of search filters in a real estate app created with flow layouts
Using flow layouts to show the search filters in a real estate app

To learn more about the new features, performance improvements, and bug fixes, see the release notes of the latest stable and newest alpha release of the Compose libraries.

Tools

Developing your app using Jetpack Compose is much easier with the new and improved tools around it. We added tons of new features to Android Studio to improve your workflow and efficiency. Here are some highlights:

Android Studio Flamingo is the latest stable release, bringing you:

  • Project templates that use Compose and Material 3 by default, reflecting our recommended practices.
  • Material You dynamic colors in Compose previews to quickly see how your composable responds to differently colored wallpapers on a user device.
  • Compose functions in system traces when you use the System Trace profiler to help you understand which Compose functions are being recomposed.

Android Studio Giraffe is the latest beta release, containing features such as:

  • Live Edit, allowing you to quickly iterate on your code on emulator or physical device without rebuilding or redeploying your app.
  • Support for new animations APIs in Animation preview so you can debug any animations using animate*AsStateCrossFaderememberInfiniteTransition, and AnimatedContent.
  • Compose Preview now supports live updates across multiple files, for example, if you make a change in your Theme.kt file, you can see all Previews updates automatically in your UI files.
  • Improving auto-complete behavior. For example, we now show icon previews when you’re adding Material icons, and we keep the @Composable annotation when running “Implement Members".

Android Studio Hedgehog contains canary features such as:

  • Showing Compose state information in the debugger. While debugging your app, the debugger will tell you exactly which parameters have “Changed” or have remained “Unchanged”, so you can more efficiently investigate the cause of the recomposition.
  • You can try out the new Studio Bot, an experimental AI powered conversational experience in Android Studio to help you generate code, fix issues, and learn about best practices, including all things Compose. This is an early experiment, but we would love for you to give it a try!
  • Emulator support for the newly announced Pixel Fold and Tablet Virtual Devices, so that you can test your Compose app before these devices launch later this year.
  • A new Espresso Device API that lets you apply rotation changes, folds, and other synchronous configuration changes to your virtual devices under test.

We’re also actively working on visual linting and accessibility checks for previews so you can automatically audit your Compose UI and check for issues across different screen sizes, and on multipreview templates to help you quickly add common sets of previews.

Material 3

Material 3 is the recommended design system for Android apps, and the latest 1.1 stable release adds a lot of great new features. We added new components like bottom sheets, date and time pickers, search bars, tooltips, and others. We also graduated many of the core components to stable, added more motion and interaction support, and included edge-to-edge support in many components. Watch this video to learn how to implement Material You in your app:


Extending Compose to more surfaces

We want Compose to be the programming model for UI wherever you run Android. This means including first-class support for large screens such as foldables and tablets and publishing libraries that make it possible to use Compose to write your homescreen widgets, smartwatch apps, and TV applications.

Large screen support

We’ve continued our efforts to make development for large screens easy when you use Compose. The pager and flow layouts that we released are common patterns on large screen devices. In addition, we added a new Compose library that lets you observe the device’s window size class so you can easily build adaptive UI.

When attaching a mouse to an Android device, Compose now correctly changes the mouse cursor to a caret when you hover the cursor over text fields or selectable text. This helps the user to understand what elements on screen they can interact with.

Moving image of Compose adjusting the mouse cursor to a caret when the mouse is hovering over text field

Glance

Today we publish the first beta version of the Jetpack Glance library! Glance lets you develop widgets optimized for Android phone, tablet, and foldable homescreens using Jetpack Compose. The library gives you the latest Android widget improvements out of the box, using Kotlin and Compose:

  • Glance simplifies the implementation of interactive widgets, so you can showcase your app’s top features, right on a user’s home screen.
  • Glance makes it easy to build responsive widgets that look great across form factors.
  • Glance enables faster UI Iteration with your designers, ensuring a high quality user experience.
Image of search filters in a real estate app created with flow layouts

Wear OS

We launched Compose for Wear OS 1.1 stable last December, and we’re working hard on the new 1.2 release which is currently in alpha. Here’s some of the highlights of the continuous improvements and new features that we are bringing to your wrist:

  • The placeholder and placeholderShimmer add elegant loading animations that can be used on chips and cards while content is loading.
  • expandableItems make it possible to fold long lists or long text, and only expand to show their full length upon user interaction.
  • Rotary input enhancements available in Horologist add intuitive snap and fling behaviors when a user is navigating lists with rotary input.
  • Android Studio now lets you preview multiple watch screen and text sizes while building a Compose app. Use the Annotations that we have added here.

Compose for TV

You can now build pixel perfect living room experiences with the alpha release of Compose for TV! With the new AndroidX TV library, you can apply all of the benefits of Compose to the unique requirements for Android TV. We worked closely with the community to build an intuitive API with powerful capabilities. Engineers from Soundcloud shared with us that “thanks to Compose for TV, we are able to reuse components and move much faster than the old Leanback View APIs would have ever allowed us to.” And Plex shared that “TV focus and scrolling support on Compose has greatly improved our developer productivity and app performance.”

Compose for TV comes with a variety of components such as ImmersiveList and Carousel that are specifically optimized for the living room experience. With just a few lines of code, you can create great TV UIs.

Moving image of TVLazyGrid on a screen

TvLazyColumn {   items(contentList) { content ->     TvLazyRow { items(content) { cardItem -> Card(cardItem) }   } }

Learn more about the release in this blog post, check out the “What’s new with TV and intro to Compose” talk, or see the TV documentation!

Compose support in other libraries

It’s great to see more and more internally and externally developed libraries add support for Compose. For example, loading pictures asynchronously can now be done with the GlideImage composable from the Glide library. And Google Maps released a library which makes it much easier to declaratively create your map implementations.

GoogleMap( //... ) { Marker( state = MarkerState(position = LatLng(-34, 151)), title = "Marker in Sydney" ) Marker( state = MarkerState(position = LatLng(35.66, 139.6)), title = "Marker in Tokyo" ) }

New and updated guidance

No matter where you are in your learning journey, we’ve got you covered! We added and revamped a lot of the guidance on Compose:

Happy Composing!

We hope you're as excited by these developments as we are! If you haven't started yet, it's time to learn Jetpack Compose and see how your team and development process can benefit from it. Get ready for improved velocity and productivity. Happy Composing!

Google I/O 2023: What’s new in Jetpack

Posted by Amanda Alexander, Product Manager, Android

Android Jetpack is a key pillar of Modern Android Development. It is a suite of over 100 libraries, tools and guidance to help developers follow best practices, reduce boilerplate code, and write code that works consistently across Android versions and devices so that you can focus on building unique features for your app. The majority of apps on Google Play rely on Jetpack, in fact over 90% of the top 1000 apps use Jetpack.

Below we’ll cover highlights of recent updates in three major areas of Jetpack:

  • Architecture Libraries and Guidance
  • Performance Optimization of Applications
  • User Interface Libraries and Guidance

And then conclude with some additional key updates.


1. Architecture Libraries and Guidance

App architecture libraries and components ensure that apps are robust, testable, and maintainable.

Data Persistence

Most applications need to persist local state - whether it be caching results, managing local lists of user enter data, or powering data returned in the UI. Room is the recommended data persistence layer which provides an abstraction layer over SQLite, allowing for increased usability and safety over the platform.

In Room, we have added many brand-new features, such as the Upsert operation, which attempts to insert an entity when there is no uniqueness conflict or update the entity if there is a conflict, and support for using Kotlin value classes for KSP. These new features are available in Room 2.6-alpha with all library sources written in Kotlin and supports both the Java programming language and Kotlin code generation.

Managing tasks with WorkManager

The WorkManager library makes it easy to schedule deferrable, asynchronous tasks that must be run reliably for instance uploading backups or analytics. These APIs let you create a task and hand it off to WorkManager to run when the work constraints are met.

Now, WorkManager allows you to update a WorkRequest after you have already enqueued it. This is often necessary in larger apps that frequently change constraints or need to update their workers on the fly. As of WorkManager 2.8.0, the updateWork() API is the means of doing this without having to go through the process of manually canceling and enqueuing a new WorkRequest. This greatly simplifies the development process.

DataStore

The DataStore library is a robust data storage solution that addresses issues with SharedPreferences and provides a modern coroutines based API.

In DataStore 1.1 alpha we added a widely requested feature: multi-process support which allows you to access the DataStore from multiple processes while providing data consistency guarantees between them. Additional features include a new storage interface that enables the underlying storage mechanism for Datastore to be switched out (we have provided implementations for java.io and okio), and we have also added support for Kotlin Multiplatform.

Lifecycle management

Lifecycle-aware components perform actions in response to a change in the lifecycle status of another component, such as activities and fragments. These components help you produce better-organized, and often lighter-weight code, that is easier to maintain.

We released a stable version of Lifecycle 2.6.0 that includes more Compose integration. We added a new extension method on Flow, collectAsStateWithLifecycle(), that collects from flows and represents its latest value as Compose State in a lifecycle-aware manner. Additionally, a large number of classes are converted to Kotlin and still retain their binary compatibility with previous versions.

Predictive Back Gesture

moving image illustrating predictive back texture

In Android 13, we introduced a predictive back gesture for Android devices such as phones, large screens, and foldables. It is part of a multi-year release; when fully implemented, this feature will let users preview the destination or other result of a back gesture before fully completing it, allowing them to decide whether to continue or stay in the current view.

The Activity APIs for Predictive Back for Android are stable and we have updated the best practices for using the supported system back callbacks; BackHandler (for Compose), OnBackPressedCallback, or OnBackInvokedCallback. We are excited to see Google apps adopt Predictive Back including PlayStore, Calendar, News, and TV!

In the Activity 1.8 alpha releases, The OnBackPressedCallback class now contains new Predictive Back progress callbacks for handling the back gesture starting, progress throughout the gesture, and the back gesture being canceled in addition to the previous handleOnBackPressed() callback for when the back gesture is committed. We also added ComponentActivity.setUpEdgeToEdge() to easily set up the edge-to-edge display in a backward-compatible manner.

Activity updates for more consistent Photo Picker experience

The Android photo picker is a browsable interface that presents the user with their media library. In Activity 1.7.0, the Photo Picker activity contracts have been updated to contain an additional fallback that allows OEMs and system apps, such as Google Play services, to provide a consistent Photo Picker experience on a wider range of Android devices and API levels by implementing the fallback action. Read more in the Photo Picker Everywhere blog.

Incremental Data Fetching

The Paging library allows you to load and display small chunks of data to improve network and system resource consumption. App data can be loaded gradually and gracefully within RecyclerViews or Compose lazy lists.

In Paging Compose 1.0.0-alpha19, there is support for all lazy layouts including custom layouts provided by the Wear and TV libraries. To support more lazy layouts, Paging Compose now provides slightly lower level extension methods on LazyPagingItems in itemKey and itemContentType. These APIs focus on helping you implement the key and contentType parameters to the standard items APIs that already exist for LazyColumnLazyVerticalGrid as well as their equivalents in APIs like HorizontalPager. While these changes do make the LazyColumn and LazyRow examples a few lines longer, it provides consistency across all lazy layouts.


2. Performance Optimization of Applications

Using performance libraries allows you to build performant apps and identify optimizations to maintain high performance, resulting in better end-user experiences.

Improving Start-up Times

Baseline Profiles allow you to partially compile your app at install time to improve runtime and launch performance, and are getting big improvements in new tooling and libraries:

Jetpack provides a new Baseline Profile Gradle Plugin in alpha, which supports AGP 8.0+, and can be easily added to your project in Studio Hedgehog (now in canary). The plugin lets you automate the task of running generation tasks, and pulling profiles from the device and integrating them into your build either periodically, or as part of your release process.

The plugin also allows you to easily automate the new Dex Layout Optimization feature in AGP 8.1, which lets you define BaselineProfileRule tests that collect classes used during startup, and move them to the primary dex file in a multidex app to increase locality. In a large app, this can improve cold startup time by 30% on top of Baseline Profiles!

Macrobenchmark 1.2 has shipped a lot of new features in alpha, such as Power metrics and Custom trace metrics, generation of Baseline Profiles without root on Android 13, and recompilation without clearing app data on Android 14.

You can read everything in depth in the blog "What's new in Android Performance".


3. User Interface Libraries and Guidance

Several changes have been made to our UI libraries to provide better support for large-screen compatibility, foldables, and emojis.

Jetpack Compose

Jetpack Compose, Android’s modern toolkit for building native UI, recently had its May 2023 release which includes new features for text and layouts, continued performance improvements, enhanced tooling support, increased support for large screens, and updated guidance. You can read more in the What’s New in Jetpack Compose I/O blog to learn more.

Glance

The Glance library, now in 1.0-beta, lets you develop app widgets optimized for Android phone, tablet, and foldable homescreens using Jetpack Compose. The library gives you the latest Android widget improvements out of the box, using Kotlin and Compose.

Compose for TV

With the alpha release of the TV library, you can now build experiences for Android TV using components optimized for the living room experience. Compose for TV unlocks all the benefits of Jetpack Compose for your TV apps, allowing you to build apps with less code, easier maintenance and a modern Material 3 look straight out of the box. See the Compose for TV blog for details.

Material 3 for Compose

Material Design 3 is the next evolution of Material Design, enabling you to build expressive, spirited and personal apps. It is the recommended design system for Android apps and the 1.1 stable release brings exciting new features such as bottom sheets, date and time pickers, search bars, tooltips, and added more motion and interaction support. Read more in the release blog.

Understanding Window State

The new WindowManager library helps developers adapt their apps to support multi-window environments and new device form factors by providing a common API surface with support back to API level 14.

In 1.1.0-beta01, new features and capabilities have been added to activity embedding and window layout that enables you to optimize your multi-activity apps for large screens. With the 1.1 release of Jetpack WindowManager, activity embedding APIs are no longer experimental and are recommended for multi-activity applications to provide improved large screen layouts. Check out the What’s new in WindowManager 1.1.0-beta01 blog for details and migration steps.


Other key updates

Kotlin Multiplatform

We continue to experiment with using Kotlin Multiplatform to share business logic between Android and iOS. The Collections 1.3.0-alpha03 and DataStore 1.1.0-alpha02 have been updated so you can now use these libraries in KMM projects. If you are using Kotlin Multiplatform in your app, we would like your feedback!

This was a look at all the changes in Jetpack over the past few months to help you build apps more productively. For more details on each Jetpack library, check out the AndroidX release notes, quickly find relevant libraries with the API picker and watch the Google I/O talks for additional highlights.

Java is a trademark or registered trademark of Oracle and/or its affiliates.