Agontuk / react-native-geolocation-service

React native geolocation service for iOS and android
https://www.npmjs.com/package/react-native-geolocation-service
MIT License
1.61k stars 291 forks source link

watchID always 0 when i called watchPosition #419

Open ducsilva opened 1 year ago

ducsilva commented 1 year ago

Environment

System: OS: macOS 13.2.1 CPU: (8) arm64 Apple M1 Pro Memory: 86.28 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.16.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 9.5.1 - /usr/local/bin/npm Watchman: 2022.09.26.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.12.1 - /Users/ducnguyen/.rbenv/shims/pod SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 Android SDK: Android NDK: 22.1.7171670 IDEs: Android Studio: 2022.2 AI-222.4459.24.2221.9862592 Xcode: 14.2/14C18 - /usr/bin/xcodebuild Languages: Java: 18.0.2.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.71.7 => 0.71.7

Platforms

issue related to Android

Versions

Please add the used versions/branches

Description

First, I would like to thank you for the useful software. Everything works very well. currently ,i am getting the position through watchPosition function then have problem watchID return always zero. i don't know where i am confused can someone help me

My code

Screenshot 2023-08-17 at 10 54 48

Expected Results

I want to clearWatch to unmount component

NgVSang commented 11 months ago

I got the same issue when using macOS for coding android, but with ubuntu it working good, dont know why.

mare95 commented 11 months ago

Have you found a solution for this? I'm getting the same error. App crashes when i start watching for position