Fitbit OS 1.1 BETA3 - Developer Preview
Release Notes - Nov 8th 2017
In this release we take a giant leap toward the final release of Fitbit OS 1.1. It is important to read these release notes carefully, due to potentially breaking changes.
Permissions! Permissions! Permissions!
You may have noticed the ability to configure permissions in the package.json file within Fitbit Studio. From this release onwards, those permissions have now been implemented within the BETA3 firmware and the latest mobile applications (iOS v2.42, Android v2.61). If a developer tries to utilize an API without first requesting the appropriate permission, the API will generate an error message, and the requested data will not be returned.
For further information, please read our new Permissions Guide.
New APIs and Features!
We added a number of new APIs and additional functionality:
The Power API which can display information about the device battery and charging status is now available!
We added brightnessOverride to the device Display API.
To help you build complex and beautiful apps in very little time, we are exposing more components:
Tile List: Show list of elements, hide/remove element, reorder them, etc.
Pooled Tile List: For very long list, re-use elements via a pool for better performance and less memory impact.
Virtual Tile List: The sky's the limit, you can now build an infinite list!
Combo Button: A standard pattern in the Fitbit UI, allows you to offer two options to developers.
Elements can now be traversed in JavaScript using:
.parent()
,.nextSibling()
, and.firstChild()
.3D transformations can now be controlled via JavaScript. E.g.
mygroup.groupTransform.rotate.angle = 90;
Fitbit named colors can be used via JavaScript. E.g.
element.style.fill = "fb-red";
Negative values can now be used when setting element coordinates in JavaScript. E.g.
element.x = -100;
Some components now support setting their default text or image using the convenient helpers:
element.image = "";
andelement.text = "";
// Instead of:
myButton.getElementById('text').innerText = "A bit long";
// You should now write:
myButton.text = "Cool no?"
Developers can now dynamically affect the stacking order of elements, by changing the .layer property. Elements with a higher layer value will appear on top of elements with an undefined or lower layer value. E.g.
element.layer = 2
;It is now possible to raise or listen to more element events and states, such as: click, activate, mouseup, mousedown, mousemove, enable, disable, select, unselect, highlight, unhighlight, expand and collapse. E.g.
element.sendEvent({ type: 'activate' });
andelement.addEventListener('activate', (e) => ...);
Additional animation events and states can be triggered from JavaScript, such as: enable, disable, select, unselect, highlight, unhighlight, expand, collapse, click, activate, mouseup, mousedown and mousemove. E.g.
element.animate('enable');
Deprecations
We have deprecated some methods, so you may see some console logs for the following:
element.innerText
has been replaced withelement.text
element.animate = true;
has been replaced withelement.animate('enable');
Sensor batching has been removed.
Known Issues
Screen elements do not refresh until touched, when
<mask>
is used.Cannot subscribe to the
onactivate
event when using nested<svg>
elements.Apps may not automatically launch after installation when installing through Fitbit Studio.