Skip to content

kiritowu/calculator-app-versa4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fitbit Calculator App for Versa 4

A simple Calculator and currency converter app based on an unofficial approach for sideloading a 3rd-party application to Fitbit Versa 4 and Sense 2 devices.

This app is built using Ionic Views framwork by gaperton.

Screenshots

calculator-screen Calculator Interface menu-screen Menu Interface currency-screen Currency Convertor Interface
currency-selector-screen Currency Selector number-selector-screen Number Pad setting-screen Setting Page

Quick Start

To summarise in 4 steps:

Install dependencies

yarn install

Prepare the bridge

Login to Gallery Admin, and accept the Fitbit Platform Terms of Service.

Open Fitbit app, access the Developer Menu from your device page, 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.

export FITBIT_QA_COMMANDS=1

Optionally enable the FITBIT_DEVBRIDGE_DUMP environment flag to capture all developer bridge protocol messages for debugging purposes.

export FITBIT_DEVBRIDGE_DUMP=1

Connect the devices

NOTE: When you first start the debug command, you may be requested to login to your Fitbit developer account.

yarn debug

Once 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: Hera

Install the app

fitbit$ 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]

About

Calculator app built for Fitbit Versa 4

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published