Closed Mynameisjohndev closed 7 months ago
the same issue
In order to access the location in background on device running Android 10 (API level 29) or higher, you also need to use below permission in the manifest file
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
I'm in the manifest file added < USES - permission android: name = "android. Permission. ACCESS_BACKGROUND_LOCATION" / >
problem is still there
System: OS: macOS 13.5.1 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 18.55 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.6.0 path: /usr/local/bin/node Yarn: version: 1.22.19 path: /usr/local/bin/yarn npm: version: 9.8.1 path: /usr/local/bin/npm Watchman: version: 2024.01.22.00 path: /usr/local/bin/watchman Managers: CocoaPods: version: 1.12.1 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms:
I'm getting the same error with "react-native-geolocation-service": "^5.3.1", Android device Realme with android version 11 func Geolocation.getCurrentPosition() always return {"code": 3, "message": "Location request timed out."}
later I discovered in reality the GPS on that day in question was affected because of the sun and the signal was messed up
Maybe can tryforceLocationManager: true
it solve my problem
Environment
Run
npx react-native info
in your terminal and copy the results here. System: OS: Windows 10 10.0.19045 CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz Memory: 1.46 GB / 7.87 GB Binaries: Node: 18.12.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: Not Found IDEs: Android Studio: AI-213.7172.25.2113.9014738 Visual Studio: Not Found Languages: Java: 11.0.16 npmPackages: @react-native-community/cli: Not Found react: 18.0.0 => 18.0.0 react-native: 0.69.6 => 0.69.6 react-native-windows: Not Found npmGlobalPackages: react-native: Not FoundPlatforms
Is this issue related to Android, iOS, or both ? Android
Versions
Please add the used versions/branches
Description
Please provide a clear and concise description of what the bug is. Include screenshots if needed. It was working fine, but today it presented a problem and even with the permissions granted I get this error: 3 Location request timed out.
Reproducible Demo
Provide a detailed list of steps that reproduce the issue.
Expected Results
Describe what you expected to happen.