05-26-2020 03:36
05-26-2020 03:36
Hi, sorry for that one to...
i have a button in my settings, i want it to trigger a function in my app.
with a toggle i would easily get the boolean content using JSON.parse(evt.data.newValue) , but with the button i don t know...
how can i send intels to app/*.index using the onClick() event of my button in settings.jsx?
thank you for your time and forgivness!

Answered! Go to the Best Answer.
Best Answer05-26-2020 13:53
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.
05-26-2020 13:53
There isn't a direct way to do this, but you can get there:
1. In settings, write a value into settings storage // settingsStorage.setItem('some-key', 'some-value');
2. In companion, listen for the setting storage change event
3. In companion, send a value to the device via the messaging api
4. In the device, listen for the message and perform your action.
https://dev.fitbit.com/build/guides/settings/
https://dev.fitbit.com/build/guides/communications/messaging/
05-26-2020 13:53
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.
05-26-2020 13:53
There isn't a direct way to do this, but you can get there:
1. In settings, write a value into settings storage // settingsStorage.setItem('some-key', 'some-value');
2. In companion, listen for the setting storage change event
3. In companion, send a value to the device via the messaging api
4. In the device, listen for the message and perform your action.
https://dev.fitbit.com/build/guides/settings/
https://dev.fitbit.com/build/guides/communications/messaging/
05-27-2020 08:04
05-27-2020 08:04
Thank you, i get it now !!!
Best Answer