Geolocation 'enableHighAccuracy' on Android always times out
Problem
Developing an Android app, whilst debugging on my Android Device running on 6.1, the geolocation api always returns an error callback with the message `Location request timed out`. [code block] If I toggle enableHighAccuracy option to false, the api works fine. In high accuracy mode, the timeout always takes as long as I specify in the timeout option i.e. 20 seconds. I've tried running with dev mode turned off. Should high accuracy mode work in Android?
Error Output
error callback with the message `Location request timed out`.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Geolocation 'enableHighAccuracy' on Android always times out
@acapop77 Forgot to mention also that permissions are enabled using: `<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />`
Trust Score
6 verifications
- 1
@acapop77 Forgot to mention also that permissions are enabled using:
@acapop77 Forgot to mention also that permissions are enabled using:
- 2
`<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />`
`<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />`
Validation
Resolved in facebook/react-native GitHub issue #7495. Community reactions: 19 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep