03-13-2018 06:00
03-13-2018 06:00
Introducing the latest awesome offerings for Fitbit developers: Fitbit OS 2.0 and our new multi-device simulator. Developers can now rapidly build applications and clock faces for Fitbit Ionic and the new Fitbit Versa, without having to purchase a device.
https://dev.fitbit.com/blog/2018-03-13-announcing-fitbit-os-2.0-and-simulator/
04-03-2018 07:15
04-03-2018 07:15
@AmbientPower: some things are just easier to test on a real device, but feel free to add a request for this.
04-03-2018 09:57
04-03-2018 09:57
Hey Fred, while you are at it, what's the status of the other requests there?
From the outside everything look pretty stale.
04-03-2018 10:59
04-03-2018 10:59
@paperinik: which ones?
04-03-2018 13:55
04-03-2018 13:55
Besides the emulator, all feature requests related to SDK look pretty much stale: https://community.fitbit.com/t5/Feature-Suggestions/idb-p/features/label-name/sdk
I would be interested in being able to send messages to the companion (push vs. pull): https://community.fitbit.com/t5/Feature-Suggestions/add-support-for-listening-to-a-port-in-companion...
But the platform would make a GIANT step when:
Of course sending a message to a companion and avoid polling is my number one request. I believe I already mentioned it. 😛
Pardon me bothering, but you guys are our only interface with the product team which so far seems pretty impervious to even extremely popular outstanding user requests.
04-17-2018 16:57
04-17-2018 16:57
Is there a video tutorial for this? I am trying to create my own personal clock face with a picture on my versa.
04-18-2018 02:54
04-18-2018 02:54
04-21-2018 04:40
04-21-2018 04:40
Hello @SunsetRunner
My first steps were with this excellent tutorial at udemy. Worth spending few bugs.
https://www.udemy.com/fitbit-ionic/learn/v4/t/lecture/9280866?start=268
04-23-2018 07:45 - edited 04-23-2018 09:21
04-23-2018 07:45 - edited 04-23-2018 09:21
Thanks for the work on this and all the dev tools.
Quick question: Is 'fetch' from the Companion API implemented in the Simulator? It seems like it is not, or at least, it is not working on my system.
EDIT: Upon further testing, it seems that 'messaging.peerSocket' never opens. The event handler 'messaging.peerSocket.onopen' never fires from within an App running on the Simulator. So there was no message sent to tell the companion to 'fetch' in the first place.
So my revised question: Is messaging implemented between the OS and Phone Simulators?
EDIT EDIT: Thanks to a helpful citizen on the Discord (@cpf) I resolved the issue. The Simulator opens the socket so fast that the event handler does not have time to attach before the event fires. So now I just check if the socket is already open and manually trigger the handler. Works like a charm.
Thanks for all your hard work!
04-25-2018 11:09
04-25-2018 11:09
@JonFitbit thanks! I look forward to playing around with the SDK and emulator over the next few months!
05-01-2018 07:30 - edited 05-03-2018 00:32
05-01-2018 07:30 - edited 05-03-2018 00:32
I experienced significant performance issues with the supplied monospace conversion script. I have come up with one which does monospace + padding far more efficiently:
// Convert to a string containing monospace digits export function monoDigits(num, pad = true) {
num |= 0; if (pad && num < 10) { return c0 + monoDigit(num); } else { let monoNum = '' while (num > 0) { monoNum = monoDigit(num % 10) + monoNum num = (num / 10) | 0 } return monoNum } } const c0 = String.fromCharCode(0x10); const c1 = String.fromCharCode(0x11); const c2 = String.fromCharCode(0x12); const c3 = String.fromCharCode(0x13); const c4 = String.fromCharCode(0x14); const c5 = String.fromCharCode(0x15); const c6 = String.fromCharCode(0x16); const c7 = String.fromCharCode(0x17); const c8 = String.fromCharCode(0x18); const c9 = String.fromCharCode(0x19); function monoDigit(num) { switch (num) { case 0: return c0; case 1: return c1; case 2: return c2; case 3: return c3; case 4: return c4; case 5: return c5; case 6: return c6; case 7: return c7; case 8: return c8; case 9: return c9; } }
05-01-2018 23:03
05-01-2018 23:03
@buzuli wrote:
I experienced significant performance issues with the supplied monospace conversion script. I have come up with one which does monospace + padding far more efficiently:
That's great, mind if I replace our example with yours?
05-03-2018 00:27 - edited 05-03-2018 00:46
05-03-2018 00:27 - edited 05-03-2018 00:46
Feel free to use it as your example. Keep in mind that it will coerce the supplied number to an integer.
The updateClock function in the example will need to be updated to the following.
function updateClock() { var today = new Date(); var hours = util.monoDigits(today.getHours(), false); var mins = util.monoDigits(today.getMinutes()); myLabel.text = hours + ":" + mins; }
05-03-2018 03:12
05-03-2018 03:12
Here is an updated version which can be applied to strings also:
export function monoDigits(num, pad = true) { let monoNum = ''; if (typeof num === 'number') { num |= 0; if (pad && num < 10) { monoNum = c0 + monoDigit(num); } else { while (num > 0) { monoNum = monoDigit(num % 10) + monoNum; num = (num / 10) | 0; } } } else { let text = num.toString(); let textLen = text.length; for (let i = 0; i < textLen; i++) { monoNum += monoDigit(text.charAt(i)); } } return monoNum; } const c0 = String.fromCharCode(0x10); const c1 = String.fromCharCode(0x11); const c2 = String.fromCharCode(0x12); const c3 = String.fromCharCode(0x13); const c4 = String.fromCharCode(0x14); const c5 = String.fromCharCode(0x15); const c6 = String.fromCharCode(0x16); const c7 = String.fromCharCode(0x17); const c8 = String.fromCharCode(0x18); const c9 = String.fromCharCode(0x19); function monoDigit(digit) { switch (digit) { case 0: return c0; case 1: return c1; case 2: return c2; case 3: return c3; case 4: return c4; case 5: return c5; case 6: return c6; case 7: return c7; case 8: return c8; case 9: return c9; case '0': return c0; case '1': return c1; case '2': return c2; case '3': return c3; case '4': return c4; case '5': return c5; case '6': return c6; case '7': return c7; case '8': return c8; case '9': return c9; default: return digit; } }
05-03-2018 08:39
05-03-2018 08:39
@SunsetRunner, @JonFitbit
another month has gone by without news on requests filed 6+ months ago.
Out of curiosity: what the heck is the product team working on? 🙂
05-04-2018 11:23
05-04-2018 11:23
@paperinik
They created a public roadmap.
https://dev.fitbit.com/build/roadmap/
The set of goals outlined in the roadmap seems reasonable. It reflects my suggestions on 100%, so no complaints from me :).
05-04-2018 15:52 - edited 05-04-2018 15:53
05-04-2018 15:52 - edited 05-04-2018 15:53
@paperinik wrote:@SunsetRunner, @JonFitbit
another month has gone by without news on requests filed 6+ months ago.
Out of curiosity: what the heck is the product team working on? 🙂
https://community.fitbit.com/t5/Versa/Versa-Firmware-Release-32-32-10-15/td-p/2690045
06-02-2018 06:24
06-02-2018 06:24
@JonFitbit Thanks so much! This has sped up the development process big time!
The only issue I'm dealing with is my app works well on the Simulator and not my actual watch. Feel free to take a look at my post: https://community.fitbit.com/t5/SDK-Development/JSON-Retrieved-and-Processed-in-Fitbit-Simulator-Doe....
I'm also starting to wonder if there is something wrong with my Ionic 1st generation watch or phone. (When I select Sync Now it takes a long amount of time and fails very often)
Thanks,
-Don
06-03-2018 07:21
06-03-2018 07:21
When I launched the simulator on my MacBook Pro running macOS 10.13.4, I got this error:
"app" is not optimized for your Mac. This app needs to be updated by its developer to improve compatibility.
and it linked to https://support.apple.com/en-us/HT208436
06-04-2018 03:32
06-04-2018 03:32
Works fine on mine running 10.13.4, MBP Touch bar.
06-04-2018 03:41
06-04-2018 03:41
I simply don't think you are running the right app. Fitbit OS Simulator is a 64 bit app, not 32 bit.