Closed Revocsid closed 5 years ago
this error is not related to this module. this is related to your device or emulator.
do the following to solve this problem:
enableHighAccuracy: false
navigator.geolocation.getCurrentPosition((position) => {
}, error => console.log(error),
{ enableHighAccuracy: false, timeout: 20000, maximumAge: 1000 })
})
@webyonet it worked. But is this recommended? I mean in my case i don't need high accuracy but... would this bring other problems?
@msqar in fact this is a geolocation bug on some devices. this use case will vary completely according to your need
Hi, The dialog works fine, location service is correctly opened and my callback is correctly invoked.
The problem is if I call the native method :
navigator.geolocation.getCurrentPosition(resolve, reject)
If the location was enabled by the dialog box I have always the same response
error {TIMEOUT: 3, POSITION_UNAVAILABLE: 2, PERMISSION_DENIED: 1, message: "Location request timed out", code: 3}
RN : .57.2 react-native-android-location-services-dialog-box: 2.7