-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geolocation is skipping location in android after change in still mode to driving/walking mode. #2023
Comments
After entering the stationary state, the device must move at least 200 meters before tracking resumes. See api docs Config.stationaryRadius. |
We tested the scenario again now after 7-8 hours of still mode we start walking and we got our first entry after covering distance of 1KM approx. |
@christocracy any update? |
The plug-in is at the mercy of the particular device and OS you’re using (you didn’t specify). Some devices are worse than others (particularly Chinese devices). A Google Pixel device, where the Android APIs operate as documented, requires about 200 meters of movement for tracking to engage and are not affected by “sitting idle for several hours”. |
We tested this scenario in couple of devices, Below is the list of devices.
In these all devices we are not getting callback after 200 meters of movement, Infact it's giving us entries after covering distance of 1KM approx. |
200 meters is not a guarantee. It depends on the device, OS, environment, presence of wifi signals and spacing of cell towers. |
You are always free to manually engage location tracking from a button on you UI and calling the method .changePace(true). |
We are facing issue for android platform of skipping location, Library stop pushing data on backend after some time interval.
Example: If we are in still mode from last 7-8 hours and after that we start walking then we are not getting data on backend but after couple of minutes we are getting our data but it's only providing last location and all previous data is missed.
Our configurations are mentioned below, Please help us to resolve this issue.
await BackgroundGeolocation.ready({
url: API_URL + API_ENDPOINTS.SAVELOCATION,
logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
distanceFilter: 10,
stopTimeout: 5,
autoSync: true,
batchSync: true,
disableProviderChangeRecord: true,
autoSyncThreshold: 5,
maxBatchSize: 10,
stopOnTerminate: false,
startOnBoot: true,
enableHeadless: true,
maxDaysToPersist: 3,
logMaxDays: 5,
locationAuthorizationRequest: 'Always',
locationTemplate:
'{"Latitude":<%= latitude %>,"Longitude":<%= longitude %>,"TimeStamp": "<%= timestamp %>","Uuid": "<%= uuid %>","Event": "<%= event %>","IsMoving": <%= is_moving %>,"Age":<%= age %>,"Speed":<%= speed %>,"Odometer":<%= odometer %>,"Mock":<%= mock %>,"Activity": "<%= activity.type %>","Activityconfidence": "<%= activity.confidence %>","Accuracy": <%= accuracy %>,"AltitudeAccuracy": <%= altitude_accuracy %>,"Altitude": <%= altitude %>,"Heading": <%= heading %>,"Level": <%= battery.level %>,"IsCharging": <%= battery.is_charging %>}',
backgroundPermissionRationale: {
title:
"Allow {applicationName} to access this device's location even when closed or not in use.",
message:
'This app collects location data to enable recording your trips to work and calculate distance-travelled.',
positiveAction: 'Change to "{backgroundPermissionOptionLabel}"',
negativeAction: 'Cancel',
},
The text was updated successfully, but these errors were encountered: