Dive into the Google Fit APIs for Android. Google Fit is an open fitness ecosystem that provides developers with a single set of APIs to discover, record, store, and read activity data with user permission. The Fit APIs for Android are bundled in Google Play Services — making them compatible with Android devices back to API level 9 (Gingerbread) — and backed by a cloud datastore. Google Fit is also accessible by a REST API.
In this DevByte, we’ll walk through authorizing your developer account in the Google Developer Console, connecting to Google Play Services in your Android app, and using the Sensors API to collect and display data. The Sensors API can list and subscribe to data from sensors on the user’s phone or tablet as well as any connected devices, like Android Wear. By registering or unregistering a listener, your app can receive real-time updates of fitness data and provide immediate feedback to users.