Success callback not called if location hasn't changed
See original GitHub issueYour Environment
- Plugin version: 2.2.0-alpha.6
- Platform: Android
- OS version: 5.1.1
- Device manufacturer and model: Huawei P7
- Cordova version (
cordova -v
): 6.1.1 - Cordova platform version (
cordova platform ls
): android 5.1.1 - Plugin configuration options:
- desiredAccuracy: 10,
- stationaryRadius: 0,
- debug: true,
- distanceFilter: 0,
- startOnBoot: true,
- interval: 10000,
- locationProvider: backgroundGeolocation.provider.ANDROID_ACTIVITY_PROVIDER,
- fastestInterval: 5000,
- activitiesInterval: 5000,
- stopOnStillActivity: false,
- maxLocations: 0
Context
I’m using the plugin on an Ionic v1.3.1 project, without Ionic Native or any other wrapper.
Expected Behavior
Every 10 seconds or so the current location should be obtained and the success callback should be called, even if the device hasn’t moved.
Actual Behavior
Because of the debug sounds and the Toast message I can tell the location is being obtained every 10 seconds, but the success callback is not getting called unless there is a change on the location values.
Possible Fix
When distanceFilter
is zero or undefined the success callback should be called even if there hasn’t been a change on the location.
Context
I want to use the success callback not only to update the user location on a remote web service, but also to update the last date (and time) in which the app worked.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Ajax success callback- DOM not updating - Stack Overflow
The question asked, "When I change the DOM in JavaScript and view the source it hasn't been changed, Why?" The answer is that...
Read more >jQuery.ajax() | jQuery API Documentation
success callback option is invoked, if the request succeeds. It receives the returned data, a string containing the success code, and the jqXHR...
Read more >New features & announcements - Google Ads Help
This change will not affect campaign features or functionality, and there's no action required for existing campaigns. You'll start to see the new...
Read more >Auto refresh table using ajax - Carlino Edilizia
So let's create using bellow sql query: item table: CREATE TABLE IF NOT EXISTS `posts` (`id` ... as it's called even when the...
Read more >Not Hearing from Employers About Your Applications? Here's ...
There's probably a reason why your job applications aren't getting a response. If you're not hearing from employers, here's what could be happening....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi Got the same problem, @guillermo-varela @mauron85 - interval set to 30 seconds, but the callback function is getting called every two minutes, and sometimes not at all.
@t1a2l How did you solve it ??