This app functions as a mindfulness bell or a coaching session timer on the fitbit versa4. When in mindfulness mode, thhe device vibrates every 15min when the timer (and app) is running. WHen in coaching-session mode, the device vibrates 30min, 45min, after the timer is started. The app also shows the current device time.
Fitbit does not support 3rd party applications for the fitbit versa 4. This is based on the unofficial approach for building and sideloading a 3rd-party application to Fitbit Versa 4. That provided for educational purposes only. Use at your own risk.
The appraoch is:
- Enables the
hostscommand via theFITBIT_QA_COMMANDSenvironment flag. - Uses unofficial drop-in package for @fitbit/sdk-build-targets
- Sets the
enableProposedAPIfor installs.
| App List | App |
|---|---|
![]() |
![]() |
To summarise in four steps:
cd app && \
npm install && \
npm buildOpen Fitbit app, access the Developer Menu, toggle on Developer Bridge and wait for the "Waiting for Studio" status.
On the Versa 4/Sense 2, connect the device to charger, goto Settings and navigate to Developer bridge, toggle USB debugging on.
Enable the FITBIT_QA_COMMANDS environment flag, this allows the device USB host to be discoverable.
./env.ps1
Optionally enable the FITBIT_DEVBRIDGE_DUMP environment flag to capture all developer bridge protocol messages for debugging purposes.
export FITBIT_DEVBRIDGE_DUMP=1NOTE: When you first start the debug command, you may be requested to login to your Fitbit developer account.
yarn debugOnce connected and the fitbit$ prompt is ready, type hosts to verify the watch and phone (companion host) can be found.
fitbit$ hosts
Device Hosts:
[
{
displayName: 'Hera',
available: true,
roles: [ 'APP_HOST' ],
connect: [AsyncFunction: connect]
}
]
Phone Hosts:
[
{
available: true,
connect: [Function: connect],
displayName: 'Samsung SM-G991B',
roles: [ 'COMPANION_HOST' ]
}
]Now, connect! First start with connect phone, followed by connect device.
fitbit$ connect phone
Auto-connecting only known phone: Samsung SM-G991B
fitbit$ connect device
Auto-connecting only known device: Herafitbit$ build-and-install
> testapp@1.0.0 build
> fitbit-build
[warn][build] Targeting proposed API may cause your app to behave unexpectedly. Use only when needed for development or QA.
[warn][settings] This project is being built without a settings component. Create a file named settings/index.tsx, settings/index.ts, settings/index.jsx or settings/index.js to add a settings component to your project.
[info][app] Building app for Fitbit Versa 4
[info][companion] Building companion
[info][build] App UUID: 2bcb9c0f-493b-4ec5-9fe0-07039a28ffa1, BuildID: 0x09256fc65528043a
No app package specified. Reloading ./build/app.fba.
Loaded appID:2bcb9c0f-493b-4ec5-9fe0-07039a28ffa1 buildID:0x09256fc65528043a
App install complete (full)
Companion install complete (full)
Launching app
Companion: Loaded and evaluated: file:///android_asset/bootstrap.js (js-engine-bootstrap.html:9,1)
Companion: Companion code started (companion/index.js:5,1)
Companion: Loaded and evaluated: file:///data/user/0/com.fitbit.FitbitMobile/app_companions/2bcb9c0f-493b-4ec5-9fe0-07039a28ffa1/0x09256fc65528043a/companion.js (js-engine-bootstrap.html:9,1)
Companion: Companion launched by [launchedOnTracker]
