react-native-background-geolocation
react-native-background-geolocation copied to clipboard
Same car trip, Samsung collected data correctly while goes in error on Xiaomi device
Your Environment
- Plugin version: 4.4.6
- Platform: Android
- OS version: 10
- Device manufacturer / model: Xiaomi Redmi Note 8
- React Native version (
react-native -v): 0.66.0 - Plugin config
BackgroundGeolocation.ready({
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION,
showsBackgroundLocationIndicator: true,
distanceFilter: 0,
stopTimeout: 5,
preventSuspend: true,
heartbeatInterval: 30,
foregroundService: true,
debug: false,
logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
stopOnTerminate: true,
startOnBoot: false,
batchSync: false,
autoSync: false,
maxDaysToPersist: 3,
});
Expected Behavior
A collegue did the same trip with different devices (Samsung M52 and Xiaomi Redmi Note 8) in the same car: we expected to have the same(or similar) location updates in the verbose log files.
P.S:
- I configured Xiaomi (and the samsung as well) reading the instructions on https://dontkillmyapp.com/xiaomi removing all the battery optimizations defaults settings.
- We were able to have good trips (with good collected data) with the same Xiaomi Redmi Note 8
Actual Behavior
The trip was correctly recorded on the Samsung M52 while not recorded on Xiaomi Redmi Note 8. Xiaomi recorded just 2 positions versus 317 (Samsung). I attached extracted logs of the above trips retrieved via getLogs hoping you could understand what's the issue.
The trip was started today at 14:21 and stopped at 14:28.
Steps to Reproduce
- configure the library via BackgroundGeolocation.ready using above options
- start monitoring using BackgroundGeolocation.start()
- stop monitoring using BackgroundGeolocation.stop()
Context
Monitor a car trip with our app which works on most of the trips. We need as business requirements consistency for same trips monitored at the same time with all possible devices.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.