Tag Archives: multi-device development

Peloton increased its multi-device support and saw an uptick in user engagement

Posted by the Android team

The Peloton App makes it easy for people to work out wherever they want, whenever they want. From living room yoga classes to guided audio runs outdoors, Peloton strives to create an engaging exercise experience that works for anyone, anywhere.

For Peloton, creating convenient workouts means making the Peloton App more accessible across surfaces. So after receiving numerous requests to upgrade its Android app experience from its community, along with the Pixel Watch announcement at Google I/O in 2022, the Peloton team saw an opportunity to boost the app’s support across the entire Android ecosystem, ensuring its Members receive a seamless Peloton experience on all their devices.
Quote card with text reads, 'We want to meet Members where they are and on all the devices they own'- Stefan Haaker, senior Android engineer at Peloton. Peloton logo.

Building the Wear OS experience

Peloton developers began updating the app’s multi-device support by creating a modern watch application for Wear OS devices using Compose for Wear OS. With the Compose toolkit, Peloton developers were able to quickly build a watch experience that met Wear OS guidelines. “The Wear OS app was our first usage of Compose in production,” said Stefan Haacker, a senior Android engineer at Peloton. “We really enjoyed how much more productive it made us.”

The Peloton team released the first wearable app version just after the Pixel Watch launched. They worked tirelessly to get the app ready between the announcement of the Pixel Watch and its launch. Thanks to the Jetpack Compose toolkit, Peloton developers were able to rapidly and efficiently prepare the app in record time.

The new wearable app gave Peloton Members more options for monitoring their heart rate in real time. Using the Data Layer API to synchronize information between wearables and the Peloton App, Members can now view their heart rate across devices—from their phones to their watches to their bikes—as they take a Peloton class.

“Before the Wear OS app was released, only a small percentage of Android Members worked out with a heart rate monitor (HRM). After releasing Peloton on Wear OS, the app had a 6X increase in HRM usage in just a few months,” said Stefan. “For Peloton, HRM usage correlates with a better user experience, increased user engagement, and more workouts a month.”

With more Members tracking their health and fitness data through the new Peloton app, it was important for the Peloton team to give them better access to that data. That’s why Peloton was excited to partner with Google to offer Health Connect integration from day one, giving its users a simpler way to consolidate and share their fitness data across applications.

Increased support across devices

Peloton developers wanted to embrace the uniqueness of each device across the Android ecosystem and focus on the individual benefits that their form factors could offer. With this mindset, it was easier for the Peloton team to create a flexible UI that could adapt to various screens.

“We had to stop developing and designing with rigid device categories in mind,” said Ward Bonnefond, a senior staff software engineer at Peloton. “Phones these days no longer have just a single rectangular screen.”

The Peloton team began optimizing for large screens and foldables by improving how the app handles window resizing across orientations and devices. Using resizable emulators, Peloton developers were able to ensure the app behaved as expected with different configurations and screen sizes.

“We used RecyclerViews to determine the number of columns the app displays at runtime based on the available screen size,” said Ward. “We removed restrictions on activity resizing and orientation locking so that our app would function properly in full screen, split screen, resizable floating windows, and foldables.”

Peloton developers used Jetpack WindowManager to support foldable-specific use cases, like tabletop mode for the app’s video player. The window manager library made it easy for developers to place a video above a device’s fold and workout metrics below it.

Peloton developers also streamlined the login process on Android TV. Instead of forcing Members to fumble over typing their credentials with a remote, they can now login through the Peloton App on their phone to quickly connect with their TV.

Quote card with text reads, 'With the Android SDK and Jetpack Libraries, it’s really easy to create a flexible UI that adapts to the different screen size.' — Ward Bonnefond, senior staff software engineer at Peloton

More devices, more opportunities

Since launching the all-new Wear OS application and enhancing support across Android devices, Peloton has seen an uptick in total workouts taken on the Android platform. Although other factors were at play, the Peloton team attributes much of that increase to the new wearable application.

“There are so many different devices with varying capabilities in the Android ecosystem, like phones, watches, tablets, TVs and more,” said Ward. “At the end of the day, we want the Peloton App to be awesome wherever Members use it.”

Get started

Learn how you can start developing for Wear OS and other Android devices today.

Top 3 things to know in multi-device from Google I/O 2023

Posted by Sara Hamilton, Developer Relations Engineer

Did you miss any multi-device updates at Google I/O this year? Don’t worry – here are the top 3 things you should know as a developer about Android multi-device updates, and be sure to check out the full playlist for sessions and more!

#1: New Large Screen Devices, plus improved tools and guidance

First, we have some exciting large screen updates. There are 2 new Android devices coming from Pixel - the Pixel Fold and the Pixel Tablet.

With these joining the 280M active large screen Android devices, now is a great time to invest in optimizing your app for larger screens. We’ve released a few things to make this easy.

We have improved tools and guidance, like the new Pixel Fold and Pixel Tablet emulator configurations in Android Studio available today.

We also have expanded Material design updates, and we’ve created more galleries with inspiration for building gaming and creativity apps, all part of the new Android design gallery.

You can start optimizing for these devices, and other large screen devices, by reading the guidance on the do’s and don’ts of optimizing your Android app for large screens and watching the session on developing high quality apps for large screens and foldables.

#2: Wear OS 4 developer preview released

Second, we released the developer preview of Wear OS 4. This release comes with many exciting changes – including a new way to build watchfaces.

The new Watch Face Format is a declarative XML format that allows you to configure the appearance and behavior of watch faces. This means that there's no executable code involved in creating a watch face, and there's no code embedded in your watch face APK.

The Wear OS platform takes care of the logic needed to render the watch face so you can focus on your creative ideas, rather than code optimizations or battery performance.

Learn more about all the latest updates in Wear OS by checking out our blog post, watching the session, and taking a look at the brand new Wear OS gallery, also part of the new Android design gallery.

#3: Compose for TV released in alpha

Finally, Compose for TV is released in alpha.

Jetpack Compose already had mobile components, Wear OS components, and Widgets – and now, TV components! Plus, you can now use the same foundational Jetpack Compose APIs, for things like state management, on TV as well.

This makes it easy to build beautiful, functional apps for Android TV OS with less code and better customization.

Learn more about how to integrate your TV app with Compose for TV by watching this session. And, check out the developer guides, design reference, our new codelab and sample code to get started. You can submit feedback through the library’s release notes.

That’s a quick snapshot of some of the coolest updates in the world of multi-device on Android from Google I/O’23. Want to learn more? Check out the full playlist here!

We’re making it even easier to build across these devices, through modern Android development tools like Jetpack Compose, so that as you build for more and more form factors, that skill base continues to grow and extend. Take a look at how Peloton continues to invest in different screens for an experience that follows their users wherever they want to train:

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

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

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

What’s in Developer Preview

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

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

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

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

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

Under The Hood

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

Getting started with Developer Preview

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


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