The Health Connect Toolbox is a companion developer tool to help you test your app's integration with Health Connect. It can read and write data directly to Health Connect, allowing you to test your app's operations. You can download the APK to use it for your test cycle.
Extract the ZIP file to get the APK files. Then, to install the Toolbox APK on
a connected device, use adb
. Navigate to the folder where the APK is located
and run the following command:
$ adb install HealthConnectToolbox-{Version Number}.apk
The first time you open the Health Connect Toolbox app, you're taken to the permission settings under Apps > Special app access > Display over other apps. This permission allows the Health Connect Toolbox to show an overlay on top of other apps, letting you test reading and writing data without leaving the app you're developing.
To manage read and write permissions for testing, open the Health Connect app from either the main screen of the Toolbox app or go directly to the permission flow.
Read and write health records
Health Connect Toolbox supports reading and writing all Health Connect data types. Before performing operations, you must first obtain permission from the user like any other app. Then, follow these steps:
- Accept the permission request from Health Connect Toolbox.
- To open the dialog, click the search icon from the overlay menu.
- Select a data type, such as Weight.
- Click the READ HEALTH RECORD button.
You'll now see the records from your app that you just wrote to Health Connect.
To insert a record into Health Connect, click the edit icon from the overlay menu to open the dialog. Then, select the data type.