transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.54k stars 424 forks source link

Got same entries when there is changes in provider (internet ,location app open/kill) #1974

Closed Nishad013 closed 5 days ago

Nishad013 commented 1 month ago

Your Environment

System: OS: macOS 14.4 CPU: (8) arm64 Apple M2 Memory: 59.80 MB / 8.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 16.20.2 - ~/.nvm/versions/node/v16.20.2/bin/node Yarn: 1.22.21 - ~/Documents/GitHub/alt-tomrex-app/node_modules/.bin/yarn npm: 8.19.4 - ~/.nvm/versions/node/v16.20.2/bin/npm Watchman: 2024.01.22.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.15.0 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2 Android SDK: Not Found IDEs: Android Studio: 2023.1 AI-231.9392.1.2311.11330709 Xcode: 15.2/15C500b - /usr/bin/xcodebuild Languages: Java: 15.0.2 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: ^0.64.0 => 0.64.4 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Expected Behavior

it should have send location data once and after sending that data it should have destroyed it from SQlite database

Actual Behavior

We tested that with app open net ON device location ON we get data in our database but when we start switching net on/off and walk then we faced that it has given as data twice . when we first off the internet and start walking after 200 meter we switch ON the internet and then again start walking . While checking in our database we see the same data twice from where we have switch OFF the internet and switch ON the internet .That time of data comes twice in our database .

Steps to Reproduce

  1. JUST TRY RUNNING WITH INTERNET OFF AND THEN ON AND AGAIN RUN

Context

We want to track location of the person IM ATTACHING AN EXCEL SHEET https://docs.google.com/spreadsheets/d/1jKMtPPbsYeuw1Jvaga5ZUK9A4_2f9Uh-KT0pcgYYZ2c/edit#gid=0 PLEASE CHECK THIS AND TELL US WHAT WE CAN DO TO AVOID GETTING LOCATION DATA TWICE

Sarveshwins commented 1 month ago

Anyone reply this questions .

christocracy commented 1 month ago

Every time onProviderChange fires on Android, the plug-in records a location to say “here is where the device was when location settings were changed”, the location will have attribute event: “providerchange” attached to it.

This is so that it can be known when/where a device was when location was disabled in Settings, for example.

if you do not desire this behaviour, see api docs Config.disableProviderChangeRecord.

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 5 days ago

This issue was closed because it has been inactive for 14 days since being marked as stale.