Examples
The following examples are available for your convenience to help you get started with the Fitbit SDK.
Moment Clock
SDK example version of the "Moment" clock face by Fitbit.
This is intended to be used as an example for building clock faces.
Check out Moment Clock Face
Exercise App
SDK example application which demonstrates the usage of the Exercise API added in Fitbit OS 3.0.
Check out Exercise App
HR Meter
Demonstrates reading the current heart-rate of the user, displaying it on the screen as well as the number of seconds, minutes or hours since the last valid reading.
Check out HR Meter.
Altimeter
Demonstrates using the Barometer to simulate measuring altitude, and display it on the screen.
Check out Altimeter.
Bay Area Rapid Transit (BART)
This example application downloads real-time BART data and shows upcoming trains for a station of your choice.
This examples demonstrates:
- How to build a list-based UI.
- How to fetch data from the Internet and process it before sending it to the watch.
- How to use a Settings page to let the user configure the app on the phone.
Check out BART.
LCD Clock Face
This example application simulates a retro LCD digital clock.
This examples demonstrates:
- How to use images for text.
- How to send color themes from a Settings page.
Check out LCD Clock Face.
Web API & OAuth
A sample application which uses the Settings API OAuth component, and the Fitbit Web API to query sleep data.
This example demonstrates:
- How to use the Settings API to authenticate with an OAuth 2.0 web service.
- How to use
fetch()
to query a web API. - How to use the Messaging API to send data from the companion to the device.
Check out Fitbit OAuth.