Tag Archives: Android Developer

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.

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!

Expanding the reach of your Android Auto apps

Posted by Eric Bahna, Product Manager

In December, we opened the Google Play Store for publishing new Android Auto apps to closed testing. Today, you can reach more drivers by publishing navigation, parking, and charging apps to open testing tracks in the Google Play Store. With open testing, there’s no limit to the number of users who can download your app and you don’t need to manage lists of email addresses. This is an important milestone that gets us closer to making these apps available to all users in production. Get started with the Android for Cars App Library and choose an open testing track in the Play Console.

TomTom AmiGO, one of our early access partners

To give you a peek at what’s ahead, we’re working on adding the library to Android Jetpack! This will give you more consistency with other Jetpack APIs and visibility into new features. When the Jetpack library is ready, migrating your app from the existing library will be straightforward - change the namespace and tweak some API calls. After we stabilize the library in Jetpack, we’ll prepare the Google Play Store to publish these new apps to production tracks.

You can get started today - you don’t need to wait for the Jetpack library.

  1. Design your app’s experience using our developer guide and app quality guidelines.
  2. Develop using today’s beta library so you can get user feedback from now.
  3. Test using the desktop head unit.
  4. Publish to the Google Play Store, now up to open testing tracks.

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

Expanding the reach of your Android Auto apps

Posted by Eric Bahna, Product Manager

In December, we opened the Google Play Store for publishing new Android Auto apps to closed testing. Today, you can reach more drivers by publishing navigation, parking, and charging apps to open testing tracks in the Google Play Store. With open testing, there’s no limit to the number of users who can download your app and you don’t need to manage lists of email addresses. This is an important milestone that gets us closer to making these apps available to all users in production. Get started with the Android for Cars App Library and choose an open testing track in the Play Console.

TomTom AmiGO, one of our early access partners

To give you a peek at what’s ahead, we’re working on adding the library to Android Jetpack! This will give you more consistency with other Jetpack APIs and visibility into new features. When the Jetpack library is ready, migrating your app from the existing library will be straightforward - change the namespace and tweak some API calls. After we stabilize the library in Jetpack, we’ll prepare the Google Play Store to publish these new apps to production tracks.

You can get started today - you don’t need to wait for the Jetpack library.

  1. Design your app’s experience using our developer guide and app quality guidelines.
  2. Develop using today’s beta library so you can get user feedback from now.
  3. Test using the desktop head unit.
  4. Publish to the Google Play Store, now up to open testing tracks.

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

Expanding the reach of your Android Auto apps

Posted by Eric Bahna, Product Manager

In December, we opened the Google Play Store for publishing new Android Auto apps to closed testing. Today, you can reach more drivers by publishing navigation, parking, and charging apps to open testing tracks in the Google Play Store. With open testing, there’s no limit to the number of users who can download your app and you don’t need to manage lists of email addresses. This is an important milestone that gets us closer to making these apps available to all users in production. Get started with the Android for Cars App Library and choose an open testing track in the Play Console.

TomTom AmiGO, one of our early access partners

To give you a peek at what’s ahead, we’re working on adding the library to Android Jetpack! This will give you more consistency with other Jetpack APIs and visibility into new features. When the Jetpack library is ready, migrating your app from the existing library will be straightforward - change the namespace and tweak some API calls. After we stabilize the library in Jetpack, we’ll prepare the Google Play Store to publish these new apps to production tracks.

You can get started today - you don’t need to wait for the Jetpack library.

  1. Design your app’s experience using our developer guide and app quality guidelines.
  2. Develop using today’s beta library so you can get user feedback from now.
  3. Test using the desktop head unit.
  4. Publish to the Google Play Store, now up to open testing tracks.

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

Introducing the Android for Cars App Library

Posted by Eric Bahna, Product Manager

In August, we announced plans to expand Android Auto’s app ecosystem to enable new navigation, parking, and electric vehicle charging apps. We’ve been hard at work collaborating with our early access partners to test and refine the Android for Cars App Library. Today, we’re releasing the library into an open beta, for any developer to use. This means you’ll now be able to design, develop, and test your navigation, parking or charging app on Android Auto. We’re looking forward to enabling Google Play Store publishing for your beta apps in the coming months.

Android

Three of our early access partners: ChargePoint, SpotHero, and Sygic

The design phase is the time to familiarize yourself with our design guidelines and app quality guidelines. Driver safety is core to our mission and we want to help you optimize your app for the car.

When it comes time to build your app, our new library will hopefully make development easy. Get started with the developer guide and please give us feedback via our public issue tracker.

In the testing phase, see your app come alive on the Desktop Head Unit (DHU), our emulator that lets you simulate a car infotainment display. The DHU now supports multiple screen sizes, displaying information in the instrument cluster, and simulating vehicles with touchpad input.

Android for cars image

The DHU simulating an instrument cluster, a widescreen head unit, and a touchpad

You can get started with the Android for Cars App Library here. We’re excited to see what you build next!

Android Studio 4.1

Posted by Scott Swarthout, Product Manager

Android Studio logo

Today, we’re excited to release the stable version of Android Studio 4.1, with a set of features addressing common editing, debugging, and optimization use cases. A major theme for this release was helping you be more productive while using Android Jetpack libraries, Android’s suite of libraries to help developers follow best practices and write code faster. Based on your feedback we made a number of improvements to the code editing experience with IDE integrations for popular Android libraries.

Some highlights of Android Studio 4.1 include a new Database Inspector for querying your app’s database, support for navigating projects that use Dagger or Hilt for dependency injection, and better support for on-device machine learning with support for TensorFlow Lite models in Android projects. We’ve also made updates to Apply Changes to make deployment faster. Based on your feedback, we’ve made several changes to help game developers with a new native memory profiler and standalone profiling tools.

Product quality continues to be a major focus for the team, and we’ve been hard at work tracking down bugs and performance issues. We’ve heard from many developers that they liked the focus on better performance and reliability, so we’re happy to report that during this release cycle we’ve fixed 2,370 bugs and closed 275 public issues. We stay committed to maintaining high quality since we know that is key to your developer productivity.

Thank you to those who gave your early feedback in preview releases. Your feedback helped us iterate and improve features in Android Studio 4.1. If you are ready for the next stable release, and want to use a new set of productivity features, Android Studio 4.1 is ready to download for you to get started.

Below is a full list of new features in Android Studio 4.1, organized by key developer flows.

Design

Material Design Components updates

Android Studio templates in the create New Project dialog now use Material Design Components (MDC) and conform to updated guidance for themes and styles by default. These changes will make it easier to use recommended material styling patterns and support modern UI features like dark themes.

Material Design Components updates

Material Design Components updates in Project Templates

Updates include:

  • MDC: Projects depend on com.google.android.material:material in build.gradle. Base app themes use Theme.MaterialComponents.* parents and override updated MDC color and “on” attributes.
  • Color resources: Color resources in colors.xml use literal names (for example, purple_500 instead of colorPrimary).
  • Theme resources: Theme resources are in themes.xml (instead of styles.xml) and use Theme.<ApplicationName> names.
  • Dark theme: Base application themes use DayNight parents and are split between res/values and res/values-night.
  • Theme attributes: Color resources are referenced as theme attributes (for example, ?attr/colorPrimary) in layouts and styles to avoid hard-coded colors.

Develop

Database Inspector

We wanted to make it easier to inspect, query, and modify your app's databases using the new Database Inspector. To get started, deploy your app to a device running API level 26 or higher and select View > Tool Windows > Database Inspector from the menu bar. Whether your app uses the Jetpack Room library or the Android platform version of SQLite directly, you can now easily inspect databases and tables in your running app or run custom queries.

Because Android Studio maintains a live connection while you’re inspecting your app, you can also modify values using the Database Inspector and see those changes in your running app. If you use the Room persistence library, Android Studio also places run buttons next to each query in the code editor to help you quickly run queries you define in your @Query annotations. Learn more

Database inspector

Inspect, query, and modify your app’s databases with the Database Inspector

Run Android Emulator directly in Android Studio

You can now run the Android Emulator directly in Android Studio. Use this feature to conserve screen real estate, to navigate quickly between the emulator and the editor window using hotkeys, and to organize your IDE and emulator workflow in a single application window. You can manage snapshots and common emulator actions like rotating and taking screenshots from within Studio, but access to the full set of options still requires running the stable emulator. You can opt-in to use this feature by going to File → SettingsToolsEmulator Launch in Tool Window.

Android Emulator in Android Studio

Run the Android Emulator inside of Android Studio

Dagger Navigation Support

Dagger is a popular library for dependency injection on Android. Android Studio makes it easier to navigate between your Dagger-related code by providing new gutter actions and extending support in the Find Usages window. For example, clicking on the go to producer gutter action gutter action next to a method that consumes a given type navigates you to the provider of that type. Conversely, clicking on the go to consumer gutter action gutter action navigates you to where a type is used as a dependency. Android Studio also supports navigation actions for dependencies defined with the Jetpack Hilt library. Learn more.

Gutter actions navigation in Android Studio

Navigate between Dagger-related code with gutter actions

Use TensorFlow Lite models

Android developers are using machine learning to create innovative and helpful experiences. TensorFlow Lite is a popular library for writing mobile machine learning models, and we wanted to make it easier to import these models into Android apps. Similar to view binding, Android Studio generates easy-to-use classes so you can run your model with less code and better type safety. The current implementation of ML Model Binding supports image classification and style transfer models, provided they are enhanced with metadata.

To see the details for an imported model and get instructions on how to use it in your app, double-click the .tflite model file in your project to open the model viewer page. Learn more.

TensorFlow Lite in Android Studio 4.1

View TensorFlow Lite model metadata in Android Studio 4.1

Build & Test

Android Emulator - Foldable Hinge Support

Android Studio

In addition to recently adding 5G cellular testing support, we’ve added support for foldables in the Android emulator. With Android emulator 30.0.26 and above, you can configure foldable devices with a variety of fold designs and configurations. When a foldable device is configured, the emulator will publish hinge angle sensor updates and posture changes, so you can test how your app responds to these form factors. See the Developing for Android 11 with the Android Emulator blogpost to read more.

Extended controls, device pose

Apply Changes updates

Faster builds help developers make changes to their app more easily and quickly. To help you be more productive as you iterate on your app, we've made multiple enhancements to Apply Changes for devices running Android 11 or higher.

We've invested heavily in optimizing your iteration speed by developing a method to deploy and persist changes on a device without installing the application. After an initial deploy, subsequent deploys to Android 11 devices using either Apply Code Changes or Apply Changes and Restart Activity are now significantly faster. We’ve also added support for additional code changes in Apply Changes. Now if you add a method, you can deploy those changes to a running app by clicking either Apply Code Changes or Apply Changes and Restart Activity.

Export C/C++ dependencies from AARs

Android Gradle Plugin 4.0 added the ability to import Prefab packages in AAR dependencies. We wanted to extend the capability of this feature to support sharing native libraries as well. AGP version 4.1 enables exporting libraries from your external native build in an AAR for an Android Library project. To export your native libraries, add the following to the android block of your library project's build.gradle file:

buildFeatures {
    prefabPublishing true
}

prefab {
    mylibrary {
      headers "src/main/cpp/mylibrary/include"
    }

    myotherlibrary {
        headers "src/main/cpp/myotherlibrary/include"
    }
}

Symbolication for native crash reports

When a crash or ANR occurs in native code, the system produces a stack trace, which is a snapshot of the sequence of nested functions called in your program up to the moment it crashed. These snapshots can help you to identify and fix any problems in the source, but they must first be symbolicated to translate the machine addresses back into human-readable function names.

If your app or game is developed using native code, like C++, you can now upload debug symbols files to the Play Console for each version of your app. The Play Console uses these debug symbols files to symbolicate your app's stack traces, making it easier to analyze crashes and ANRs. To include debug symbols in your app bundle, add the following line to your project’s build.gradle file:

android.buildTypes.release.ndk.debugSymbolLevel = 'SYMBOL_TABLE'

Optimize

System Trace UI improvements

In Android Studio 4.1 we’ve overhauled System Trace, an optimization tool that gives you a real-time look at how your app is using system resources. We made it easier to select a trace with box selection mode, added a new analysis tab, and added more frame rendering data to help you investigate rendering issues in your app’s UI. Learn more.

Box selection: In the Threads section, you can now drag your mouse to perform a box selection of a rectangular area, which you can zoom into by clicking the Zoom to Selection button on the top right (or use the M keyboard shortcut). When you drag and drop similar threads next to each other, you can select across multiple threads to inspect all of them at once.

Use box selection to more easily select traces.

Trace selection

Summary tab: The new Summary tab in the Analysis panel displays:

  • Aggregate statistics for all occurrences of a specific event, such as an occurrence count and min/max duration.
  • Trace event statistics for the selected occurrence.
  • Data about thread state distribution.
  • Longest-running occurrences of the selected trace event.
View aggregated statistics in Summary tab of Android Studio 4.1

View aggregated statistics in the Summary tab

Display data: In the Display section, new timelines for SurfaceFlinger and VSYNC help you investigate rendering issues in your app's UI.

Standalone profilers

It's now possible to access the Android Studio Profilers in a separate window from the primary Android Studio window. This is useful when optimizing Android games built with other tools like Unity or Visual Studio.

To run the standalone profilers, do the following:

  1. Make sure the profilers in Android Studio are not already running on your system.
  2. Go to the installation directory and navigate to the bin directory:

Windows/Linux: <studio-installation-folder>\bin

macOS: <studio-installation-folder>/Contents/bin

  1. Depending on your OS, run profiler.exe or profiler.sh

The standalone profiler will allow you to connect to the Android emulator or any connected devices.

Standalone Android Studio profiler

Optimize your app with the Standalone Android Studio Profilers

Native Memory Profiler

Tracking native memory usage is important for game developers and other developers using C++ to understand how to optimize their app’s memory consumption. The Android Studio Memory Profiler now includes a Native Memory Profiler for apps deployed to physical devices running Android 10 or later. The Native Memory Profiler tracks allocations/deallocations of objects in native code for a specific time period and provides information about total allocations and remaining system heap size.

To initiate a recording, click Record native allocations at the top of the Memory Profiler window:

Native Memory Profiler window in Android Studio 4.1

View native memory allocations with the Native Memory Profiler

To recap, Android Studio 4.1 includes these new enhancements & features:

Design

  • Material Design Components updates

Develop

  • Database Inspector
  • Run Android Emulator directly in Android Studio
  • Dagger navigation support
  • Use TensorFlow Lite models

Build & Test

  • Android Emulator - Foldable Hinge Support
  • Apply Changes updates
  • Export C/C++ dependencies from AARs
  • Symbolification for native crash reports

Optimize

  • System Trace UI Improvements
  • Standalone profilers
  • Native Memory Profiler

These materials are not sponsored by or affiliated with Unity Technologies or its affiliates. “Unity” is a trademark or registered trademark of Unity Technologies or its affiliates in the U.S. and elsewhere.

11 Weeks of Android: That’s a wrap

11

This is the final blog post for #11WeeksOfAndroid. Thank you for joining us over the past 11 weeks as we dove into key areas of Android development. In case you missed it, here’s a recap of everything we talked about during each week:

Week 1 - People and identity

Discover how to implement the conversation shortcut and bubbles with ‘conversation notifications’. Also, learn more about conversation additions and other System UI news, and discover the people and conversations developer documentation here. Finally, you can also listen to the Android Backstage podcast where the System UI team is interviewed on people and bubbles.

To tackle user and developer complexity that makes identity a challenge for developers, we've been working on One Tap and Block Store, part of our new Google Identity Services Library.

If you’re interested in learning more about Identity, we published the video “in Identity on Android: what’s new in sign-in,” where Vishal explains the new libraries in the Google Identity System.

Two teams that worked very early with us are the Facebook Messenger team and the direct messaging team from Twitter. Read the story from Twitter here and find out how we worked with Facebook on the implementation here.

Find out more with the People and Identity learning path, playlist, and the week’s wrap-up blog post.

Week 2 - Machine learning

We kicked off the week by announcing the winners of the #AndroidDevChallenge! Check out all the winning apps and see how they used ML Kit and TensorFlow Lite, all focused on demonstrating how machine learning can come to life in a powerful way to help users get things done, like an app to help visually impaired navigate crowded spaces or another to help students learn sign language.

We recently made ML Kit a standalone SDK and it no longer requires a Firebase account. Just one line in your build.gradle file and you can start bringing ML functionality into your app.

Another much anticipated addition is the support for swapping Google models with your own for both Image Labeling as well as Object Detection and Tracking.

Find out about the importance of finding the unique intersection of user problems and ML strengths and how the People + AI Guidebook can help you make ML product decisions. Check out the interview with the Read Along team for more inspiration.

This week we also highlighted how adding a custom model to your Android app has never been easier.

Finally, try out our codelabs:

Find out more with the Machine Learning pathway, playlist, and the week’s wrap-up blog post.

Week 3 - Privacy and security

As shared in the “Privacy and Security” blog post, we’re giving users even more control and transparency over user data access.

In Android 11, we introduced various privacy improvements such as one time permissions that let users give an app access to the device microphone, camera, or location, just that one time. Learn more about building privacy-friendly apps with these new changes. You can also learn about various Android security updates in this video.

Other notable updates include:

  • Permissions auto-reset: If users haven’t used an app that targets Android 11 for an extended period of time, the system will “auto-reset” all of the granted runtime permissions associated with the app and notify the user.
  • Data access auditing APIs: In Android 11, developers will have access to new APIs that will give them more transparency into their app’s usage of private and protected data. Learn more about new tools in Android 11 to make your apps more private and stable.
  • Scoped Storage: In Android 11, scoped storage will be mandatory for all apps that target API level 30. Learn more and check out the storage FAQ.
  • Google Play system updates: Google Play system updates were introduced with Android 10 as part of Project Mainline, making it easier to bring core OS component updates to users.
  • Jetpack Biometric library:The library has been updated to include new BiometricPrompt features in Android 11 in order to allow for backward compatibility.

Find out more with the ‘privacy, trust and security’ learning pathway, playlist, and documentation on privacy and security best practices.

Week 4 - Android 11 compatibility

We shipped the second Beta of Android 11 and added a new release milestone called Platform Stability to clearly signal to developers that all APIs and system behaviors are complete. Find out more about Beta 2 and platform stability, including what this milestone means for developers, and the Android 11 timeline. Note: since week #4, we shipped the third and final beta and are getting close to releasing Android 11 to AOSP and the ecosystem. Be sure to check that your apps are working!

To get your apps ready for Android 11, check out some of these helpful resources:

In our “Accelerating Android updates” blog post, we looked at how we’re continuing to get the latest OS to reach critical mass by expanding Android’s updatability architecture.

We also highlighted Excelliance Tech, who recently moved their LeBian SDK away from non-SDK interfaces, toward stable, official APIs so they can stay more compatible with the Android OS over time. Check out the Excelliance Tech story.

Find out more with the Android 11 Compatibility learning pathway, playlist, and the week’s wrap-up blog post.

Week 5 - Languages

With the Android 11 beta, we further improved the developer experience for Kotlin on Android by officially recommending coroutines for asynchronous work. If you’re new to coroutines, check out:

Also, check out our new Kotlin case studies page for the latest case studies and data, including the new Google Home case study, and our state of Kotlin on Android video. For beginners, we announced the launch of our new Android basics in Kotlin course.

If you’re a Java language developer, watch support for newer Java APIs on how we’ve made newer OpenJDK libraries available across versions of Android. With Android 11, we also updated the Android runtime to make app startup even faster with I/O prefetching.

Android 11 included updates across the native toolchain, including better tools for profile-guided optimization (PGO) and improvements to native dependency management in Android Studio 4.0.

Finally, we continue to focus on improvements to the D8 and R8 compilers in Android Studio with better support for Kotlin in the R8 shrinker. Learn more.

Find out more with the languages learning pathway, playlist, and the week’s wrap-up blog post.

Week 6 - Android Jetpack

Interested in what’s new in Jetpack? Check out the #Android11 Beta launch with a quick fly-by introducing many of the updates to our libraries, with tips on how to get started.

  • Dive deeper into major releases like Hilt, with cheat sheets to help you get started, and learn how we migrated our own samples to use Hilt for dependency injection. Less boilerplate = more fun.
  • Discover more about Paging 3.0, a complete rewrite of the library using Kotlin coroutines and adding features like improved error handling, better transformations, and much more.
  • Get to know CameraX Beta, and learn how it helps developers manage edge cases across different devices and OS versions, so that you don’t have to.

This year, we've made several major improvements with the release of Navigation 2.3, which allows you to navigate between different screens of your app with ease while also allowing you to follow Android UI principles.

In Android 11, we continued our work to give users even more control over sensitive permissions. Now there are type-safe contracts for common intents and more via new ActivityResult APIs. These changes simplify how you request permissions, and we’ll continue to work on making permissions easier in the future.

Also learn about our recent releases of the AppStartup library as well as what’s new in WorkManager.

Find out more with the Jetpack learning pathway, playlist, and the week’s wrap-up blog post.

Week 7 - Android developer tools

We have brought together an overview of what is new in Android Developer tools.

Check out the latest updates in design tools, and go even deeper:

Also, find out about debugging your layouts, with updates to the layout inspector. Discover the latest developments for Jetpack Compose Design tools, and also how to use the new database inspector in Android Studio.

Discover the latest development tools we have in place for Jetpack Hilt in Android Studio.

Learn about the build system in Android developer tools:

To learn about the latest updates on virtual testing, read this blog on the Android Emulator. Lastly, to see the latest changes for performance tools, watch performance profilers content about System Trace. Additionally, check out more about C++ memory profiling with Android Studio 4.1.

Find out more with the Android developer tools learning pathway, playlist, and the week’s wrap-up blog post.

Week 8 - App distribution and monetization

Check out our webinars about the new Google Play Console beta if you weren’t able to tune in live.

We shared recent improvements we’ve made to app bundles, as well as our intention to require new apps and games to publish with this format in the second half of 2021. The new in-app review API means developers can now ask for ratings and reviews from within your app!

Don’t forget about our policy around more transparent subscriptions to help increase user trust in Google Play Billing. We also expanded our feature set to help you better reach and retain buyers, and launched Play Billing Library 3, which will be required by mid-2021.

Google Play Pass launched in nine new markets last month. Developers using both Google Play Pass and direct billing on Google Play have earned an average of 2.5 times US revenue with Google Play Pass, without diminishing Google Play store earnings. Learn more and express interest in joining.

Find out more with the app distribution and monetization learning pathway, playlist, and the week’s wrap-up blog post.

Week 9 - Android beyond phones

Check out some of the highlights from this week, including;

Find out more with the learning pathways for Android TV and Large Screens, Beyond phones playlist, and the week’s wrap-up blog post.

Week 10 - Games and media

We shared several games updates and presented a special "11 Weeks" episode of The Android Game Developer Show.

You can also take advantage of Android 11's new media controls by making sure your app is using MediaStyle with a valid MediaSession token. Learn how to support media resumption by making your app discoverable with a MediaBrowserServiceCompat, using the EXTRA_RECENT hint to help with resuming content, and handling the onPlay and onGetRoot callbacks. Then check out how to leverage the MediaRouter jetpack library and check out the updated version of the UAMP sample.

Finally, we covered some of the primary ways apps can benefit from 5G. Android 11 adds new APIs and updates existing APIs to help ensure you have all the tools you need to leverage the capabilities of 5G, such as an enhanced bandwidth estimation API, 5G detection capabilities, and a new meteredness flag from cellular carriers. The Android emulator now enables you to develop and test these APIs without needing a 5G device or network connection. All of this and more is available from our dedicated 5G page.

Find out more with the ‘games and media’ learning pathway, playlist, and the wrap-up blog post, and visit d.android.com/games to stay up to date on all of our tools and resources for game developers.

Week 11 - UI

In our final week, we released 4 new codelabs, 9 new samples, new documentation and a podcast from the Compose team. If you prefer videos; we’ve got you covered:

New in Android 11 is the ability for apps to create seamless transitions between the on screen keyboard being opened and closed. To find out how to add this to your app, slide on over to the video, blog posts and sample app

We recommend following the Material Design guidelines to ensure that apps operate consistently, enabling patterns learned in one app to be used in another. Find out more about Material Theming (color, type and shape), dark theme and Material’s motion system using the Material Design Components (MDC) library. If you haven’t already migrated to MDC, then check out our migration guide.

It even becomes possible to ease your migration with libraries like the new MDC-Android Compose Theme Adapter which converts an MDC XML theme into a Compose `MaterialTheme`.

Find out more with the Compose learning pathway, the Modern UI learning pathway, playlist, and the week’s wrap-up blog post.

Resources

You can find the entire playlist of #11WeeksOfAndroid video content here. Follow us on Twitter and YouTube, and subscribe to our email list to receive all the latest news and resources. Thanks so much for letting us be a part of this experience with you!

11 Weeks of Android: UI and Compose

Posted by Chris Banes & Nick Butcher

Android

This blog post is part of a weekly series for #11WeeksOfAndroid. Each week we’re diving into a key area of Android so you don’t miss anything. This week, we spotlighted people & identity; here’s a look at what you should know.

The big news: Jetpack Compose Alpha

This week we released the first alpha of Jetpack Compose ?, Android’s modern UI toolkit with native access to the platform APIs. Compose combines the power of Kotlin with the reactive programming model to make it easier and faster to build UI. We want your feedback to help us build the APIs that you need in your apps, so now is the time to try it out.

To get you up to speed with Compose, this week we’ve released 4 new codelabs, 7 new samples, new documentation and a podcast from the Compose team. If you prefer videos; we’ve got you covered...

To understand the reactive mindset and how to think about building apps with Compose, check out ‘Thinking in Compose’:

Learn how Jetpack Compose makes Android UI easier by walking through concrete examples from our open-source sample apps in ‘Compose by Example’:

Finally, to understand how Jetpack Compose and View based UIs can co-exist and interact, making it easy to adopt Compose at your own pace, check out ‘Compose for Existing’ apps:

Keyboard (IME) animations

New in Android 11 is the ability for apps to create seamless transitions between the on screen keyboard being opened and closed, as well as a revamped WindowInsets API to enable control of things such as the keyboard (IME). To find out how to add this to your app, slide on over to the video, blog posts and sample app

Material Design Components

We recommend following the Material Design guidelines to ensure that apps operate consistently, that patterns learned in one app can be used in another. Check out our new blog posts on Material Theming (color, type and shape), dark theme and Material’s motion system using the Material Design Components (MDC) library.

Adopting MDC now will prepare your codebase for later adopting Jetpack Compose — it uses the same concepts, design vocabulary and components. It even becomes possible to ease your migration with libraries like the new MDC-Android Compose Theme Adapter which converts an MDC XML theme into a Compose `MaterialTheme`.

If you haven’t already migrated to MDC, then check out our migration guide.

Learning path

If you’re looking for an easy way to pick up the highlights of this week, you can check out the learning pathways. This week we have two pathways for you to go through: the Compose pathway, and the ‘Modern UI’ pathway.

A pathway is an ordered tutorial that allows users to complete a pre-defined module that culminates in a quiz. It may include codelabs, videos, articles and blog posts. A virtual badge is awarded to each user who passes the quiz. Test your knowledge in each pathway to earn a limited edition badge.

Key takeaways

Whether you're building with the current UI toolkit or getting ready for the next generation we hope that the resources that we’ve shared this week help you to create beautiful, engaging UIs that your users will love. Thanks to everyone who tuned in or joined us for the AMA. Follow the Modern UI pathway to learn how to leverage Material Design, animation or the latest Android 11 features. Take the Compose pathway to learn about the future of Android UI development and help shape it with your feedback.

Resources

You can find the entire playlist of #11WeeksOfAndroid video content here, and learn more about each week here. We’ll continue to spotlight new areas each week, so keep an eye out and follow us on Twitter and YouTube. Thanks so much for letting us be a part of this experience with you!

ML Kit Pose Detection Makes Staying Active at Home Easier

Posted by Kenny Sulaimon, Product Manager, ML Kit; Chengji Yan and Areeba Abid, Software Engineers, ML Kit

ML Kit logo

Two months ago we introduced the standalone version of the ML Kit SDK, making it even easier to integrate on-device machine learning into mobile apps. Since then we’ve launched the Digital Ink Recognition API, and also introduced the ML Kit early access program. Our first two early access APIs were Pose Detection and Entity Extraction. We’ve received an overwhelming amount of interest in these new APIs and today, we are thrilled to officially add Pose Detection to the ML Kit lineup.

ML Kit Overview

A New ML Kit API, Pose Detection


Examples of ML Kit Pose Detection

ML Kit Pose Detection is an on-device, cross platform (Android and iOS), lightweight solution that tracks a subject's physical actions in real time. With this technology, building a one-of-a-kind experience for your users is easier than ever.

The API produces a full body 33 point skeletal match that includes facial landmarks (ears, eyes, mouth, and nose), along with hands and feet tracking. The API was also trained on a variety of complex athletic poses, such as Yoga positions.

Skeleton image detailing all 33 landmark points

Skeleton image detailing all 33 landmark points

Under The Hood

Diagram of the ML Kit Pose Detection Pipeline

The power of the ML Kit Pose Detection API is in its ease of use. The API builds on the cutting edge BlazePose pipeline and allows developers to build great experiences on Android and iOS, with little effort. We offer a full body model, support for both video and static image use cases, and have added multiple pre and post processing improvements to help developers get started with only a few lines of code.

The ML Kit Pose Detection API utilizes a two step process for detecting poses. First, the API combines an ultra-fast face detector with a prominent person detection algorithm, in order to detect when a person has entered the scene. The API is capable of detecting a single (highest confidence) person in the scene and requires the face of the user to be present in order to ensure optimal results.

Next, the API applies a full body, 33 landmark point skeleton to the detected person. These points are rendered in 2D space and do not account for depth. The API also contains a streaming mode option for further performance and latency optimization. When enabled, instead of running person detection on every frame, the API only runs this detector when the previous frame no longer detects a pose.

The ML Kit Pose Detection API also features two operating modes, “Fast” and “Accurate”. With the “Fast” mode enabled, you can expect a frame rate of around 30+ FPS on a modern Android device, such as a Pixel 4 and 45+ FPS on a modern iOS device, such as an iPhone X. With the “Accurate” mode enabled, you can expect more stable x,y coordinates on both types of devices, but a slower frame rate overall.

Lastly, we’ve also added a per point “InFrameLikelihood” score to help app developers ensure their users are in the right position and filter out extraneous points. This score is calculated during the landmark detection phase and a low likelihood score suggests that a landmark is outside the image frame.

Real World Applications


Examples of a pushup and squat counter using ML Kit Pose Detection

Keeping up with regular physical activity is one of the hardest things to do while at home. We often rely on gym buddies or physical trainers to help us with our workouts, but this has become increasingly difficult. Apps and technology can often help with this, but with existing solutions, many app developers are still struggling to understand and provide feedback on a user’s movement in real time. ML Kit Pose Detection aims to make this problem a whole lot easier.

The most common applications for Pose detection are fitness and yoga trackers. It’s possible to use our API to track pushups, squats and a variety of other physical activities in real time. These complex use cases can be achieved by using the output of the API, either with angle heuristics, tracking the distance between joints, or with your own proprietary classifier model.

To get you jump started with classifying poses, we are sharing additional tips on how to use angle heuristics to classify popular yoga poses. Check it out here.

Learning to Dance Without Leaving Home

Learning a new skill is always tough, but learning to dance without the aid of a real time instructor is even tougher. One of our early access partners, Groovetime, has set out to solve this problem.

With the power of ML Kit Pose Detection, Groovetime allows users to learn their favorite dance moves from popular short-form dance videos, while giving users automated real time feedback on their technique. You can join their early access beta here.

Groovetime App using ML Kit Pose Detection

Staying Active Wherever You Are

Our Pose Detection API is also helping adidas Training, another one of our early access partners, build a virtual workout experience that will help you stay active no matter where you are. This one-of-a-kind innovation will help analyze and give feedback on the user’s movements, using nothing more than just your phone. Integration into the adidas Training app is still in the early phases of the development cycle, but stay tuned for more updates in the future.

How to get started?

If you would like to start using the Pose Detection API in your mobile app, head over to the developer documentation or check out the sample apps for Android and iOS to see the API in action. For questions or feedback, please reach out to us through one of our community channels.