10-16-2018 18:39
10-16-2018 18:39
Hello,
I have to get my local time zone from my companion device (Fitbit still does not include this info in its Date function). The only time I can get the time zone is if there is a settings change. Is there a way to store the last sent time zone, check it against the current one, then send it the tracker if there is a change?
Answered! Go to the Best Answer.
Best Answer10-17-2018 08:20
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.
10-17-2018 08:20
The device can ask the companion what the timezone is using the Messaging API. You can persist that in the companion using local-storage.
https://dev.fitbit.com/build/guides/communications/messaging/
https://dev.fitbit.com/build/reference/companion-api/local-storage/
Best Answer10-17-2018 08:20
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.
10-17-2018 08:20
The device can ask the companion what the timezone is using the Messaging API. You can persist that in the companion using local-storage.
https://dev.fitbit.com/build/guides/communications/messaging/
https://dev.fitbit.com/build/reference/companion-api/local-storage/
Best Answer10-17-2018 17:18
10-17-2018 17:18
Thanks for letting me know it can be done. Now the fun part...
Best Answer10-18-2018 13:45
10-18-2018 13:45
Any tips on how to get the companion app to activate without opening it? It doesn't seem that having this code helps if I have no way to get it to execute. Other than opening the companion app, is there a way to make it run? The only solution I can come up with is to sync on a too frequent basis.
Thanks.
Best Answer10-19-2018 10:03
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.
10-19-2018 10:03
Just send a message from the device to the companion and the companion will wake if it's sleeping.
Best Answer