### Android Health \& Fitness samples

A selection of code samples for you to use to accelerate your app development. Browse samples to learn how to build different components for your apps.

*** ** * ** ***

## Health Services on Wear OS samples

[![](http://developer.android.com/static/images/health-and-fitness/samples/exercise-sample.png)](https://github.com/android/health-samples/tree/main/health-services/ExerciseSampleCompose)  

### [Exercise Sample](https://github.com/android/health-samples/tree/main/health-services/ExerciseSampleCompose)

Manage an exercise experience using the ExerciseClient API.  
[![](http://developer.android.com/static/images/health-and-fitness/samples/passive-goals.png)](https://github.com/android/health-samples/tree/main/health-services/PassiveGoalsCompose)  

### [Passive Goals](https://github.com/android/health-samples/tree/main/health-services/PassiveGoalsCompose)

Monitor goal progress in the background and receive goal notifications using the PassiveMonitoringClient API.  
[![](http://developer.android.com/static/images/health-and-fitness/samples/passive-data.png)](https://github.com/android/health-samples/tree/main/health-services/PassiveDataCompose)  

### [Passive Data](https://github.com/android/health-samples/tree/main/health-services/PassiveDataCompose)

Receive passive data updates in the background using the PassiveMonitoringClient API.  
[![](http://developer.android.com/static/images/health-and-fitness/samples/measure-data-with-compose.png)](https://github.com/android/health-samples/tree/main/health-services/MeasureDataCompose)  

### [Measure Data with Compose](https://github.com/android/health-samples/tree/main/health-services/MeasureDataCompose)

Get rapid data updates in the foreground using the MeasureClient API.

## Bluetooth Low Energy and Companion Device Manager

[![](http://developer.android.com/static/images/health-and-fitness/samples/bluetooth-low-energy.png)](https://github.com/android/platform-samples/blob/main/samples/connectivity/bluetooth/ble/README.md)  

### [Bluetooth Low Energy (BLE)](https://github.com/android/platform-samples/blob/main/samples/connectivity/bluetooth/ble/README.md)

Find and connect to BLE devices.  
[![](http://developer.android.com/static/images/health-and-fitness/samples/companion-device-manager.png)](https://github.com/android/platform-samples/blob/main/samples/connectivity/bluetooth/companion/README.md)  

### [Companion Device Manager](https://github.com/android/platform-samples/blob/main/samples/connectivity/bluetooth/companion/README.md)

Use CDM to find and associate devices.

## Health Connect sample and toolbox

[![](http://developer.android.com/static/images/health-and-fitness/samples/health-connect-sample.png)](https://github.com/android/health-samples/tree/main/health-connect/HealthConnectSample)  

### [Health Connect sample](https://github.com/android/health-samples/tree/main/health-connect/HealthConnectSample)

Read, write, and sync data with Health Connect.  
[![](http://developer.android.com/static/images/health-and-fitness/samples/health-connect-toolbox.png)](https://developer.android.com/guide/health-and-fitness/health-connect-guidelines/test-guidance/health-connect-toolbox)  

### [Health Connect Toolbox](https://developer.android.com/guide/health-and-fitness/health-connect-guidelines/test-guidance/health-connect-toolbox)

Use this companion developer tool to help you test your app's integration with Health Connect.

## Featured libraries

[![](http://developer.android.com/static/images/health-and-fitness/samples/more-wear-os-samples.png)](https://github.com/android/wear-os-samples)  

### [More Wear OS samples](https://github.com/android/wear-os-samples)

Explore examples of Wear OS apps in this code samples repository.  
[![](http://developer.android.com/static/images/health-and-fitness/samples/horologist.png)](https://github.com/google/horologist)  

### [Horologist](https://github.com/google/horologist)

Horologist is a group of libraries that aim to supplement Wear OS developers with features that are commonly required by developers but not yet available.