Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error: 1 Message: User denied Geolocation

ANSWERED

I have iphone settings for fitbit app to ALWAYS and am using the below in a companion app but still get the error:

 

Error: 1 Message: User denied Geolocation

 

Code being used:

 

import { geolocation } from "geolocation";

geolocation.getCurrentPosition(locationSuccess, locationError);

function locationSuccess(position) {
    console.log("Latitude: " + position.coords.latitude,
                "Longitude: " + position.coords.longitude);
}

function locationError(error) {
  console.log("Error: " + error.code,
              "Message: " + error.message);
}
Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Did you enable the geolocation permission in package.json?

View best answer in original post

Best Answer
0 Votes
3 REPLIES 3

Sorry for the premature request.  This has been solved, found the "Uses Location" checkbox in the dev tool

Best Answer
0 Votes

Did you enable the geolocation permission in package.json?

Best Answer
0 Votes

I use iOS. There isn’t dev tools. I have the privacy location set on for Fitbit but I still get the error. 

Best Answer
0 Votes