Forum Posts

Resolved! Get Real time HR and calorie count in my Android app

I want to get the real time Heart Rate on my android app. As per my understanding this is what is needed. 1. Develop a fitbit device app and make use of Excercise API (since I am making a workout app)2. Develop a companion app 3. Establish commicatio...

Resolved! (almost) real time data sync

Hi all,New to the forum  I've skimmed through the forum and found some related threads from which I conclude that Fitbit can passively sync approximately every 15 minutes. For a research project we are working on, that would suffice, but I would like...

Select function settings returns undefined or null

Hello,I am really stuggling with how to allow someone to change a simple date format via the settings.I copied the info verbatim a number of times from the SDK and the console logs always return undefined, null or [object OBJECT] with the exception o...

Resolved! Clock/Companion Weather on iOS

I have a watch face which displays the weather using the weather api in the companion SDK. Ive tested on the simulator and on my android device, but I've had a few iOS users say it's not working (one of which is my Dad who's settings I've gone throug...

Ensure Companion starts

If you start an app which has a companion and the phone is not in range or syncing, the companion obviously does not get started. When the phone becomes in range or syncs does the companion automatically get started or is there a method to follow to ...

Guy_ by Space Racer
  • 1071 Views
  • 10 replies
  • 2 votes

Resolved! Only when in FitbitAPP, fetch doesn't work.

Dear Development TeamI am currently trying to GET and POST to a homebrew API.However, it is not working.It works well in the fitbit OS simulator andI have confirmed both GET and POST connections to the API from my smartphone browser as well.Only in f...

TNakamura by Recovery Runner
  • 640 Views
  • 13 replies
  • 1 votes

Image picker

Is there a way to get the name of the file selected by the companion?

Guy_ by Space Racer
  • 359 Views
  • 4 replies
  • 1 votes

How to do this with fetch()??

Hello,I want to do a http request to a website which says i should do it like following:POST /automate/cloud/message HTTP/1.1 Host: llamalab.com Content-Type: application/x-www-form-urlencoded secret=&to=&device=&priority=normal&payload=Hello%20Worl...

Does calculations on a companion is done by phone CPU?

I need to read Gyroscope data of a Fitbit Sense and do some calculations on them and show the results to the user and also save the data to another app or web. I was thinking to develop a Fitbit app and communicate with a companion to send the data t...

Masghari by Recovery Runner
  • 283 Views
  • 1 replies
  • 0 votes

Resolved! Is PeerSocket shared??

Are the PeerSocket API, and all messages sent over it, shared among all apps on the device and its companions or is it an individual "channel" for each app-companion-pair??ThanksAaron 

How to make a companion app?

Hi, I am new to Fitbit studio and i want to make an app running in fitbit ionic which can communicate to my android and ios app. From what i have heard is that we have companion api  for that purpose and i want to know that whether we can build our c...

pranav_kp by Base Runner
  • 6552 Views
  • 12 replies
  • 5 votes

peersocket onmessage suddenly doesn't work

Hello I have programmed my own watchface with a weather display. Until today everything has worked. I just wanted to add more icons and so I changed the icon codes. Suddenly I don't get into the message-event in the app.js of the companion after send...

Simulator with Websocket and localhost

I am reviving a question asked a while ago that did not receive an answer: https://community.fitbit.com/t5/SDK-Development/Simulator-with-websocket-and-localhost/td-p/4211835 I want to test a Fitbit app using Fitbit OS simulator and a companion using...

Watch Face Eats Battery Like Crazy

The source code I've developed on GitHubThe code works beautifully in the simulator but naturally the real thing has a couple pretty serious problems that maybe you could help me with. The two major issues are: 1 ) This watch face eats the battery li...

iPh33r by Base Runner
  • 481 Views
  • 4 replies
  • 2 votes

Avoid "origin=null" set in POST request

Hey there, I'm fighting with this for the whole weekend and I'm running out of ideas.I try to create a personal app to retrieve data from Microsoft and display them on my fitbit.For this, I need to get an access token via a refresh token and then lat...

skeil by Recovery Runner
  • 965 Views
  • 3 replies
  • 0 votes

Resolved! Develop Companion App

Hello Guys, i'm trying to develop companion app to communicate to my Fitbit Ionic, my Xiaomi Redmi Note 4 and Fitbit Ionic already connected to Fitbit Studio, when I run the project I can see the app run on My Fitbit Device, but no app installed to m...

Unreliable Communication Between Companion and Device

I am coding an app that has users input information on the companion to be displayed on the device screen, but I have found the companion is roughly 90% reliable in communicating with the device. It is somewhat random in terms of what is communicated...

internet detection by companion

This is not an issue, it is rather an option.I try to detect in the compagion file if the device is connected to the internet or not.To be more precise, I need this to call an external API by internet link if internet is available or not if internet ...

PACIFIC1 by Recovery Runner
  • 647 Views
  • 2 replies
  • 0 votes

file.arrayBuffer() in pop()'s reception

I would like to be able to send a binary file from the device to the companion and receive it correctly. when I receive the file with pop() and try to retrieve the contents with file.arrayBuffer(), I get [object ArrayBuffer] and cannot see the conten...

Error connecting to websocket

I have an app that sends messages to a companion which is then supposed to communicate with a simple websocket that I have created. I have created a websocket server that runs on ws://127.0.0.1:8080/ , but when attempting to connect to that websocket...

Fetch Web API data from companion in the simulator

Hi, I am trying to set up the communication between the companion and any Web API using the Fetch function using the Fitbit Studio Simulator. Fitbit Studio Details:Device: Versa 3SDK version: 5.0Permissions: Internet & Run in background Companion cod...

fetch( ) API not working in companion

How exactly are we supposed to use the fetch API? Is there something specific that we are supposed to import? I am calling fetch( ) but keep getting Unhandled exception: ReferenceError: fetch is not defined, which is weird because this is the exact w...

Fetch in companion is empty

I have found multiple threads with this issue but haven't found a solution.https://github.com/SirSamhain/FitBitTest/blob/master/companion/index.jsI have even created my own test api and i saw that it's actually getting hit and returning like it shoul...

Resolved! fetch() POST text file not working in Simulator or watch

I tried numerous ways to get a text file to my server from the watch/companion. There is no problem getting it to the companion, but it does not get to the server. I have verified the server code using fetch from a different WEB site and JS. The simu...

BugsyBob by Recovery Runner
  • 1090 Views
  • 2 replies
  • 0 votes

Resolved! Not able to Do a file transfer every 30 seconds

Hello Community,  We are developing a SDK app to work with our virtual fitness application (both Android and iOS). I am trying to do a file transfer (json file) every 30 seconds to send the Heart Rate and Calorie details to the app to show on the app...

Resolved! "Failed to Fetch" from localhost web server (Android 10)

Hello, I'm trying to achieve data communication between companion app (SDK version ~4.1.0) and a web server running on localhost (Android 10), such that some RESTful APIs can be implemented later for data storage and analysis.  Currently, I'm using t...

stst09 by Recovery Runner
  • 1655 Views
  • 5 replies
  • 0 votes

Companion app not starting

Hello All,  I am developing an Fitbit app which uses the Excercise API. I am done developing the app. Things work fine as long as I am working with simulator.  Now, I have installed the app on the device and also written a server code on my Android a...

Companion App Missing Global Functions in iOS?

My companion app used some network calls to handle OAuth.  I noticed that it worked fine in Android and in the Simulator, but failed on iOS.  After connecting an iPhone to the developer bridge, I saw error messages stating the btoa function could not...

Saving user defined time

Hi guys,I am developing an app that reminds users to take medication before they go to sleep and tracks if they have taken the medication in the required dosage period. I am very new to developing apps for FitBits, though I do have some knowledge of ...

Is there a good guide on using npm modules?

I've came across quite a few different posts where people have requested help integrating an npm module of some kind. Looking through the forum, most of those have been resolved, but the repository links are now dead or removed.  I was wondering if a...