09-22-2018 21:35
Gold Fitbit Product Experts share support knowledge on the forums and advocate for the betterment of Fitbit products and services. Learn more
09-22-2018 21:35
I have an app with a settings page that should respond to settings changes made in the companion index.js. This works on the sim and Android, but not on Windows.
companion/index.js includes this:
settingsStorage.onchange = evt => {
let textInput = JSON.parse(evt.newValue).name;
let show = textInput!=="";
settingsStorage.setItem('show',show);
settingsStorage.setItem('status', JSON.stringify({'name':textInput}));
};settings/index.jsx:
function mySettings(props) {
return (
<Page>
<TextInput
label="Text Input"
settingsKey="textInput"
/>
{ JSON.parse(props.settings.show || 'false') && <Text>Thank you!</Text> }
<TextInput
label="Your text:"
placeholder="Ready."
settingsKey="status"
disabled="true"
/>
</Page>
);
}
registerSettingsPage(mySettings);Entering 'xxxx' on Android gives the expected result:
However, on Windows, index.jsx doesn't react:
Am I doing something wrong? Or is there a bug in the Windows app?
Best Answer09-28-2018 14:11
Gold Fitbit Product Experts share support knowledge on the forums and advocate for the betterment of Fitbit products and services. Learn more
09-28-2018 14:11
I would greatly appreciate it if someone could verify whether this is a system bug, or just me. I'm loathe to release further apps that use dynamic settings if they don't work on Windows. I suspect that my apps aren't the only ones affected.
Best Answer