add support for listening to a port in companion apps

By implementing this simple change, you can achieve multiple results with one simple change:

  1. de facto you wouldn't need this anymore, as native apps could communicate with the watch via companion apps: https://community.fitbit.com/t5/Feature-Suggestions/Fitbit-BLE-API/idc-p/2219115
  2. it would take care of this as well: https://community.fitbit.com/t5/Feature-Suggestions/Background-notifications-for-Ionic-apps/idi-p/21...

Simple solution, a listen() method that takes a port and a function. The implementation will spin a thread that opens that port and listen to it and invokes the function. Example:

 

 

// my companion app code
listen(8080, function(data) {  // data can be a byte array or a string
  if (data == "ping") {
    // send a message to the watch
  }
)


From a native app perspective it would be a simple as sending a message to a TCP port. Perfectly cross-platform, simple straightforward solution.

 

8 Comments
SunsetRunner
Not applicable

Nice suggestion, thanks for sharing. We look forward to hearing what other community member think.

jrtomsic
Recovery Runner

This would be amazing for adding high level communication and automation functionality through apps like Tasker.

This would open a huge number of possibilities in terms of third-party app integration. I hope that the Fitbit team strongly considers this.

paperinik
Tempo Runner

"Submitted by paperinik on ‎01-04-2018 09:11"

You will feel so much better once you give up hope. 🙂 

that0n3guy
Jogger
Jetiandresito
First Steps

I support this hoping that if will help to improve the communication between the phone and the watch of my Sleep as Android applications.

goldfish_23
Jogger

Yep! ...only here in the desperate hopes of Sleep as Android integration!

Semvn
Base Runner

I would like this too for Sleep as Android.

To comment, you must first accept the terms of the Idea and Feedback Submission policy.