10-12-2017 08:07
10-12-2017 08:07
I see a lot of people have posted code snippets and/or screenshots of projects they are working on. Has anyone been keeping a list of projects that are currently shared on GitHub or on other posts here? It would be fun to look through to modify/play/learn on live examples.
Answered! Go to the Best Answer.
02-01-2018 11:21
02-01-2018 11:21
To answer the OP initial question, we have a repository where everyone can add their OSS Fitbit OS project.
10-12-2017 11:54
10-12-2017 11:54
I have not seen any other repos or projects yet, but here's one I am in the process of putting the finishing touches on: https://github.com/bayssmekanique/fitbit-gym-card
10-12-2017 12:14
10-12-2017 12:14
@BayssMekanique I was able to plug everything into studio and most of the code makes sense. Where would one go to input the card number?
10-12-2017 12:31 - edited 10-12-2017 12:31
10-12-2017 12:31 - edited 10-12-2017 12:31
For now, you have to go into the "Developer Menu" inside the Fitbit app (nested in the Ionic Device Page), and Gym Card will appear as a sideloaded app. Tap it, and you'll get a bunch of options, one of which is Settings. Tap the settings and you'll be taken to a settings page for where you can enter the card ID.
I'm assuming that once Gallery launches this would be able to be installed just like the rest of the apps and would have a gear icon which would lead to the settings page.
There is the potential to break this app still. I don't have any validation (still not certain of best practice for this yet) so as long as you only enter Alpha-Numeric values, it should work.
10-12-2017 13:29
10-12-2017 13:29
i was expecting what you said but saw this instead.
10-12-2017 13:48
10-12-2017 13:48
That's interesting. I have been using Android and it works fine, but I haven't tried on iOS.
To confirm, you need to copy over the app, companion, resources, and settings folders. (In Chrome I was able to drag all 4 folders into a new empty project all folders)
10-12-2017 14:23
10-12-2017 14:23
Yes, same. Copied everything over. I see mostly everything as expected in iOS and the Ionic, but no settings icon like I would expect in iOS app.
I also tried going to the apps section but it only shows the preinstalled apps.
10-12-2017 14:56
10-12-2017 14:56
@TunaFin wrote:
Yes, same. Copied everything over. I see mostly everything as expected in iOS and the Ionic, but no settings icon like I would expect in iOS app.
I also tried going to the apps section but it only shows the preinstalled apps.
When you install an app with a companion, you need to enable the developer bridge on the phone and the Ionic, then connect to both in Studio. The companion gets installed on the device and you access settings via the developer menu.
10-12-2017 15:54
10-12-2017 15:54
So Developer Bridge on Ionic says "Connected to Debugger"
Studio is connected to both devices.
Now when I run I get a console error:
[6:52:45 PM]TypeError: null is not an object (evaluating 'JSON.parse(raw).name')
10-12-2017 16:30 - edited 10-12-2017 16:40
10-12-2017 16:30 - edited 10-12-2017 16:40
That's a bug! Atleast you were able to get it working 😛
I'll take a look later
10-12-2017 17:45
10-12-2017 17:45
hi, many people are still developing and learning to code apps/clockfaces as well, thus will likely have incomplete and buggy code - nothing worth pushing to github yet. i imagine in a few weeks there may be some more complete code examples to help out. in the meantime, maybe get familiar with how javascript works and make use of stackoverflow.com for any queries you have.
10-13-2017 08:41
10-13-2017 08:41
I added some additional checks to that particular code. There seem to be some issues with the Text Input field varying in what it returns, so I added quite a few checks just in case.
10-17-2017 09:29
10-17-2017 09:29
I finally got back to this and it worked very smoothly. A little slow to load when I select the icon, otherwise it appears to work great. I'll try it out at the gym tomorrow.
Is there some kind of timeout function once you are in the app to return back to the home screen and turn off the display? It seems like that would be beneficial so battery isn't destroyed when you forget to exit the app.
10-17-2017 16:34
10-17-2017 16:34
Yeah, I've noticed the slow load and haven't really done any digging to figure out exactly what's causing it. If I had to guess it's the logic for the synchronous file read.
As for the timeout, I certainly could add something like that. It hadn't crossed my mind. I'll dig into it a bit more this weekend.
02-01-2018 11:21
02-01-2018 11:21
To answer the OP initial question, we have a repository where everyone can add their OSS Fitbit OS project.