10-13-2017 16:14
10-13-2017 16:14
I want to know if the user preferences are for US or METRIC, but not sure of the code to check this.
Do I need to:
import { distance } from "user-settings";
and then how do I get the value 'us' or 'metric' ?
I can usually figure things from example code, but don't understand from reading the docs on https://dev.fitbit.com/reference/device-api/user-settings/#interface-unitssettings-
Cheers!
Answered! Go to the Best Answer.
10-13-2017 16: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-13-2017 16:20
We're working to provide examples on the reference docs to make them easier to use.
import { units, locale, device, preferences } from "user-settings";
//units.distance === "metric" ? "kilometers" : "miles";
//units.speed === "metric" ? "km/h" : "mph";
//etc
10-13-2017 16: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-13-2017 16:20
We're working to provide examples on the reference docs to make them easier to use.
import { units, locale, device, preferences } from "user-settings";
//units.distance === "metric" ? "kilometers" : "miles";
//units.speed === "metric" ? "km/h" : "mph";
//etc