now in android with logo on a mobile device with other imagery
Illustration by Virginia Poltrack

Now in Android #45

Welcome to Now in Android, your ongoing guide to what’s new and notable in the world of Android development.

NiA45 in Video and Podcast Form

Podcast

Android 12 Beta 4 🤖

Share WearOS Tiles ⌚

Tiles are built as part of your WearOS app, providing users quick access to information and actions with a swipe from the watch face home screen. We released the Jetpack Tiles API Alpha a while ago to allow you to build Tiles and preview them within your app — but now you can make them available to users by publishing your app to Google Play. ​​You can also upload a screenshot of your Tile to your Play Store preview assets within Google Play Console; make sure to let your users know they can try out the new experience.

Large-screen UI in the Google I/O App 🦊

  • Responsive navigation we used a navigation rail in wide landscape views to put navigation buttons on the side rather than the bottom.
  • One pane or two panes: we used a SlidingPaneLayout to display either one or two panes depending on the size and orientation of the screen including a single pane of content in the narrow portrait view on tablets.
  • Transforming space: we used ConstraintLayout to prevent UI elements becoming too stretched, too far apart, or packed too closely together.
  • Transforming content: we used an alternative layout to take advantage of the extra screen space. On narrow screens, you’ll see a list of items that expand and collapse when tapped. On wider screens, this transforms into a grid of cards that show all the item details right away.

For more information on how we enhanced the I/O app for large screens, check out the post!

Join Android Study Jams 📝

Android Study Jams are community events where developers come together to learn, create, and collaborate. Participants will follow guided codelabs designed to improve their development skills, all with an extra focus on improving the quality of applications.

If you want to join an Android Study Jam, meet fellow developers, and learn alongside friends old and new, then check out this link to find an event!

MAD Skills: Performance ⏲️

The MAD Skills series continues with more technical content about modern Android development.

This week continues the Performance series and there are two more episodes.

In the first episode, Carmen covers the Perfetto trace viewer, an alternative to the Android Studio profiler for viewing system traces. Where Android Studio focuses on system performance in context of your app, and is tightly integrated with the development workflow, Perfetto has additional functionality to examine interactions between multiple processes, such as the ability to get details on who is running code at the other end of a binder transaction. Tune in to the episode to learn more!

In the second episode, Pierre from Square teaches you a clever technique around starting and stopping the sampling profiler from code to capture laser-focused traces, particularly around UI events.

But Wait, There’s More MAD content!

For ongoing content, 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.

Codelabs 🧪

The first codelab covers the Nearby Messages API which enables user interactions based on physical proximity. A use case of this API can be letting friends easily discover each other when they are in close physical proximity, spontaneous lunch plans anyone? 🍔

The second codelab covers the Nearby Connections API, which lets users communicate with each other without data limit and without an internet connection. You will build a multiplayer Rock-Paper-Scissors game that works without the internet as long as users are within 100 meters of each other.

AndroidX Releases 📚

  • Jetpack Compose-related updates were focused on updating the Kotlin version along with adding an optional FilterQuality parameter to help enhance the look of scaled pixel art.
  • Games-Activity, Games-Controller, and Games-Text-Input have all been released to stable.
  • A new version of Startup was released, enabling support for automatic initialization in multiple processes.
  • Datastore was released, providing a data storage solution that allows you to store key-value pairs or typed objects with protocol buffers.
  • Core-Google-Shortcuts is in alpha and offers indexing support for URI-based icons in shortcuts to be displayed by Google apps.

ADB Podcast Episodes 🎧

There has been a new episode of Android Developers Backstage posted since the last Now in Android.

ADB released episode 172 covering privacy. In this episode, Chet, Romain and Tor talk with Sara N-Marandi, Fred Chung and Erik Wolsheimer about the new privacy features in Android 12, such as the privacy dashboard, and the camera and microphone usage indicators.

Now then… 👋

Android Developers

The official Android Developers publication on Medium