Category Archives: Android Developers Blog

An Open Handset Alliance Project

Announcing Cross device SDK Developer Preview for building rich multi-device experiences on Android

Posted by Alex Rocha - Developer Relations Engineer Manager, Ryan Ausanka-Crues - Eng Manager, Multi-device development, Stella Loh - Product Manager, Multi-device development

Today we’re launching our Developer Preview of the new Cross device SDK for Android. First announced during the Google I/O ‘22 Multi-device development session, our Cross device SDK allows developers to build rich multi-device experiences with a simple and intuitive set of APIs. This SDK abstracts away the intricacies involved with working with device discovery, authentication, and connection protocols, allowing you to focus on what matters most—building delightful user experiences and connecting these experiences across a variety of form factors and platforms.

What’s in Developer Preview

This initial release contains a set of rich APIs centered around the core functionality of Device discovery, Secure connections, and Multi-device Sessions.

  1. Device discovery: Easily find nearby devices, authorize peer-to-peer communication, and start the target application on receiving devices.
  2. Secure connections: Enable encrypted, low-latency bi-directional data sharing between authorized devices.
  3. Multi-device Sessions: Enable transferring or extending an application’s user experience across multiple devices.

In turn, this will allow you to build compelling cross-device experiences by enabling and simplifying the following use cases:

  • Discovering and authorizing communication with nearby devices.
  • Sharing an app’s current state with the same app on another device.
  • Starting the app on a secondary device without having to keep the app running in background.
  • Establishing secure connections for devices to communicate with each other.
  • Enabling task handoff where the user starts a task on one device, and can easily continue on another device.

Starting today with a Developer Preview for Android phones and tablets, the Cross device SDK will be available later for other Android surfaces and non-Android OSs.

Under The Hood

The Cross device SDK provides a software abstraction layer that handles all aspects of cross-device connectivity, leveraging wireless technologies such as Bluetooth, Wi-Fi, and Ultra-wide band; our SDK does all the heavy-lifting under the hood, offering you a modular,connectivity-agnostic API that supports bi-directional communication between devices and is backward compatible to Android 8. In addition, apps will not have to declare or request Runtime Permissions for any of the underlying connectivity protocols used (such as BLUETOOTH_CONNECT, BLUETOOTH_SCAN, ACCESS_FINE_LOCATION, etc.), and the user can allow apps to connect to only the device(s) they selected.

Getting started with Developer Preview

Head over to our developer guide to get started and try out the Developer Preview of the Cross device SDK for Android. Make sure to check out our Rock Paper Scissor sample app (Kotlin and Java) on GitHub for a demonstration on how to work with the various APIs and our Google I/O ‘22 Multi-device development session for a general overview of the SDK.

Feedback

We’d love to hear from you during this initial Developer Preview launch to help us shape the SDK and influence future roadmapping, so please share your feedback and let us know your experience with the SDK!

Wear OS Tiles Material Library: Build Tiles, Fast.

Posted by Anna Bernbaum, Product Manager, Ataul Munim, Developer Relations Engineer

We are excited to announce the launch of the Tiles Material library! Now, instead of building buttons, progress arcs and more from scratch, you can use our pre-built Material components and layouts to create tiles that embrace the latest Material design for Wear OS. You can use these together with the Tiles Design Kit to easily follow the Tiles Design Guidelines.

Tiles provide Wear OS users glanceable access to the information and actions they need in order to get things done quickly. They also are one of the most used surfaces on Wear OS. Just one swipe away from the watch face, users can quickly access the most important information or actions from an app, like starting a timer or getting the latest weather forecast.

animation showing the tiles experience on Wear OS. User swipes left from the watch face to see the first tile, and continues swiping to see others, including a fitness tile with buttons to initiate a workout, a music tile with chips to navigate to playlists, an alarm tile showing an upcoming alarm, among others.
Tiles carousel on Wear OS

We have built the following components for elements commonly used in tiles:
common tile components. a round icon with a pencil labelled "button". a full width rectangle with rounded corners and text labelled "chip". similar components, one larger and one smaller, labelled "title chip" and "compact chip" respectively. a circle path filled 75% clockwise labelled "circular progress indicator" and finally text labelled "text with recommended typography pre-set"

These components also make it faster to build tiles. For example, creating a button for your tile takes just a few lines of code:

val clickable: Clickable = generateClickable()

val button: Button = Button.Builder(this, clickable)
    .setIconContent("icon_exercise")

    .setContentDescription("Start workout")

    .build()



We have also created some predefined layouts to kickstart your tiles development. These already follow our design guidelines on how your tile layout should be formatted.
A calendar event tile with vertically stacked text details with an "open" action at the bottom, a weather tile showing a cloud icon, the current temperature and the day's high and low in a single row, a step counter tile with a progress indicator encircling the content and a timer tile with 5 buttons for different durations.

For example, we can build this tile using a predefined layout:
Tile with a PrimaryLayout, showing "Primary label text" at the top and "Action" as the primary chip at the bottom. The content slot is a MultiButtonLayout with 2 round icons , each with the plus sign.

val theme = Colors(

    /*primary=*/ 0xFFD0BCFF.toInt(), /*onPrimary=*/ 0xFF381E72.toInt(),

    /*surface=*/ 0xFF202124.toInt(), /*onSurface=*/ 0xFFFFFFFF.toInt()

)

val buttonColors = ButtonColors.secondaryButtonColors(theme)

val chipColors = ChipColors.primaryChipColors(theme)

val timeline = Timeline.fromLayoutElement(
    PrimaryLayout.Builder(deviceParameters)

        .setPrimaryLabelTextContent(

            Text.Builder(this, "1 run this week")

                .setTypography(Typography.TYPOGRAPHY_CAPTION1)

                .setColor(argb(theme.primary))

                .build()

        )

        .setContent(

            MultiButtonLayout.Builder()

                .addButtonContent(

                    Button.Builder(this, clickable)

                        .setIconContent("icon_run")

                        .setButtonColors(buttonColors)

                        .setContentDescription("Run")

                        .build()

                )

                .addButtonContent(

                    Button.Builder(this, clickable)

                        .setIconContent("icon_yoga")

                        .setButtonColors(buttonColors)

                        .setContentDescription("Yoga")

                        .build()

                )
                .addButtonContent(

                    Button.Builder(this, clickable)

                        .setIconContent("icon_cycle")

                        .setButtonColors(buttonColors)

                        .setContentDescription("Cycle")

                        .build()

                )

                .build()

        )

        .setPrimaryChipContent(

            CompactChip.Builder(this, "More", clickable, deviceParameters)

                .setChipColors(chipColors)

                .build()

        )

        .build()

)


What's in the library

This library contains components and layouts that are in-line with Material guidelines and easy to use. The included components are:
  • Button - clickable, circular-shaped object, with either icon, text or image with three predefined sizes.
  • Chip - clickable, stadium-shaped object that can contain an icon, primary and secondary labels, and has fixed height and customizable width.
  • CompactChip & TitleChip - two variations of the standard Chip that have smaller and larger heights, respectively, and can contain one line of text.
  • CircularProgressIndicator - colored arc around the edge of the screen with the given start and end angles, which can describe a full or partial circle with the full progress arc behind it.
  • Text - styled text which uses the recommended Wear Material typography styles.
All these components have their own colors object that can be built with the main Colors class to easily apply the same theme over all components. In addition to colors, there is a Typography class to easily get FontStyle objects using the typography name.

In addition to components, there are recommended tile layouts:
  • PrimaryLayout - a layout which can be customized by adding primary or secondary labels, content in the middle, and a primary chip at the bottom. The main content within this layout could be added as a MultiSlotLayout or MultiButtonLayout object.
  • EdgeContentLayout - a layout for hosting CircularProgressIndicator around the edge with main content inside and primary or secondary label around it.
  • MultiButtonLayout - a layout that can contain between 1 - 7 buttons, arranged in line with the Material guidelines depending on their number.
  • MultiSlotLayout - a row-like style layout with horizontally aligned and spaced slots (for icons or other small content).
All layouts have recommended padding and styles applied that are within Material guidelines.


Tools for tiles

Android Studio Dolphin includes the Direct Surface Launch feature. This lets developers install and launch a tile directly from Android Studio, instead of having to manually add it from the tile selector on the target device. Get started with Direct Surface Launch by creating a new Run Configuration and selecting Wear OS Tile, then choosing the module and TileService class.

Horologist Tiles is also recommended to save time during tile development. This library gives you the ability to preview a tile UI straight from Android Studio, making the write-test loop a lot shorter. Horologist Tiles also includes Kotlin friendly abstractions, like CoroutinesTileService so you can use what you're already familiar with.


Get started with Tiles Material

For a quick start, take a look at the new Tiles codelab, the code sample and the docs.

Please share your feedback on the issue tracker and let us know what you think of Tiles Material!









CameraX 1.2 is now in Beta

Posted by Donovan McMurray, CameraX Developer Relations Engineer

As part of Android Jetpack, the CameraX library makes complex camera functionality available in an easy-to-use API, helping you create a best-in-class experience that works consistently across Android versions and devices. As of today, CameraX version 1.2 is officially in Beta. Update from version 1.1 to take advantage of the latest game-changing features: our new ML Kit integration, which can reduce your boilerplate code when using ML Kit in a CameraX app, and Zero-Shutter Lag, which enables faster action shots than were previously possible.

These two advanced features are simple to implement with CameraX 1.2, so let’s take a look at each of them in depth.

ML Kit Integration

Google’s ML Kit provides several on-device vision APIs for detecting faces, barcodes, text, objects, and more. We’re making it easier to integrate these APIs with CameraX. Version 1.2 introduces MlKitAnalyzer, an implementation of ImageAnalysis.Analyzer that handles much of the ML Kit setup for you.


You can use MlKitAnalyzer with both cameraController and cameraProvider workflows. If you use the cameraController.setImageAnalysisAnalyzer() method, then CameraX can also handle the coordinates transformation between the ML Kit output and your PreviewView.

Here’s a code snippet using setImageAnalysisAnalyzer() to set a BarcodeScanner on a cameraController to detect QR codes. CameraX automatically handles the coordinate transformations when you pass COORDINATE_SYSTEM_VIEW_REFERENCED into the MlKitAnalyzer. (Use COORDINATE_SYSTEM_ORIGINAL to prevent CameraX from applying any coordinate transformations.)

val options = BarcodeScannerOptions.Builder()

  .setBarcodeFormats(Barcode.FORMAT_QR_CODE)

  .build()

val barcodeScanner = BarcodeScanning.getClient(options)


cameraController.setImageAnalysisAnalyzer(

  executor,

  new MlKitAnalyzer(List.of(barcodeScanner),

    COORDINATE_SYSTEM_VIEW_REFERENCED,

    executor, result -> {

      // The value of result.getResult(barcodeScanner)

      // can be used directly for drawing UI overlay.

    }

  )

)



Zero-Shutter Lag

Have you ever lined up the perfect photo, but when you click the shutter button the lag causes you to miss the best moment? CameraX 1.2 offers a solution to this problem by introducing Zero-Shutter Lag.

Prior to CameraX 1.2, you could optimize for quality (CAPTURE_MODE_MAXIMIZE_QUALITY) or efficiency (CAPTURE_MODE_MINIMIZE_LATENCY) when calling ImageCapture.Builder.setCaptureMode(). CameraX 1.2 adds a new value (CAPTURE_MODE_ZERO_SHOT_LAG) that reduces latency even further than CAPTURE_MODE_MINIMIZE_LATENCY. Note: for devices that cannot support Zero-Shutter Lag, CameraX will fallback to CAPTURE_MODE_MINIMIZE_LATENCY.

We accomplish this by using a circular buffer of photos. On image capture, we go back in time in the circular buffer to get the frame closest to the actual press of the shutter button. No DeLorean needed. Great Scott!

Here’s an example of how this works in a CameraX app with Preview and ImageCapture use cases:


  1. Just like any other app with a Preview use case, CameraX sends images from the camera to the UI for the user to see.
  2. With Zero-Shutter Lag, CameraX also sends images to a circular buffer which holds multiple recent images.
  3. When the user presses the shutter button, there is inevitably some lag in sending the current camera image to your app. For this reason, Zero-Shutter Lag goes to the circular buffer to fetch an image.
  4. CameraX finds the photo in the circular buffer closest to the actual time when the user pressed the shutter button, and returns that photo to your app.
There are a few limitations to keep in mind with Zero-Shutter Lag. First, please be mindful that this is still an experimental feature. Second, since keeping a circular buffer of images is computationally intensive, you cannot use CAPTURE_MODE_ZERO_SHOT_LAG while using VideoCapture or extensions. Third, the circular buffer will increase the memory footprint of your app.


Next steps


Check our full release notes for CameraX 1.2 for more details on the features described here and more! If you’re ready to try out CameraX 1.2, update your project’s CameraX dependency to 1.2.0-beta01 (or the latest version at the time you’re reading this).

If you would like to provide feedback on any of these features or CameraX in general, please create a CameraX issue. As always, you can also reach out on our CameraX Discussion Group.

Google Play Coffee break with iMumz | From start-up to scale-up

Posted by Tamzin Taylor, Head of Google Play Partnerships, Western Europe

Today I’m excited to announce that we are launching the second episode of Google Play Coffee breaks. In this episode I enjoyed a virtual coffee with Ravi Teja Akondi, co-founder and CEO of iMumz. iMumz caters to expecting and new parents to help them practice wellbeing and mindfulness during the early stages of parenthood. Ravi and his team recently graduated from Appscale Academy, an initiative aimed at supporting promising Indian app start-ups and helping them grow into global businesses. It’s great to see their continued growth and to hear them share tips and learnings they picked up along the way.

Watch the full Coffee breaks episode and get my take on it below:



The team at iMumz created their app with the mission to help expecting and new parents easily follow a healthy lifestyle every day, encouraging them to practice mindfulness daily. The app provides support to parents focusing on well-being during the first 1,000 days of pregnancy; that is 270 days of pregnancy and the first two years of parenthood. Today, the app helps over 600,000 people achieve these goals.

Ravi recalled how in the early days the iMumz team sent out actionable insights to their audience via a messenger app. They started by customizing small daily routines for those seeking to learn more about wellness during pregnancy and parenthood. By tracking the completion rates and retention rates, the team were able to see that they were really creating something valuable and gained the confidence to take the business from a messaging service to a full mobile application.

Growing a sustainable business

The first step for the iMumz team was to work on building out a community of early adopters. After conducting initial market research the team realized those in tier one cities - the metro cities in India - were the most likely to become early adopters. As they expanded to more and more parents, they learnt how important it was to tailor their pricing to different types of audiences. Experimentation was key to understanding what their different audiences were willing to pay. Remember that beyond the really useful data you can gather from running experiments, you can also get incredibly valuable direct and written feedback from users by inviting them into closed testing groups you can easily set up in the Play Console, without this feedback impacting your star rating.

Nurturing your app community

Through experimenting and listening to users, iMumz learnt that parents-to-be wanted to connect with others like them, and the team quickly realized that the people using their app needed a community. People wanted to connect with others going through similar life events. By building out community spaces the team was able to help initiate discussions on specific topics; such as breastfeeding, baby-led weaning, and self care postpartum. The community has since helped important conversations develop naturally, and provides iMumz users with another level of peer support. Today, their community is vibrant, with more than 5,000 conversations taking place every day!

When it comes to building out a community it’s important that your messaging to users feels genuine and authentic. This was especially important for iMumz, given the app caters to a sensitive and important set of life moments for parents. To start, as with any message, making message content relevant and timely is critical. For example, consider the time of day when determining the best time to post new content, updates, or sending push notifications, and remember different time zones when you’re dealing with a global audience. Additionally, it can help to put a relatable person or character behind the message (remember to localize this to your audience though).

Ravi also shared two key learnings he felt made the biggest difference to the growth of his app:

1) Experiment. There are so many ideas you might find counterintuitive - don’t automatically discount any or jump to conclusions until you test them. Be data driven. That's going to help you provide more value, faster.

2) Narrow down what you’re working on, so you focus on one task or challenge at a time. You might be tempted to do many things at once, but narrowing down will help give you amplified results.

To where does the future lead? 

Moving forward, the team at iMumz plan to stay focused on their mission; making the future generation healthier, happier, and more intelligent. They also have global aspirations and they plan to launch across a few selected geographies soon, launching localized versions of the app.

It was such a pleasure to speak to Ravi about his experiences and I can’t wait to see iMumz’s continued growth and next steps. I get so much inspiration from speaking with the people behind apps like iMumz, and I know that inspires my team to continue investing in and developing initiatives such as Appscale Academy.

We are looking forward to continuing to learn from more businesses, and see what you all do next. Stay tuned for the next episode of Coffee Breaks.

  • Tamzin Taylor, Head of Play Partnerships, Western Europe
Do you have any questions for iMumz? What are your own tips for other app or game businesses? Let us know on Twitter.


Monitor all your deep links in one place on this new Play Console page

Posted by Yaift Becher, Product Manager, Google Play and Luís Dorelli, Engineer, Google Play

Deep links are a great way to improve engagement with your in-app content and the overall user experience by accepting traffic from external sources, including the web. Keeping your deep links in good shape, however, can be a challenge, so many apps have partial, broken, or no deep links configured. For some developers, even answering basic questions like “is this URL deep-linked?” or “why is this deep link not working?” can be difficult to answer.

That’s why we’re making it easier for you to keep your deep links in good shape with a new, dedicated Play Console page. This page collects all the information and tools related to your app’s deep links in one convenient place, giving you a quick but comprehensive snapshot of your current setup to help you identify and troubleshoot issues at a glance.

See a comprehensive snapshot of your deep links so you can easily identify and troubleshoot issues.

On the new deep links page, you’ll find a quick summary of possible issues with your app’s deep links and the steps to take to fix them. The page also lists all web domains your app is configured to accept traffic from, as well as information about the user experience from those domains. In cases where the user experience could be improved, you’ll see step-by-step guidance on how to fix the issue, showing you exactly what’s missing from your app or website association with code snippets to make sure you get it right.

Get step-by-step guidance on how to fix issues with your deep links.

Lastly, the new deep links page offers a full drill-down of your deep links app configuration, listing details of all intent filters and the sources they are configured to receive traffic from. Again, you can see if each line item is properly configured, and if not, get specific instructions about how to fix it.

We’re very excited to share this first release of the deep links page with you, making it much easier to make sense of your setup and fix broken deep links. The next release, coming later this year, will also highlight important website URLs that aren’t yet configured as deep links, so that you don’t miss an opportunity to drive more quality traffic to your app.

Check out the new deep links page today to see the status of your deep links and fix any setup issues.

How useful did you find this blog post?




#WeArePlay | Meet George from the UK. More stories from Croatia, USA and Kenya.

Posted by Leticia Lago, Developer Marketing

Our celebration of app and game businesses continues with more #WeArePlay stories. Today, we’re starting with George from Bristol, UK - a young entrepreneur taking the streetwear industry by storm.

After spending hours and hours searching for the latest styles in sneakers and streetwear, George realised there’s a market in helping fellow enthusiasts find the latest drops. At just 16 years old, he took it upon himself to learn to code and created his app, Droplist. It points people to upcoming special collections from major labels around the world. Find out more about his story.

Today we also spotlight few more stories from around the world:
  • Anica and Kristijan from an island in Croatia - founders of Dub Studio Productions to help music lovers around the global turn up the bass or lower the treble on their favourite songs.


  • Robert from Wyoming, founder of Bluebird Languages - language learning apps with over 6 million hours of audio lessons spanning 164 languages, from Hungarian to Haitian Creole.

  • And one more new story - because why not! This time, featuring Annabel from Kenya. After struggling to find a mechanic when stuck on the roadside in Nairobi, she and her co-founder created Ziada to help people find local service providers.

Check out all the stories now at g.co/play/weareplay and stay tuned for even more coming soon.

How useful did you find this blog post?

Celebrating 5 years of Kotlin on Android

Posted by Márton Braun, Developer Relations Engineer

Five years ago, at the 2017 Google I/O Keynote, we did something we had never done before: we announced official support for a new programming language to build Android apps with: Kotlin. It was great to see how excited the Android developer community was about this announcement.


Since then, JetBrains and Google have been collaborating around the development of Kotlin, and the Kotlin Foundation was co-founded by the two companies.

As highlighted in those initial I/O announcements, Kotlin is interoperable, mature, production-ready, and open source. It also has outstanding IDE support, as JetBrains develops both the language and its tooling.

Now, five years have passed since the original announcement. To celebrate the amazing language that now powers modern Android app development, we’re taking a quick look at the journey of Kotlin on Android. This post includes quotes from a handful of people who were involved in making Kotlin on Android a success, who are joining us for this celebration.

Early years

The Kotlin adoption story started before official support from Google, within the Android developer community. The excitement in the community was one of the main reasons to invest in official support.
“The decision by Google to add support for Kotlin, I think we underestimate how wild of a notion that was at the time. The odds of another company that size making a similar decision based on community support and enthusiasm is very low.“ (Christina Lee, Android engineer at Pinterest, Kotlin and Android GDE)

After the 2017 announcement, Android Studio started shipping with built-in support for Kotlin. Lots of documentation and samples were updated to use Kotlin.

In 2018, we launched the Android KTX libraries, which provide Kotlin-friendly extensions wrapping the APIs of the Android framework and several AndroidX libraries. Tooling improved further, too, with Kotlin-specific live templates, lint checks, and optimizations in R8 and ART. The reference documentation for Android was also published in Kotlin for the first time.


Going Kotlin-first

At Google I/O 2019, we committed to Kotlin-first Android development, further increasing our investments in the language.
“If you look at a Kotlin new users graph, you immediately notice the two most significant spikes – one in May 2017 and another in May 2019. We have an inside joke about it: ‘Marketing a programming language is easy. All you have to do is make the largest operating system in the world call it an official language during the annual keynote’” (Egor Tolstoy, Kotlin Product Lead at JetBrains)

Being Kotlin-first means that we now design our documentation, samples, training content, new libraries and tools for the Kotlin language first, while still supporting users of the Java programming language.

”Now when we want to start a Jetpack Library, we are writing it in Kotlin unless we have a very, very, very good reason not to do that. It’s clear that Kotlin is the first-class language.” (Yigit Boyar, early proponent of Kotlin within Google, currently leading the development of a handful of Jetpack libraries)


Some examples of Kotlin-first Jetpack libraries are Paging 3 and DataStore, which are both powered by coroutines and Flows for asynchronous operations.


Jetpack Compose, Android’s modern UI toolkit is our greatest commitment to Kotlin so far, as it’s Kotlin-only. It’s powered by a Kotlin compiler plugin, and it makes extensive use of advanced language features like coroutines, top-level functions, and trailing lambdas.

“Kotlin is here to stay and Compose is our bet for the future. Right now, for developers that are starting to learn Android, we’re already recommending the Android Basics with Compose course.” (Florina Muntenescu, Jetpack Compose developer relations lead)


Kotlin beyond Android

Even though Kotlin is a great fit for Android, it’s a general-purpose language and not solely for use on Android. For teams within Google, Kotlin is now generally available to use for both Android and server-side projects. Thousands of Google engineers are writing Kotlin code, and our internal codebase contains more than 8.5 million lines of Kotlin code to date. This number has been increasing rapidly as well, doubling year over year.
“We’ve been working to bring Kotlin to Google engineers for the last few years by adding Kotlin support to all the tools they use. This includes the build system, static analysis tools, libraries and APIs. We’ve talked a lot about encouraging developers to use Kotlin for Android app development, and we strongly encourage using Kotlin for server-side development as well.” (Kevin Bierhoff, lead of the Kotlin at Google team, which supports Google engineers writing Kotlin code)

gRPC Kotlin and Kotlin for protocol buffers are examples of Kotlin projects Google uses both in Android apps and on servers that have been open sourced and are now receiving community adoption and contributions. Kotlin is also supported on Google Cloud.


Collaboration with JetBrains

There is close collaboration between JetBrains and Google around the development of Kotlin. The Kotlin Foundation was co-founded by the two companies, and it ensures that the language and ecosystem age well.

Google engineers have also been working on improving the compiler and on creating important tooling for the language.
“My team is helping JetBrains with rewriting the Kotlin compiler right now, and we also work on Kotlin Symbol Processing, which is the first compiler-related Kotlin project that’s been completely done at Google. We work more closely with JetBrains than some other parts of Google." (Jeffrey van Gogh, member of the Kotlin Foundation, lead of the Kotlin engineering team at Google)

JetBrains and Google also coordinate new releases of the language and the accompanying tooling so that developers are able to use the latest releases as smoothly as possible.
“The collaboration gets stronger over time, and I’m really excited to see its impact on Kotlin’s future. Our coordinated pre-release checks are getting better and better." (Liliia Abdulina, Kotlin QA team lead at JetBrains)


Learn more and share your own stories

You can read more stories about Kotlin from our interviewees in the accompanying Medium post. We’d also love to hear your stories of learning and adopting Kotlin for Android development! Share them on social media using the hashtag #Hi5KotlinOnAndroid!

Finally, let’s appreciate these kind words about Kotlin’s accomplishments to conclude our story.

“Technology can really change people's lives and it can really make people happier at work. We normally focus on ‘there's null safety’ or ‘there's type inference’ or all these other technical parts. But when you take a step back, there's a whole story in there about all of the people who had their passion for coding ignited or reignited because Kotlin is such a wonderful language. It's just so impressive that the team is able to do what they're able to do and that the community is as good as it is." (Christina Lee, Android engineer at Pinterest, GDE for Android and Kotlin)

Have a nice Kotlin on Android!

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

Android 13 is in AOSP!

Posted by Seang Chau, VP of Engineering
Today we’re pushing the Android 13 source to the Android Open Source Project (AOSP) and officially releasing the newest version of Android. For developers, Android 13 is focused on our core themes of privacy and security as well as developer productivity, making it easier for you to build great experiences for users. We’ve also continued to make Android an even better OS for tablets and large screens, giving you better tools to take advantage of the 270+ million of these devices in use across the world. 

Android 13 is rolling out to Pixel devices starting today. Later this year, Android 13 will also roll out to more of your favorite devices from Samsung Galaxy, Asus, HMD (Nokia phones), iQOO, Motorola, OnePlus, Oppo, Realme, Sharp, Sony, Tecno, vivo, Xiaomi and more.

As always, we thank you for the feedback you’ve shared, and we appreciate the work you’ve done to make your apps compatible with today’s release. Your support and contributions are what make Android a great platform for everyone!


What’s in Android 13 for developers?

Here’s a look at some of what’s new in Android 13 - make sure to check out the Android 13 developer site for details on all of the new features.


Developer productivity and tools

Themed app icons - Android 13 extends Material You dynamic color to all app icons, letting users opt-in to icons that inherit the tint of their wallpaper and other theme preferences. All your app needs to supply is a monochromatic app icon and a tweak to the adaptive icon XML. More here.

Themed app icons adapting to wallpapers colors and dark theme (left).

Per-app language preferences - Android 13 makes it easier to support multilingual users who want to use your apps in a language that’s different from the system language. Android now provides a standard “App language” Settings panel for apps that have opted-in, and you can call a new platform API to get or set the user’s preferred locale at runtime, helping to reduce boilerplate code and improve compatibility. More here.

Per-app languages in Settings

Improved text support - Android 13 includes text and language improvements that help you deliver a more polished experience. Faster hyphenation optimizes hyphenation performance by as much as 200% so you can now enable it in your TextViews with almost no impact on rendering performance. Text conversion APIs make searching and autocompletion faster when using phonetic lettering input for languages like Japanese, Chinese, and others. Android 13 also improves line heights for non-latin scripts (such as Tamil, Burmese, Telugu, and Tibetan), eliminating clipping and making them easier to read. More here.

Improved line height for non-Latin scripts in apps targeting Android 13 (bottom).

Color vector fonts - Android 13 adds rendering support for COLR version 1 (spec, intro video) fonts and updates the system emoji to the COLRv1 format. COLRv1 is a new, highly compact, font format that renders quickly and crisply at any size. For most apps this will just work, and the system handles everything. More here.

COLRv1 vector emoji (left) and bitmap emoji.

Quick Settings Placement API - For apps that provide custom Quick Settings tiles, Android 13 makes it easier for users to discover and add your tiles. Using a new tile placement API, your app can now prompt the user to directly add your custom Quick Settings tile in a single step, without leaving your app. More here.

Programmable shaders - Android 13 introduces programmable RuntimeShader objects, with behavior defined using the Android Graphics Shading Language (AGSL). You can use these shaders to create ripple, blur, stretch, and similar advanced effects in your apps. More here.

Media controls derived from PlaybackState - For apps targeting Android 13, the system now derives media controls from PlaybackState actions, providing a richer set of controls that are consistent across phones and tablet devices and align with other Android platforms such as Android Auto and Android TV. More here.

Android 13 media controls are consistent on phones and tablets.

Bluetooth LE Audio - Low Energy (LE) Audio is the next-generation wireless audio built to enable new use cases like sharing and broadcasting audio to friends and family, or subscribing to public broadcasts for information, entertainment, or accessibility. It’s designed to ensure that users can receive high fidelity audio without sacrificing battery life, and lets them seamlessly switch between different use cases. Android 13 adds built-in support for LE Audio, so developers can use the new capabilities on compatible devices. More here.

MIDI 2.0 - Android 13 adds support for the new MIDI 2.0 standard, including the ability to connect MIDI 2.0 hardware through USB. This updated standard offers features such as increased resolution for controllers, better support for non-Western intonation, and more expressive performance using per-note controllers. More here.

OpenJDK 11 updates - Android 13 Core Libraries now align with the OpenJDK 11 LTS release, with both library updates and Java 11 programming language support for app and platform developers. We plan to bring these Core Library changes to more devices through Google Play system updates, as part of an ART module update for devices running Android 12 and higher. More here.

Predictive back gesture - Android 13 introduces new APIs that let your app tell the system that it will handle back events in advance, a practice we call the "ahead-of-time" model. This new approach is part of a multi-year effort to help you prepare your app to support the predictive back gesture, which is available for testing in this release through a developer option. More here.

Built for tablets

Android 13 extends the 12L update that we released earlier this year, and it delivers an even better experience on tablets. You’ll find features like an enhanced multitasking taskbar, more large-screen layouts and optimizations in system UI and apps, improved compatibility modes for apps, and more. We’re continuing to invest to give you the tools you need to build great experiences for tablets as well as Chromebooks and foldables. You can learn more about how to get started optimizing for large screens, and be sure to check out our large screens developer resources.

Multitasking on tablets with Android 13.

Privacy and security

Photo picker and APIs - A new system photo picker now gives users a standard, privacy-protecting way to share local and cloud-based photos. Photo picker extends Android’s long-standing document picker and makes it easy for users to share specific photos and videos with an app, without giving the app permission to view all media files on the device. Photo picker provides a dedicated experience for photos and videos and includes APIs for apps to access the shared media files. The photo picker experience is now available to users who receive Google Play system updates, on devices (excepting Go devices) running Android 11 and higher. More here.


Photo picker lets users share specific photos and videos with an app.

Notification permission - To help users focus on the notifications that are most important to them, Android 13 introduces a new notifications runtime permission. Apps now need to request the notification permission from the user before posting notifications. For apps targeting Android 12 or lower, the system will handle the upgrade flow on your behalf. More here.

Notification permission dialog in Android 13.

Nearby device permission for Wi-Fi - Android 13 introduces the NEARBY_WIFI_DEVICES runtime permission for apps that manage a device's connections to nearby access points over Wi-Fi. The new permission is required for many commonly-used Wi-Fi APIs and enables apps to discover and connect to nearby devices over Wi-Fi without also needing to acquire the location permission. More here.

Granular permissions for media file access - Photo picker is our recommended solution for user-friendly, permissionless sharing of photos and videos, but for apps that haven’t moved to photo picker yet or for audio use cases, Android 13 adds new granular media permissions. These new permissions replace the READ_EXTERNAL_STORAGE permission and provide access to specific types of media files, including images, video, or audio. We highly recommend moving your app to photo picker if possible; otherwise, use the granular media permissions when targeting Android 13. More here.
Requesting permission to access audio files.

Developer downgradable permissions - Starting in Android 13, apps that no longer require permissions previously granted by the user can use a new API to downgrade the permissions. By removing unused permissions, your app can show that it’s using the minimum permissions needed, which can improve user trust. More here.

Safer exported Intent filters - Android 13 applies stricter rules when delivering explicit intents to exported intent filters in another app that’s targeting Android 13. For intents that specify actions, the system now delivers the intents to the exported component only if the intent matches the receiver’s declared <intent-filter> elements. More here.


Performance for apps

Android 13 improves performance and efficiency for all apps through updates to the ART runtime. We plan to bring these improvements to more Android users through Google Play system updates, as part of our ongoing ART module updates for devices running Android 12 and higher.

Improved garbage collection - A new garbage collector based on the Linux kernel feature userfaultfd is coming to ART on Android 13 devices in an upcoming Google Play system update. The new garbage collector eliminates the read barrier and its fixed overhead per object loaded, reducing memory pressure and leading to as much as ~10% reduction in compiled code size. It’s more efficient at GC-time as well, since pages are freed as compaction progresses. Overall, the new garbage collector helps to save battery, avoid jank during GC operations, and protect apps from low-memory kills.

Optimizations throughout ART - In Android 13, ART makes switching to and from native code much faster, with JNI calls now up to 2.5x faster. We’ve also reworked the runtime’s reference processing to make it mostly non-blocking, which further reduces jank. We’ve exposed a new public API, Reference.refersTo(), which is useful in reclaiming unreachable objects sooner, and we’ve made the interpreter faster by optimizing class/method lookups. Lastly, ART now performs more byte-code verification at install time, avoiding the expense of verification at runtime and keeping app startup times fast. More here.


Get your apps ready!

Now with today’s public release of Android 13 to AOSP, we’re asking all Android developers to finish your compatibility testing and publish your updates as soon as possible, to give your users a smooth transition to Android 13.

To test your app for compatibility, just install it on a device running Android 13 and work through the app flows looking for any functional or UI issues. Review the Android 13 behavior changes for all apps first, to focus on areas where your current app could be affected. Here are some of the top changes to test:

  • Notifications runtime permission - Make sure you understand how this new permission works with your app’s notifications, and plan on targeting Android 13 (API 33) as soon as possible to help support users. More here.
  • Clipboard preview - Make sure your app hides sensitive data in Android 13’s new clipboard preview, such as passwords or credit card information. More here.
  • JobScheduler prefetch - JobScheduler now tries to anticipate the next time your app will be launched and will run any associated prefetch jobs ahead of that time. If you use prefetch jobs, test that they are working as expected. More here.
Remember to test the libraries and SDKs in your app for compatibility. If you find any SDK issues, try updating to the latest version of the SDK or reaching out to the developer for help.

Once you’ve published the compatible version of your current app, you can start the process to update your app's targetSdkVersion. Review the behavior changes for apps targeting Android 13 for this, and use the compatibility framework to help detect issues quickly.


Tablet and large-screens support

With Android 13 bringing a better experience to tablets, make sure your apps look their best. You can test large-screen features by setting up an Android emulator in Android Studio, or you can use a large screen device from our Android 13 Beta partners. Here are some areas to watch for:

  • Taskbar interaction - Check how your app responds when viewed with the new taskbar on large screens. Make sure your app's UI isn't cut off or blocked by the taskbar. More here.
  • Multi-window mode - Multi-window mode is now enabled by default for all apps, regardless of app configuration, so make sure the app handles split-screen appropriately. You can test by dragging and dropping your app into split-screen mode and adjusting the window size. More here.
  • Improved compatibility experience - if your app isn’t optimized for tablets yet, such as using a fixed orientation or not being resizable, check how your app responds to compatibility mode adjustments such as letterboxing. More here.
  • Media projection - If your app uses media projection, check how your app responds while playing back, streaming, or casting media on large screens. Be sure to account for device posture changes on foldable devices as well. More here.
  • Camera preview - For camera apps, check how your camera preview UI responds on large screens when your app is constrained to a portion of the screen in multi-window or split-screen mode. Also check how your app responds when a foldable device's posture changes. More here.
You can read more about the tablet features in Android 13 and what to test here.


What’s next?

Android 13 is rolling out to Pixel devices starting today.

If you’re currently enrolled in the Android Beta program, you’ll get the Android 13 final release and remain enrolled to receive ongoing Beta updates for Android 13 feature drops, starting later this year. If you’d like to opt out of ongoing Beta updates without needing to wipe your device, just visit the Android Beta site and opt out after you get the Android 13 final release and before taking the first beta for Android 13 feature drops.

System images for Pixel devices are available here for manual download and flash, and you can get the latest Android Emulator system images via the SDK Manager in Android Studio. If you're looking for the Android 13 source, you'll find it here in the Android Open Source Project repository under the Android 13 branches.

Thanks again for participating in our program of early previews and Betas! We're looking forward to seeing your apps on Android 13!


Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Build apps for the new Samsung devices

Posted by Diana Wong (Android Product Manager), Kseniia Shumelchyk (Developer Relations Engineer) and Sara Vickerman (Android Developer Marketing)

This week, Samsung launched the latest devices to come to the Android ecosystem at their Galaxy Unpacked event. If you haven’t already, check out their two new foldables, the Galaxy Z Fold4 and Z Flip4, and their new lineup of watches running on Wear OS, the Galaxy Watch5 series. You can learn more about their announcements here.

With the excitement around these new devices, there's never been a better time to invest in making sure your app has an amazing experience for users, on large screens or Wear OS! Here’s what you need to know to get started:

Get your apps ready for foldables, like the Galaxy Z Fold4 and Z Flip4

With their unique foldable experience, the Galaxy Z Flip4 and Z Fold4 are great examples of how Android devices come in all shapes and sizes. The Z Fold4 is the latest in large screen devices, a category that continues to see impressive growth. Active large screen users are approaching 270 million, making it a great time to optimize your apps for tablets, foldables and Chrome OS.

Last year, we launched Android 12L, a feature drop designed to make Android 12 even better on tablets and foldable devices, and Samsung’s Galaxy Z Fold4 will be the first device to run 12L out of the box! Android 12L includes UI updates tailor-made for large screens, improvements to the multitasking experience, and enhancements to compatibility mode so your app looks better out of the box. Since 12L, we also launched Android 13, which includes all these large screen updates and more.

Get started building for foldables by checking out the documentation. The Z Fold4 and Z Flip4 can be used in multiple different folded states, like Samsung’s “flex mode” where you can go hands-free when doing anything from watching a show to taking a photo. To get your app looking great however it’s folded, you can use the Jetpack WindowManager library to make your app fold aware and test your app on foldables. And finally, the large screen app quality guidelines is a comprehensive set of checklists to help make your app the best it can be across an ever expanding ecosystem of large screen devices.

Developers who put in this work are starting to see results; eBay increased their app rating to 4.7 stars on Google Play after optimizing for large screens. Chrome's multitasking usage increased 18x for large screens with 12L.


Build exceptional Wear OS apps

The Wear OS platform expanded this week with the new and improved Galaxy Watch5 series. This lineup of devices builds on Samsung’s commitment to the wearable platform, which we saw last year when they launched Wear OS Powered by Samsung on the Galaxy Watch4 series.

If you’re looking to get started building for the latest Galaxy Watch 5 series, or any other Wear OS device, now is a great time to check out version 1.0 of Compose for Wear OS. This is the first stable release of our modern declarative UI toolkit designed to make building apps for Wear OS easier, faster, and more intuitive. The toolkit brings the best of Jetpack Compose to Wear OS, accelerating the development process so you can create beautiful apps with fewer lines of code.

The 1.0 release streamlines UI development by following the declarative approach and offering powerful Kotlin syntax. It also provides a rich set of UI components optimized for the watch experience and is accompanied by many powerful tools in Android Studio to streamline UI iteration. That’s why Compose for Wear OS is our recommended approach for building user interfaces for Wear OS apps.

We’ve built a set of materials to help you get started with Compose for Wear OS! Check out our curated learning pathway for a step-by-step journey, documentation including a quick start guide, the Compose for Wear OS codelab for hands-on experience, and samples available on Github.

Similarly to Compose for Wear OS, we’re building Wear OS Tile Components to make it faster and easier to build tiles. Tiles provide Wear OS users glanceable access to the information and actions they need in order to get things done quickly and they are one of the most used features on Wear OS. This update brings material components and layouts so you can create Tiles that embrace the latest Material design for Wear OS. Right now this is in beta, but keep a lookout for the launch announcement!

Another launch announcement to watch out for is Android Studio Dolphin, the latest release from Android Studio. Check out these features designed to make wearable app development easier:
  • Updated Wear OS emulator toolbar which now includes buttons and gestures available on Wear OS devices, such as palm and tilting and simulating two physical buttons.
  • Emulator pairing assistant to pair multiple Wear OS devices with a single virtual or physical phone. Android Studio remembers pairings after being closed and allows you to see Wear devices in the Device Manager.
  • Direct surface launch that allows you to create run/debug configurations for Wear OS tiles, watch faces, and complications, and launch them directly from Android Studio.
Between Jetpack Compose, Tile Components and Android Studio Dolphin, we are simplifying Wear OS app development. And, with the addition of the Galaxy Watch5 series to the Wear OS ecosystem, there are even more reasons to build an exceptional Wear OS app.


There’s never been a better time to start optimizing!

Form factors are having a major moment this year and Google is committed to helping you optimize and build across form factors with new content and tools, including sessions and workshops from this year’s Google I/O and new Android Studio features. Plus, we have Material Design guidance for large screens and Wear OS to help you in your optimization journey.

From the Watch5 series to the Z Fold4, Samsung’s Galaxy Unpacked brought us innovations across screen sizes and types. Prepare your app so it looks great across the entire Android device ecosystem!

Build apps for the new Samsung devices

Posted by Diana Wong (Android Product Manager), Kseniia Shumelchyk (Developer Relations Engineer) and Sara Vickerman (Android Developer Marketing)

This week, Samsung launched the latest devices to come to the Android ecosystem at their Galaxy Unpacked event. If you haven’t already, check out their two new foldables, the Galaxy Z Fold4 and Z Flip4, and their new lineup of watches running on Wear OS, the Galaxy Watch5 series. You can learn more about their announcements here.

With the excitement around these new devices, there's never been a better time to invest in making sure your app has an amazing experience for users, on large screens or Wear OS! Here’s what you need to know to get started:

Get your apps ready for foldables, like the Galaxy Z Fold4 and Z Flip4

With their unique foldable experience, the Galaxy Z Flip4 and Z Fold4 are great examples of how Android devices come in all shapes and sizes. The Z Fold4 is the latest in large screen devices, a category that continues to see impressive growth. Active large screen users are approaching 270 million, making it a great time to optimize your apps for tablets, foldables and Chrome OS.

Last year, we launched Android 12L, a feature drop designed to make Android 12 even better on tablets and foldable devices, and Samsung’s Galaxy Z Fold4 will be the first device to run 12L out of the box! Android 12L includes UI updates tailor-made for large screens, improvements to the multitasking experience, and enhancements to compatibility mode so your app looks better out of the box. Since 12L, we also launched Android 13, which includes all these large screen updates and more.

Get started building for foldables by checking out the documentation. The Z Fold4 and Z Flip4 can be used in multiple different folded states, like Samsung’s “flex mode” where you can go hands-free when doing anything from watching a show to taking a photo. To get your app looking great however it’s folded, you can use the Jetpack WindowManager library to make your app fold aware and test your app on foldables. And finally, the large screen app quality guidelines is a comprehensive set of checklists to help make your app the best it can be across an ever expanding ecosystem of large screen devices.

Developers who put in this work are starting to see results; eBay increased their app rating to 4.7 stars on Google Play after optimizing for large screens. Chrome's multitasking usage increased 18x for large screens with 12L.


Build exceptional Wear OS apps

The Wear OS platform expanded this week with the new and improved Galaxy Watch5 series. This lineup of devices builds on Samsung’s commitment to the wearable platform, which we saw last year when they launched Wear OS Powered by Samsung on the Galaxy Watch4 series.

If you’re looking to get started building for the latest Galaxy Watch 5 series, or any other Wear OS device, now is a great time to check out version 1.0 of Compose for Wear OS. This is the first stable release of our modern declarative UI toolkit designed to make building apps for Wear OS easier, faster, and more intuitive. The toolkit brings the best of Jetpack Compose to Wear OS, accelerating the development process so you can create beautiful apps with fewer lines of code.

The 1.0 release streamlines UI development by following the declarative approach and offering powerful Kotlin syntax. It also provides a rich set of UI components optimized for the watch experience and is accompanied by many powerful tools in Android Studio to streamline UI iteration. That’s why Compose for Wear OS is our recommended approach for building user interfaces for Wear OS apps.

We’ve built a set of materials to help you get started with Compose for Wear OS! Check out our curated learning pathway for a step-by-step journey, documentation including a quick start guide, the Compose for Wear OS codelab for hands-on experience, and samples available on Github.

Similarly to Compose for Wear OS, we’re building Wear OS Tile Components to make it faster and easier to build tiles. Tiles provide Wear OS users glanceable access to the information and actions they need in order to get things done quickly and they are one of the most used features on Wear OS. This update brings material components and layouts so you can create Tiles that embrace the latest Material design for Wear OS. Right now this is in beta, but keep a lookout for the launch announcement!

Another launch announcement to watch out for is Android Studio Dolphin, the latest release from Android Studio. Check out these features designed to make wearable app development easier:
  • Updated Wear OS emulator toolbar which now includes buttons and gestures available on Wear OS devices, such as palm and tilting and simulating two physical buttons.
  • Emulator pairing assistant to pair multiple Wear OS devices with a single virtual or physical phone. Android Studio remembers pairings after being closed and allows you to see Wear devices in the Device Manager.
  • Direct surface launch that allows you to create run/debug configurations for Wear OS tiles, watch faces, and complications, and launch them directly from Android Studio.
Between Jetpack Compose, Tile Components and Android Studio Dolphin, we are simplifying Wear OS app development. And, with the addition of the Galaxy Watch5 series to the Wear OS ecosystem, there are even more reasons to build an exceptional Wear OS app.


There’s never been a better time to start optimizing!

Form factors are having a major moment this year and Google is committed to helping you optimize and build across form factors with new content and tools, including sessions and workshops from this year’s Google I/O and new Android Studio features. Plus, we have Material Design guidance for large screens and Wear OS to help you in your optimization journey.

From the Watch5 series to the Z Fold4, Samsung’s Galaxy Unpacked brought us innovations across screen sizes and types. Prepare your app so it looks great across the entire Android device ecosystem!