I'm playing with the documentation and typing it with TypeScript.
Well, I found a couple of issues:
const hr = me.permissions.granted('access_heart_rate')
? new HeartRateSensor()
: null;
if (hr) {
hr.start();
console.log(`activated in hr: ${'activated' in hr}`);
console.log(`typeof activated: ${typeof hr.activated}`);
}App: activated in hr: false App: typeof activated: undefinedI did this check after having no clue about why that check was always false in a condition, although the sensor was already started and giving metrics.
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Thanks for this, and your excellent work on the types repo.
I have recreated the issue with `activated`, and it appears to affect all sensors. I've logged this with the firmware team.
I have fixed the `ring` haptic documentation, but the deployment is stuck amongst some other changes.
I've noted your other feedback and will take a look at those next week.
Thank you!
Best Answer@JonFitbit I have to add a new issue, regarding the TextInput setting component and its onChange event. Reproduced with latest SDK & Emulator.
Instead of the value (you can think of a string), as the documentation says, the callback argument is a weird {"name": <value>} object.
<TextInput
onChange={value => {
console.log(JSON.stringify(value));
}}You can see this issue: https://github.com/SergioMorchon/fitbit-sdk-types/issues/58
It would be really nice to have some kind of repository under the Fitbit GitHub https://github.com/Fitbit organization where we can:
* Open issues
* Follow issues
* See the Fitbit OS / SDK etc. milestones
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Thanks for the feedback @Sergius, public bug tracker and roadmap is on my list too. I've raised this particular issue about the <TextInput> before, but I would assume that the value format will remain the same for now.