12-02-2020 09:05
12-02-2020 09:05
Hello everybody
I'm doing a project with some friends, and we're trying to create a fitbit app for the Versa 3. I do the design, somebody else is doing the code and an other person does research.
Our coder is unfortunately still a beginner, and to let our app work he needs to make it so that it vibrates when you are in a certain location. He knows how to make the fitbit monitor the current location, and he knows how to make the device vibrate, but he can not for the love of god connect the two of them.
Anybody that can help?
Best Answer12-08-2020 05:13
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.
12-08-2020 05:13
Something like this:
import { geolocation } from "geolocation";
import { vibration } from "haptics";
var watchID = geolocation.watchPosition(locationSuccess, locationError, { timeout: 60 * 1000 });
function locationSuccess(position) {
console.log("Latitude: " + position.coords.latitude,
"Longitude: " + position.coords.longitude);
vibration.start("nudge");
}
function locationError(error) {
console.log("Error: " + error.code,
"Message: " + error.message);
}
Best Answer