fitbit-file-messaging
v1.3.8
Published
Drop-in replacement for Fitbit peer socket messaging
Downloads
15
Readme
Drop-in replacement for Fitbit peer socket messaging - just replace the imports (in both app and companion)
- import * as messaging from 'messaging';
+ import * as messaging from 'fitbit-file-messaging';
messaging.peerSocket.onmessage = evt => {
// this code doesn't change
}
messaging.peerSocket.addEventListener('open', evt => {
// this code doesn't change
})
messaging.peerSocket.send(data)
This messaging uses file transfer under the hood, so it's more reliable than regular messaging.