question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Success callback not called if location hasn't changed

See original GitHub issue

Your 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:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
t1a2lcommented, Jun 22, 2017

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.

0reactions
VaishaliRavindrancommented, Mar 20, 2018

@t1a2l How did you solve it ??

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found