Closed northern-fox closed 7 years ago
Any update on this? I'am getting this too. I've set the permission in AndroidManifest.xml. But when we see the permissions of the app in the settings, location is not seen. I'am testing it in a real device.
I will solve this bug on the weekend
This bug tested with RN-45 on android 6 tablet and android 7 mobile phone. No problems found. Please check your own code or upgrade to RN latest version.
LocationServicesDialogBox.checkLocationServicesIsEnabled({
message: "Use Location ?",
ok: "YES",
cancel: "NO"
}).then(function(success) {
navigator.geolocation.getCurrentPosition((position) => {
let initialPosition = JSON.stringify(position);
this.setState({ initialPosition });
}, error => console.log(error), { enableHighAccuracy: false, timeout: 20000, maximumAge: 1000 });
}.bind(this)).catch(function(error) {
this.setState({
initialPosition: error.message
});
}.bind(this));
Looks like the app doesn't have the permission to access location. Add the following line to your app's AndroidManifest.xml: