Category Archives: Android Developers Blog

An Open Handset Alliance Project

#AndroidDevJourney spotlight – February edition

Luli Perkins, Developer Relations Program Manager

Android Dev Journey February Header

Our second edition of #AndroidDevJourney is here! At the beginning of this year we launched the #AndroidDevJourney to share the stories of members of our community through our social platforms. Each Saturday, from January through June, we’ll feature a new developer on our Twitter account.

For a chance to be featured in our March spotlight series, tweet us your story using #AndroidDevJourney.

Andrew Kelly

Andrew Kelly

Tell me about your journey to becoming an Android Developer and how you got started.

In 2012 I was working as a contractor for the NSW government here in Australia as a Java J2EE web developer. I'd been in that role for 11 years, building web apps for students and teachers. However, in 2012 the government decided that contractors were expensive and let us all go. So while in my hand-over period I'd read about some kids who were writing Android apps and making lots of money doing so. The Android Market was new and so any app uploaded got a large audience, and since I already knew Java it seemed like switching from a web developer to a mobile developer might be a smart career move. So I purchased a new phone, the HTC Legend and spent the next 2 weeks learning everything I could about Android apps. It was the first time I could run software I'd written on a device made by someone else that I could carry around with me. It was a very exciting time where any app idea seemed possible.

When my contract finally ended, I managed to get a new job working for a mobile development agency and started working on Android apps for their clients. In order to learn more about Android app development, I started to attend the local Android meetups and Google Developer Group events, listening to speakers (mostly from Google) and trying to improve my skills as an Android developer.

In 2013 I was offered the opportunity to become the organiser of the Sydney GDG and it was that year that I also attended my first Google I/O (I've been every year since). One of the hard parts about being a GDG organiser is finding speakers, so occasionally if there were no speakers, or if a speaker dropped out at the last minute, I would step in and give a talk instead. 2013 was also the year I decided to move on from the mobile agency I was working at, and I spent the next 5 years working as a freelance contractor, working with clients such as eBay, the Sydney Opera House, and one of the large banks in Australia. Being the organiser of GDG Sydney and a regular speaker at the meetups meant finding work was quite easy.

In 2016 because of all the speaking I was doing I was approached to join the Google Developer Experts program, at this time I was doing regular talks at both the GDG Sydney and Android meetup events every couple of months. When I joined the GDE program, I handed over my GDG responsibilities to some friends, who still run it to this day. As part of the GDE program I've been lucky enough to attend many Google I/O events, and I've also had the opportunity to speak at conferences all over the world, including DroidCon Boston, Mobile Era in Oslo, DevFest Melbourne, DroidCon Singapore, Chicago Roboto and many others. Having the chance to speak to so many people all over the world has been very rewarding, and I've made many friends.

In 2019 I joined the company where I work today - mx51, I'm the lead Android developer designing and building apps that run on payment terminals, which also integrate with Point of Sales systems. I'm still a GDE but with the 2020 madness the ability to speak at in-person events was severely hindered. I hope that in-person events will start again soon and that I can continue my journey as a GDE.

What’s one shortcut, tip, or hack you can’t live without?

Android development is constantly changing and advancing, so there is always something new to learn. My tip would be to always be learning, there are lots of ways to do this, subscribe to the Android Developers YouTube channels and Medium publications. Follow Googlers and Google Developer Experts on Twitter for new tips and posts. Subscribe to the Android Weekly newsletter for an overview of new libraries and blog posts, and attend your local GDG chapter and Meetups. Not only are these great ways to learn new aspects of Android development, but with meetups they're a great place to meet other Android developers, share successes, and ask for advice on problems.

What's the one piece of advice you wish someone would have given you when you started on your journey?

When I started out as an Android developer, I could never have dreamed about being a Google Developer Expert, travelling the world and speaking at large events. It took me a long time to learn that it's ok not to know the answers to people's questions. If at an event someone asks something you don't know, it's ok to say so. You can always say that you'll find out later and get back to them. There is no need to make up a wrong answer on the spot and lead someone off course. People are often scared that a topic they're presenting might not be the best or greatest way to do something, and they fear looking stupid. If a person in the audience suggests a better way that shouldn't be a worry, 1) you learnt something, 2) everyone else learnt something and 3) there may be scenarios where your solution is better and a discussion can be had. So my advice would be, when speaking don't fear questions but embrace the opportunity to help someone immediately, or later, or perhaps discover something new yourself.

Amanda Hinchman-Dominguez

Amanda Hinchman-Dominguez

Tell me about your journey to becoming an Android Developer and how you got started.

I dabbled in Android development in college with the student mobile development group, but it wasn't until I was a few years in web development I made the real switch over. Back in my web dev days, I joined the Kotlin community, where I felt immediately welcome. Shortly after, I moved to Chicago a few years back when I heard there was a Kotlin community in the tech scene.

Getting up to speed with Android at a professional level is a whole different game, and I've been lucky to find the overlapping Kotlin/Android community both locally and globally. Android development has accelerated my career technically and professionally, yet the world is so deep and vast within the sandbox of Android development.

Already being an active enthusiast with Kotlin, it only felt natural to switch to Android, and I've never looked back. Since then, I've been working scalable and complex Android applications, and contributing with some technical writing along the way. I'm currently co-writing with my colleague, Pierre Laurence, on “Programming Android with Kotlin: Achieving Structured Concurrency with Coroutines with O'Reilly”, and I'm excited to have it come out sometime this year.

What’s one shortcut, tip, or hack you can’t live without?

For larger projects, it's sometimes hard to locate the file you're looking at in your Project view. You can use the target symbol ⊕ to get a highlight the file you're currently on in Android Studio.

Android Studio interface with arrows pointing to target symbol

What's the one piece of advice you wish someone would have given you when you started on your journey?

Only install LeakCanary when, and only when, you and your team is ready for that conversation ?

Anthony Edwards JR

Anthony Edwards Jr

Tell me about your journey to becoming an Android Developer and how you got started.

My journey as a developer started as a child. As a kid, I was obsessed with robots. I remember my dad bought me a Lego set called Lego Mindstorm, which was basically a robotics set with sensors and motors, plus it was also programmable. After graduating high school, I enrolled in the US Army as an Aviation Maintenance Repairer. After 6 years, I was honorably discharged then enrolled in college at Fordham University. In 2014, I received a Bachelor of Science in Computer Science. About 2 years later, I met my now wife, and together we started building EatOkra as a way for us to find black-owned restaurants in Brooklyn, NY. As we introduced the application to new people, they shared it with their network; before we knew it, many people were asking us to cover more areas in the south.

What’s one shortcut, tip, or hack you can’t live without?

Learn how to ask the right questions.

What's the one piece of advice you wish someone would have given you when you started on your journey?

One piece of advice I wish I took more seriously was to not build an application using beta technology. EatOkra's MVP was created using a beta version of a software framework. It started out good but then as they made updates, at times, I ended up having to wait months for certain issues to get fixed. I also had to completely stop and restart the app with an entirely new code base because the company decided to change how they architected the code. I learned a lot but it was painful to navigate.

Dinorah Tovar

Dinorah Tovar

Tell me about your journey to becoming an Android Developer and how you got started.

My journey started a couple of years ago (I was still in college) when I saw the Android Developer Udacity course. There was no nano degree back in the day. So once I saw it, I started building some apps for myself. From there, I applied for my first job as a junior developer in a big consulting firm. Then I started seeing more courses and started following a lot of people at Twitter, like Sam Edwards and Joe Birch (both GDE). The community made me grow and learn. A couple of years later I got my first team and I began delivering speeches at conferences and keeping up my Medium blog on the side. The community offers me feedback and knowledge, and especially a place to learn. My first conference was with WomenWhoCode.org here in Mexico. They opened a place for me without any experience. The same happened with Google Developers Groups here in Mexico City.

I became a Lead Engineer during my second job and I began doing worldwide conferences. I asked for feedback from Sam Edwards and Carlos Muñoz (also GDEs in Colombia) and they told me not to worry because I would amazingly and they encouraged me to keep doing it.

I got a really nice offer to start from scratch here as a Mobile Platform engineer in Mexico City with a huge fintech Startup (Konfio.mx). This is my current job, which means I am in the architectural office where we choose new ideas and new processes and pretty much service all the areas in the company.

I started creating a group of series to teach people some specific topics that I noticed were not deeply addressed. I also started getting involved in Kotlin Multiplatform and then I was reached out to by two GDE that nominated me to become GDE, Walmyr Carvalho, and Sam Edwards. They offered me feedback about my latest talks, podcast, and series and I was accepted at the end of 2020. Right now, I'm trying to learn more and deliver more talks and blog posts to the community.

What’s one shortcut, tip, or hack you can’t live without?

My special hack as an Android Developer is to use Wireless Debugging in the lastest Android Studio for physical devices. It is my favorite part because I don't need to use any cables and the setup is super easy!

What's the one piece of advice you wish someone would have given you when you started on your journey?

My advice is that learning is a process, things change and all of this must be welcome because we are addressing the evolution of the platform as we code. Also, read everything you can because people in the community are amazing and they love to teach! Open an account on Twitter, because there are a lot of people giving tips in less than 180 characters.


The Android Developer community prides itself in its inclusivity and welcomes developers from all backgrounds and stages of life. If you’re feeling inspired and want to learn more about how to become a part of our community, here are a few resources to help get you started.

Dive into developer.android.com

Follow us on Twitter

Subscribe to our YouTube channel

GDG logo

The Google Developer Groups program gives developers the opportunity to meet local developers with similar interests in technology. A GDG meetup event includes talks on a wide range of technical topics where you can learn new skills through hands-on workshops.

Join a chapter near you here.

Women Techmakers logo

Founded in 2014, Google’s Women Techmakers is dedicated to helping all women thrive in tech through community, visibility and resources. With a member base of over 100,000 women developers, we’re working with communities across the globe to build a world where all women can thrive in tech.

Become a member here.

GD Experts logo

The Google Developers Experts program is a global network of highly experienced technology experts, influencers and thought leaders who actively support developers, companies and tech communities by speaking at events, publishing content, and building innovative apps. Experts actively contribute to and support the developer and startup ecosystems around the world, helping them build and launch highly innovative apps.

Learn more about the program here.

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

Low-Power Sleep Tracking on Android

Posted by Nick Grayson, Product Manager

Illustration of phone with moon and Android logo on screen

Android works best when it helps developers create apps that people love. That’s why we are dedicated to providing useful APIs like Activity Recognition which, with the user’s permission, can detect user’s activities (such as whether a user is biking or walking) to help apps provide contextually aware experiences.

So much of what we do relies on a good night's rest. Our phones have become great tools for making more informed decisions about our sleep. And by being informed about sleep habits, people can make better decisions throughout the day about sleep, which affects things like concentration and mental health.

In an effort to help our users stay informed about their sleep, we are making our Sleep API publicly available.

What is the Sleep API?

The Sleep API is an Android Activity Recognition API that surfaces information about the user’s sleep. It can be used to power features like the Bedtime mode in Clock.

This sleeping information is reported in two ways:

  1. A ‘sleep confidence’, which is reported at a regular interval (up to 10 minutes)
  2. A daily sleep segment which is reported after a wakeup is detected

The API uses an on-device artificial intelligence model that uses the device’s light and motion sensors as inputs.

As with all of our Activity Recognition APIs, the app must be granted the Physical Activity Recognition runtime permission from the user to detect sleep.

Why is this important for developers?

Developers spend valuable engineering time to combine sensor signals to determine when the user has started or ended activities like sleep. These detection algorithms are inconsistent between apps and when multiple apps independently and continuously check for changes in user activity, battery life suffers.

The Sleep API is a simple API that centralizes sleep detection processing in a battery-efficient manner. For this launch, we are proud to collaborate with Urbandroid, the developer of the popular alarm app, Sleep As Android

Android logo sleeping
Sleep as Android is a swiss army knife for getting a better night’s rest. It tracks sleep duration, regularity, phases, snoring, and more. Sleep Duration is one of the most important parameters to watch for ensuring a good night’s rest. The new Sleep API gives us a fantastic opportunity to track it automatically in the most battery efficient way imaginable.

- Sleep as Android Team



When can I start using this API?

The Sleep API is available for developers to use now as part of the latest version of Google Play Services.

This API is one step of our efforts to help our users get a better night's rest. We look forward to working more on this API and in this area in the future.

If you are interested in exploring or using this API, check out our API Documentation.

Students Learn Android App Development with Google Developer Student Clubs

Posted by Erica Hanson, Global Program Manager, Google Developer Student Clubs

Google Developer Student Clubs, a program of university based community groups for students interested in Google developer technologies, recently started hosting study groups called Android Study Jams. The goal? Learn Android app development through hands-on codelabs in an online curriculum provided by Google. There are two tracks: one for students who are new to programming, and one for those who already have experience. Interested in participating? Facilitator materials are available for anyone to host Android Study Jams in their community - take a look and get to building.

Google Developer Student Clubs are dedicated to helping students learn programming together, among peers, in a fun and interactive setting. While over 50 thousand students from all over the world have participated in these Android workshops, we wanted to highlight the exciting work from groups in Indonesia, Turkey, and Nigeria. From programming in Kotlin to building a series of apps, these students have put their minds to work.

Learn more about what these three clubs have been up to below.

Indonesia

(Image from UNPNVJ’s Android Study Jams where students are learning Kotlin)

Club members from Universitas Pembangunan Nasional Veteran Jakarta in Indonesia recently came together to host a virtual Android Study Jams session with over 60 students to learn the basics of building Android apps. Their student-run learning session covered several topics, including:

  • An introduction to developing for Android
  • An introduction to coding in the Kotlin programming language
  • A tutorial on setting up and working in Android Studio

After the students felt comfortable with the basics of Kotlin and Android Studio, they combined their new skills to create their own layouts for a birthday card app.

(Image of Birthday cake app)

We can’t wait to see what the students from UPNVJ build next on Android thanks to their new programming skills.

Turkey

(Image from Medipol University where Nelson Glauber is teaching students the basics of Android App Development)

Medipol University in Turkey also hosted their own Android Study Jams by organizing a livestream with over 500 participants. Nelson Glauber, who was the first Google Developer Expert for Android in Latin America, led the event and helped students learn more about topics like:

  • How to display text and images in an app
  • Adding a button to an app and making it interactive
  • Learning more programming concepts in Kotlin like classes, objects, and conditionals

After taking students’ questions, Nelson worked with them to build an interactive dice roller app that updates the screen after the results of a roll.

(Image of Dice Roller app)

Nigeria

The Google Developer Student Club at Kaduna State University in Nigeria tackled different codelabs and learning pathways in their Android Study Jams. In particular, the group worked on the following topics:

  • Adding an additional screen to an app
  • Learning how the Jetpack Navigation Component makes it easier to manage navigation in an app
  • Learning the best practices of app architecture

With these new skills, the group is now able to start working on building more advanced apps that allow users to navigate between multiple screens.

(Gif of Cupcake app)

How to join a Google Developer Student Club and Android Study Jams

If you’re a university student looking to learn more about programming alongside a community of your peers, sign up for a Google Developer Student Club near you here. As a part of the community, you’ll have access to special learning opportunities, including Android Study Jams, on many of Google’s developer products.

If you want to lead your own Android Study Jams or explore other free resources for learning Android development, click here.

Students Learn Android App Development with Google Developer Student Clubs

Posted by Erica Hanson, Global Program Manager, Google Developer Student Clubs

Google Developer Student Clubs, a program of university based community groups for students interested in Google developer technologies, recently started hosting study groups called Android Study Jams. The goal? Learn Android app development through hands-on codelabs in an online curriculum provided by Google. There are two tracks: one for students who are new to programming, and one for those who already have experience. Interested in participating? Facilitator materials are available for anyone to host Android Study Jams in their community - take a look and get to building.

Google Developer Student Clubs are dedicated to helping students learn programming together, among peers, in a fun and interactive setting. While over 50 thousand students from all over the world have participated in these Android workshops, we wanted to highlight the exciting work from groups in Indonesia, Turkey, and Nigeria. From programming in Kotlin to building a series of apps, these students have put their minds to work.

Learn more about what these three clubs have been up to below.

Indonesia

(Image from UNPNVJ’s Android Study Jams where students are learning Kotlin)

Club members from Universitas Pembangunan Nasional Veteran Jakarta in Indonesia recently came together to host a virtual Android Study Jams session with over 60 students to learn the basics of building Android apps. Their student-run learning session covered several topics, including:

  • An introduction to developing for Android
  • An introduction to coding in the Kotlin programming language
  • A tutorial on setting up and working in Android Studio

After the students felt comfortable with the basics of Kotlin and Android Studio, they combined their new skills to create their own layouts for a birthday card app.

(Image of Birthday cake app)

We can’t wait to see what the students from UPNVJ build next on Android thanks to their new programming skills.

Turkey

(Image from Medipol University where Nelson Glauber is teaching students the basics of Android App Development)

Medipol University in Turkey also hosted their own Android Study Jams by organizing a livestream with over 500 participants. Nelson Glauber, who was the first Google Developer Expert for Android in Latin America, led the event and helped students learn more about topics like:

  • How to display text and images in an app
  • Adding a button to an app and making it interactive
  • Learning more programming concepts in Kotlin like classes, objects, and conditionals

After taking students’ questions, Nelson worked with them to build an interactive dice roller app that updates the screen after the results of a roll.

(Image of Dice Roller app)

Nigeria

The Google Developer Student Club at Kaduna State University in Nigeria tackled different codelabs and learning pathways in their Android Study Jams. In particular, the group worked on the following topics:

  • Adding an additional screen to an app
  • Learning how the Jetpack Navigation Component makes it easier to manage navigation in an app
  • Learning the best practices of app architecture

With these new skills, the group is now able to start working on building more advanced apps that allow users to navigate between multiple screens.

(Gif of Cupcake app)

How to join a Google Developer Student Club and Android Study Jams

If you’re a university student looking to learn more about programming alongside a community of your peers, sign up for a Google Developer Student Club near you here. As a part of the community, you’ll have access to special learning opportunities, including Android Study Jams, on many of Google’s developer products.

If you want to lead your own Android Study Jams or explore other free resources for learning Android development, click here.

Announcing Jetpack Compose Beta!

Posted by Anna-Chiara Bellini, Product Manager, Nick Butcher, Developer Relations

The Android Show: Jetpack Compose, Feb. 24 at 9am PT

Today, we’re launching the beta release of Jetpack Compose, our new UI toolkit designed to make it faster and easier to build native apps across all Android platforms. Compose offers modern, declarative Kotlin APIs, helping you build beautiful, responsive apps with way less code. Built to integrate with existing Android apps and Jetpack libraries, you can adopt Compose at your own pace by combining Android Views and Compose.

With this beta release, Compose is API complete and has all the features you need to build production-ready apps. Beta also means API stable, so we won’t change or remove APIs. Now is a great time to start learning Compose and begin planning for how you will use it in an upcoming project or feature once it reaches 1.0 later this year.

What's In Beta

Our team has been developing Compose in the open with feedback and participation from the community. Since open sourcing development in 2019, we’ve had 30 public releases, addressed over 700 external bugs, and accepted over 200 external contributions. We love seeing what you’ve been building with Compose and have used your feedback and feature requests to refine our APIs and prioritize our work. Since the alpha release, we’ve added and improved a number of new features:

  • ? Coroutines support
  • ? Accessibility support for Talkback - support for other technologies will be in Stable
  • ? Easy to use Animations, with a completely new API since alpha.
  • Interoperability with Views
  • Material UI Components, all with @Sampled code
  • Lazy Lists - Jetpack Compose's take on RecyclerView
  • DSL-based Constraint Layout
  • Modifiers
  • Testing
  • Theming and Graphics, with easy support for Dark and Light mode
  • Input and gestures
  • Text and editable text
  • Window management

For the beta release, we’ve been focused on ensuring API completeness; that all foundational APIs are in place for us to continue to build upon for 1.0 and beyond. We’ll work on stabilizing these APIs up to our 1.0 release with particular focus on app performance and accessibility.

Compose Beta is supported by the latest Canary of Android Studio Arctic Fox, which features many new tools:

    ? Live Literals: real time update of literals in Preview and on device or emulator

    ? Animation Preview: inspect and playback animations

    ? Compose support in the Layout Inspector

    ? Interactive preview: inspect and interact with a Composable in isolation

    ? Deploy Preview: to deploy a Composable on your device without needing a full app

Live Literals on Android Emulator


Layout Inspector for Jetpack Compose

Works with your existing app

Jetpack Compose is designed to work seamlessly with Android Views, letting you adopt at your own pace. You can embed Compose UIs within Android Views and use Views within Compose. We lay out a number of adoption strategies in our interoperability documentation.

In addition to View interop, we integrate with common libraries to help you to add Compose to your existing applications—no need to rewrite or re-architect your app. We offer integrations with:

  • Navigation
  • ViewModel
  • LiveData / Rx / Flow
  • Paging
  • Hilt

The MDC-Android Compose Theme Adapter and Accompanist libraries provide integrations with Material and AppCompat XML themes so you don’t need to duplicate theme definitions. Accompanist also offers wrappers for common image loading libraries.

Thinking in Compose

Jetpack Compose is a declarative UI toolkit, a paradigm shift from the current View system, where you describe what your UI should look like for a given application state, not how to produce it. Compose takes care of updating your UI when your app state changes, so you don’t have to manipulate your UI into the desired state which can be tedious and error prone.

Built entirely in Kotlin, Compose takes advantage of its great language features to offer powerful, succinct, intuitive APIs. Coroutines for example enable us to write much simpler async APIs such as describing gestures, animation or scrolling. This makes it easier to write code that combines async events, like a gesture which hands off to an animation, all with cancellation and clean-up provided by structured concurrency.

Learning Compose

To help you and your team learn all about Jetpack Compose, we’ve updated our learning pathway; a curated list of videos, hands-on codelabs and key docs to get you started. Today we’re releasing new & updated documentation guides, a number of screencasts and a new Animation Codelab to help dive deeper into how to build with Compose. From guidance on architecture, accessibility and testing, to deep dives into animation, lists or thinking in Compose, we have guides to help you get up to speed.

We also offer 8 official sample applications if you want to jump straight in and see Compose in action. We have simple to complex samples, each showcasing different APIs and use cases. Check the readme for more details.


#AndroidDevChallenge: learn Compose and win prizes

If you’re ready to get started with Compose–and also want to win some prizes along the way, check out the #AndroidDevChallenge. For the next four weeks, we’ll have weekly challenges designed to give your very own insights into Jetpack Compose, so you can fly through your projects. Compete to win new prizes for each challenge, with over one thousand prizes to win including a Google Pixel 5. You can read more about the first weekly challenge - starting today - right here.

With Jetpack Compose reaching Beta—with stable APIs and feature complete for 1.0—it's a great time to start learning Jetpack Compose and planning how you might use it in an upcoming project. We’d love to hear your feedback on adopting Compose in your app or join the discussion in the Kotlin Slack #compose channel.

Android Dev Challenge: lift off with Jetpack Compose

Posted by The Jetpack Compose Team

Jetpack Compose is Android’s modern toolkit for building native UI. It enables you to quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs. With the Beta of Jetpack Compose released today, this is the perfect time to learn Compose and get ready to adopt it. To help you get started with Jetpack Compose we are launching a new #AndroidDevChallenge!

For the next four weeks, the #AndroidDevChallenge will be launching a series of weekly challenges to help you build better apps faster with Jetpack Compose. Oriented around “lift off insights," each challenge focuses on a new area of Compose, from animations to Material Theming, composables to lists and more! Compete to win new prizes for each challenge, with over one thousand prizes to win including a Pixel 5. 1 The first challenge starts today!

The challenges

Every week brings a new challenge with its own rules and tasks. Every Wednesday starting today we’ll publish a blog post containing the full description of what you need to do and how long you have to complete the task. Each challenge will help you get familiar with the compose mental model and different Compose APIs - from basic Composables like Text and List, to state, animations and more.

Your solution to each challenge must be implemented in a GitHub repository. Make a copy of this Github repository template and follow the instructions in the README. The template contains a basic Hello World! in Compose and a continuous integration setup.

Week #1 - Puppy adoption app

Android 12 logo

Let’s start the #AndroidDevChallenge with a bang bark: build a puppy adoption app! The app should contain an overview screen that displays a list of puppies, and a detail screen showing each puppy's details. You have until March 2nd, 23:59 PST to submit your entry. 2

Your UI must be fully built in Compose. Your submission will only be judged based on your app’s UI layer. To help you with the implementation, check out the Compose documentation on layouts, lists, text and navigation. For some paws-on learning try out the Compose pathway, with codelabs covering several topics useful in completing this challenge.

Are you a ?rather than a ? person? Submissions for any type of pet adoption app are welcomed.

We look forward to seeing what you build!

This week’s prize

Our first challenge kicks off with a prize that makes for the perfect sidekick as you’re flying through Compose: a limited edition trophy of our Jetpack Compose superhero, made of LEGO bricks. The first 500 people to successfully complete this challenge and submit their entry can add this trophy to their collection of Android figurines, showing off how you’re a winner for the first week’s #AndroidDevChallenge.

Week #1 prize: Jetpack Compose superhero

Help make Jetpack Compose better

Community is at the heart of Jetpack Compose and your feedback helps us build a better product:

  • File issues with Jetpack Compose on the official issue tracker.
  • Sign up to be part of the Jetpack Compose research studies.


1 There will be new prizes for each week’s challenge; for weeks when a Google Pixel 5 is a prize, we will offer a similarly valued electronics gift card for winners that reside in a country where a Google Pixel 5 is unavailable. See the official rules for more information.
2 Please review the link for the full official rules associated with the entry.

Android Dev Challenge: lift off with Jetpack Compose

Posted by The Jetpack Compose Team

Jetpack Compose is Android’s modern toolkit for building native UI. It enables you to quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs. With the Beta of Jetpack Compose released today, this is the perfect time to learn Compose and get ready to adopt it. To help you get started with Jetpack Compose we are launching a new #AndroidDevChallenge!

For the next four weeks, the #AndroidDevChallenge will be launching a series of weekly challenges to help you build better apps faster with Jetpack Compose. Oriented around “lift off insights," each challenge focuses on a new area of Compose, from animations to Material Theming, composables to lists and more! Compete to win new prizes for each challenge, with over one thousand prizes to win including a Pixel 5. 1 The first challenge starts today!

The challenges

Every week brings a new challenge with its own rules and tasks. Every Wednesday starting today we’ll publish a blog post containing the full description of what you need to do and how long you have to complete the task. Each challenge will help you get familiar with the compose mental model and different Compose APIs - from basic Composables like Text and List, to state, animations and more.

Your solution to each challenge must be implemented in a GitHub repository. Make a copy of this Github repository template and follow the instructions in the README. The template contains a basic Hello World! in Compose and a continuous integration setup.

Week #1 - Puppy adoption app

Android 12 logo

Let’s start the #AndroidDevChallenge with a bang bark: build a puppy adoption app! The app should contain an overview screen that displays a list of puppies, and a detail screen showing each puppy's details. You have until March 2nd, 23:59 PST to submit your entry. 2

Your UI must be fully built in Compose. Your submission will only be judged based on your app’s UI layer. To help you with the implementation, check out the Compose documentation on layouts, lists, text and navigation. For some paws-on learning try out the Compose pathway, with codelabs covering several topics useful in completing this challenge.

Are you a ?rather than a ? person? Submissions for any type of pet adoption app are welcomed.

We look forward to seeing what you build!

This week’s prize

Our first challenge kicks off with a prize that makes for the perfect sidekick as you’re flying through Compose: a limited edition trophy of our Jetpack Compose superhero, made of LEGO bricks. The first 500 people to successfully complete this challenge and submit their entry can add this trophy to their collection of Android figurines, showing off how you’re a winner for the first week’s #AndroidDevChallenge.

Week #1 prize: Jetpack Compose superhero

Help make Jetpack Compose better

Community is at the heart of Jetpack Compose and your feedback helps us build a better product:

  • File issues with Jetpack Compose on the official issue tracker.
  • Sign up to be part of the Jetpack Compose research studies.


1 There will be new prizes for each week’s challenge; for weeks when a Google Pixel 5 is a prize, we will offer a similarly valued electronics gift card for winners that reside in a country where a Google Pixel 5 is unavailable. See the official rules for more information.
2 Please review the link for the full official rules associated with the entry.

Here’s how to watch #TheAndroidShow in just under 24 hours

Posted by The Jetpack Compose Team

In less than 24 hours, we're giving you a backstage pass to Jetpack Compose, Android's modern toolkit for building native UIs, on #TheAndroidShow. Hosted by Kari Byron, you'll hear the latest on Jetpack Compose from the people who built it, plus a fireside interview with Android's Dave Burke.

The show kicks off live at 9AM PT!

Broadcasting live on February 24th at 9AM PT, you’ll be able to watch the show at goo.gle/TheAndroidShow, where you’ll also be able to find more information and links to all of the things we covered in the show. Or if you prefer, you can watch directly on YouTube or Twitter.

There’s still time to ask your Jetpack Compose questions, use #TheAndroidShow

Got a burning Jetpack Compose question? Want to learn about annotating a function type with @ Composable? Or how to add a static parameter to Composable functions at the compiler level? Tweet us your Jetpack Compose questions now, using #TheAndroidShow. We’ve assembled a team of experts, ready to answer your questions live on #TheAndroidShow; tune in on February 24 to see if we cover your question!

MAD Skills Motion Layout: wrap-up

Posted by Chet Haase, Developer Relations Engineer

Android graphic

We recently finished another series of MAD Skills videos - this time on Motion Layout. We covered ways in which you can use the API and the design tool to create rich, custom, and complex animations for your users.

Check out the episodes below to increase your knowledge and skills in different areas of the Motion Layout API and design tool. And watch the live Q&A episode, featuring engineers on the Motion Layout and Developer Relations teams.

Episode 1 - ConstraintSet Animations

This video explores how ConstraintSets are used to define different states of your UI that you animate between. Along the way, Sean shows how to use Motion Editor in Android Studio to create and edit these transitions.

Episode 2 - Keyframes

This episode shows how to use Keyframes in a MotionLayout animation to customize the animation by altering the values of various properties over time. For example, you can use keyframes to change the path an object takes between start and end, instead of following just the default linear path it would follow otherwise.

Episode 3 - Multiple ConstraintSets

In this third episode, Sean shows how you can add ConstraintSets, beyond the default two (start + end) to create more complex animations, or transitions that flow through multiple states between the start and end.

Episode 4 - Building a Collapsible Header

In the fourth episode, explains how to build a collapsible toolbar using Motion Layout, which is a common place where this API shines. Along the way, you'll learn how to animate custom attributes using MotionLayout.

Episode 5 - Live Q&A

The final episode of the series was a live Q&A, streamed and recorded on February 18th. It’s too late to see it or ask your questions live, but check out the recording to watch the conversation between me (asking the Qs) and Sean, John, and Nicolas (supplying the As).

More Motion Layout Resources

There are plenty of other resources to learn more about how to use Motion Layout, besides this MAD Skills series, including:

  • MotionTags: This series of screencasts on specific areas of the Motion Layout API just wrapped up.
  • Motion Layout Guide: This guide on our developer site provides a great jumping-off point with an overview of the API, code snippets showing how to get started, and examples of how to do various kinds of animations with Motion Layout.
  • Examples: This doc has several visual examples, alongside the XML it took to create them.
  • ADB podcast: I had a conversation with John, Nicolas, and Sean (not coincidentally, the same people who joined me for the livestream Q&A on MotionLayout) a few weeks ago. If you want to hear more about MotionLayout and ConstraintLayout, check it out on the podcast site or in your favorite podcast app.

But Wait, There’s More!

The Motion Layout series may have ended, but there’s still plenty still to come in the MAD Skills series. Be sure to check the MAD Skills playlist on YouTube, the articles on Medium, or this handy landing page that points to all of it.

First preview of Android 12

Android 12 logo

Posted by Dave Burke, VP of Engineering

Every day, Android apps help billions of people work, play, communicate, and create on a wide range of devices from phones and laptops to tablets, TVs, and cars. As more people come to rely on the experiences you build, their expectations can rise just as fast. It’s one of the reasons we share Android releases with you early: your feedback helps us build a better platform for your apps and all of the people who use them. Today, we’re releasing the first Developer Preview of Android 12, the next version of Android, for your testing and feedback.

With each version, we’re working to make the OS smarter, easier to use, and better performing, with privacy and security at the core. In Android 12 we’re also working to give you new tools for building great experiences for users. Starting with things like compatible media transcoding, which helps your app to work with the latest video formats if you don’t already support them, and easier copy/paste of rich content into your apps, like images and videos. We’re also adding privacy protections and optimizing performance to keep your apps responsive.

Today’s first preview is just the start for Android 12, and we’ll have lots more to share as we move through the release. Read on for a taste of what’s new in Android 12, and visit the Android 12 developer site for details on downloads for Pixel and release timeline. As always, it’s crucial to get your feedback early, to help us incorporate it into the final product, so let us know what you think!

Alongside the work we’re doing in Android 12, later this month we’ll have more to share on another important tool that helps you create great user experiences more easily: Jetpack Compose, our modern toolkit for building native UI. Join us on #TheAndroidShow for a behind-the-scenes look at Jetpack Compose, livestreamed on February 24 at 9AM PT, and tweet your Jetpack Compose questions using #TheAndroidShow to have them answered live on the show.

Trust and safety

Privacy is at the heart of everything we do, and in Android 12 we’re continuing to focus on giving users more transparency and control while keeping their devices and data secure. In today’s release we’ve added new controls over identifiers that can be used for tracking, safer defaults for app components, and more. These changes may affect your apps, so we recommend testing as soon as possible. Watch for more privacy and security features coming in later preview releases.

Modern SameSite cookie behaviors in WebView - In line with changes to Chrome and other browsers, WebView includes new SameSite cookie behaviors to provide additional security and privacy and give users more transparency and control over how cookies can be used across sites. More here.

Restricted Netlink MAC - We’re continuing to help developers migrate to privacy-protecting resettable identifiers. In a multi-release effort to ease migration of device-scoped Netlink MAC, in Android 11 we restricted access to it based on API level 30, and in Android 12 we’re applying the restriction for all apps - regardless of targetSDK level. More here.

Safer exporting of components - To prevent apps from inadvertently exporting activities, services, and receivers, we’re changing the default handling of the android:exported attribute to be more explicit. With this change, components that declare one or more intent filters must now explicitly declare an android:exported attribute. You should inspect your components in the manifest in order to avoid installation errors related to this change. More here.

Safer handling of Intents - To make handling PendingIntents more secure, Android 12 requires apps to explicitly declare a mutability flag, either FLAG_MUTABLE or the new FLAG_IMMUTABLE, for each PendingIntent. More here.

You can read more about these and other privacy and security changes here.

Better user experience tools

In Android 12 we’re investing in key areas to help deliver a polished experience and better performance for users. Here are some of the updates so far.

Compatible media transcoding - With the prevalence of HEVC hardware encoders on mobile devices, camera apps are increasingly capturing in HEVC format, which offers significant improvements in quality and compression over older codecs. Most apps should support HEVC, but for apps that can’t, we’re introducing compatible media transcoding.

With this feature, an app that doesn’t support HEVC can have the platform automatically transcode the file into AVC, a format that is widely compatible. The transcoding process takes time, depending on the video and hardware properties of the device. As an example, a one minute 1080p video at 30fps takes around 9 seconds to transcode on a Pixel 4. You can opt-in to use the transcoding service by just declaring the media formats that your apps don't support. For developers, we strongly recommend that your apps support HEVC, and if that’s not possible, enable compatible media transcoding. The feature will be active on all devices using HEVC format for video capture. We'd love to hear your feedback on this feature. More here.

AVIF image support - To give you higher image quality with more efficient compression, Android 12 introduces platform support for AV1 Image File Format (AVIF). AVIF is a container format for images and sequences of images encoded using AV1. Like other modern image formats, AVIF takes advantage of the intra-frame encoded content from video compression. This dramatically improves image quality for the same file size when compared to older image formats, such as JPEG.

AVIF (18.2kB)

JPEG (20.7kB)

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

Credit: Image comparison from AVIF has landed by Jake Archibald

Foreground service optimizations - Foreground services are an important way for apps to manage certain types of user-facing tasks, but when overused they can affect performance and even lead to app kills. To ensure a better experience for users, we will be blocking foreground service starts from the background for apps that are targeting the new platform. To make it easier to transition away from this pattern, we’re introducing a new expedited job in JobScheduler that gets elevated process priority, network access, and runs immediately regardless of power constraints like Battery Saver or Doze. For back-compatibility, we’ve also built expedited jobs into the latest release of Jetpack WorkManager library. Also, to reduce distraction for users, we’re now delaying the display of some foreground service notifications by up to 10 seconds. This gives short-lived tasks a chance to complete before their notifications are shown. More here.

Rich content insertion - Users love images, videos and other expressive content, but inserting and moving this content in apps is not always easy. To make it simple for your apps to receive rich content, we’re introducing a new unified API that lets you accept content from any source: clipboard, keyboard, or drag and drop. You can attach a new interface, OnReceiveContentListener, to UI components and get a callback when content is inserted through any mechanism. This callback becomes the single place for your code to handle insertion of all content, from plain and styled text to markup, images, videos, audio files, and more. For back-compatibility, we’ve added the unified API to AndroidX. More here.

Haptic-coupled audio effect - In Android 12 apps can provide audio-coupled haptic feedback through the phone's vibrator. The vibration strength and frequency are derived from an audio session, allowing you to create more immersive game and audio experiences. For example, a video calling app could use custom ringtones to identify the caller through haptic feedback, or you could simulate rough terrain in a racing game. More here.

Multi-channel audio - Android 12 includes several enhancements for audio with spatial information. It adds support for MPEG-H playback in passthrough and offload mode, and the audio mixers, resamplers and effects have been optimized for up to 24 channels (the previous maximum was 8).

Immersive mode API improvements for gesture nav - We’ve simplified immersive mode so that gesture navigation is easier and more consistent, for example when watching a video, reading a book, or playing a game. We’re still protecting apps from accidental gestures when in full-screen experiences related to gaming, but in all other full-screen or immersive experiences (e.g. video viewers, reading, photo gallery), for apps targeting the new platform, we’re changing the default to allow users to navigate their phone with one swipe. More here.

Notification UI updates - We’re refreshing notification designs to make them more modern, easier to use, and more functional. In this first preview you’ll notice changes from the drawer and controls to the templates themselves. We’re also optimizing transitions and animations across the system to make them more smooth. As part of the updates, for apps targeting Android 12 we’re decorating notifications with custom content with icon and expand affordances to match all other notifications. More here.

Faster, more responsive notifications - When users tap a notification, they expect to jump immediately into the app - the faster the better. To meet that expectation, developers should make sure that notification taps trigger Activity starts directly, rather than using “trampolines” - an intermediary broadcast receiver or service - to start the Activity. Notification trampolines can cause significant delays and affect the user experience. To keep notifications responsive, Android 12 will block notification trampolines by preventing them from launching their target Activities, and we’re asking developers to migrate away from this pattern. The change applies only to apps targeting the new platform, but for all apps we’ll display a toast to make trampolines visible to you and to users. More here.

Improved Binder IPC calls - As part of our work on performance, we’ve put a focus on reducing system variability. We’ve taken a look at latency and workload distribution, and made optimizations that reduce the median experience from the tail end, or 99% percentile use case. In doing so, we’ve targeted improvements to system binder calls adding lightweight caching strategies and focusing on removing lock contention to improve latency distribution. This has yielded roughly a 2x performance increase on Binder calls overall, with significant improvements in specific calls, for example a 47x improvement in refContentProvider(), 15x in releaseWakeLock(), and 7.9x in JobScheduler.schedule().

App compatibility

We’re working to make updates faster and smoother by prioritizing app compatibility as we roll out new platform versions. In Android 12 we’ve made most app-facing changes opt-in to give you more time, and we’ve updated our tools and processes to help you get ready sooner. We’ve also added new functionality to Google Play system updates to give your apps a better environment on Android 12 devices.

More of Android updated through Google Play - We’re continuing to expand our investment in Google Play system updates (Project Mainline) to give apps a more consistent, secure environment across devices. In Android 12 we’ve added the Android Runtime (ART) module that lets us push updates to the core runtime and libraries on devices running Android 12. We can improve runtime performance and correctness, manage memory more efficiently, and make Kotlin operations faster - all without requiring a full system update. We’ve also expanded the functionality of existing modules - for example, we’re delivering our compatible media transcoding feature inside an updatable module.

Optimizing for tablets, foldables, and TVs - With more people than ever using apps on large-screen devices like foldables, tablets, and TVs, now is a great time to make sure your app or game is ready. Get started by optimizing for tablets and building apps for foldables. And, for the biggest screen in the home, the first Android 12 preview for Android TV is also available. In addition to bringing the latest Android features to the TV with this preview, you will also be able to test your apps on the all-new Google TV experience. Learn more on the Android TV Developers site and get started with your ADT-3 developer kit.

Updated lists of non-SDK interfaces - We’ve restricted additional non-SDK interfaces, and as always your feedback and requests for public API equivalents are welcome.

Easier testing and debugging of changes - To make it easier for you to test the opt-in changes that can affect your app, we’ve made many of them toggleable. WIth the toggles you can force-enable or disable the changes individually from Developer options or adb. Check out the details here.

mobile display of App Compatibility Changes with toggles

App compatibility toggles in Developer Options.

Platform stability milestone - Like last year, we’re letting you know our Platform Stability milestone well in advance, to give you more time to plan for app compatibility work. At this milestone we’ll deliver not only final SDK/NDK APIs, but also final internal APIs and app-facing system behaviors. We’re expecting to reach Platform Stability by August 2021, and you’ll have several weeks before the official release to do your final testing. The release timeline details are here.

Get started with Android 12

The Developer Preview has everything you need to try the Android 12 features, test your apps, and give us feedback. You can get started today by flashing a device system image to a Pixel 3 / 3 XL, Pixel 3a / 3a XL, Pixel 4 / 4 XL, Pixel 4a / 4a 5G, or Pixel 5 device. If you don’t have a Pixel device, you can use the 64-bit system images with the Android Emulator in Android Studio.

When you’re set up, here are some of the things you should do:

  • Try the new features and APIs - your feedback is critical during the early part of the developer preview. Report issues in our tracker or give us direct feedback by survey for selected features from the feedback and requests page.
  • Test your current app for compatibility - the goal here is to learn whether your app is affected by default behavior changes in Android 12. Just install your current published app onto a device or emulator running Android 12 and test.
  • Test your app with opt-in changes - Android 12 has opt-in behavior changes that only affect your app when it’s targeting the new platform. It’s extremely important to understand and assess these changes early. To make it easier to test, you can toggle the changes on and off individually.

We’ll update the preview system images and SDK regularly throughout the Android 12 release cycle. This initial preview release is for developers only and not intended for daily or consumer use, so we're making it available by manual download only. You can flash a factory image to your Pixel device, or you can sideload an OTA image to a Pixel device running Android 11, in which case you won’t need to unlock your bootloader or wipe data. Either way, once you’ve manually installed a preview build, you’ll automatically get future updates over-the-air for all later previews and Betas. More here.

As we get closer to a final product, we'll be inviting consumers to try it out as well, and we'll open up enrollments through Android Beta at that time. Stay tuned for details, but for now please note that Android Beta is not currently available for Android 12.

For complete information, visit the Android 12 developer site.