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.

Plugin sleep ~60 seconds

See original GitHub issue
  • Plugin version: 2.2.5
  • Platform: Android
  • OS version: 4.1, 6.0
  • Device manufacturer and model: xiaomi redmi note 4, lenovo p770
  • Cordova version: 6.4.0
  • Cordova platform version (cordova platform ls): android 6.0.0
  • Plugin configuration options:
var config = {
        stationaryRadius: 10,
        distanceFilter: 20,
        desiredAccuracy: 10,
        debug: debug,
        notificationTitle: 'Background tracking',
        notificationText: 'enabled',
        notificationIconColor: '#FEDD1E',
        notificationIconLarge: 'mappointer_large',
        notificationIconSmall: 'mappointer_small',
        locationProvider: 0, 
        interval: duringCoordinateRequestTrack * 1000,
        fastestInterval: 2000,
        activitiesInterval: duringCoordinateRequestTrack * 1000,
        stopOnTerminate: false,
        startOnBoot: false,
        startForeground: true,
        stopOnStillActivity: true,
        activityType: 'AutomotiveNavigation',
        pauseLocationUpdates: false,
        saveBatteryOnBackground: false,
        maxLocations: 10
 };

Hello. When i run:

backgroundGeolocation.configure(successBackgroundGeolocation, failureBackgroundGeolocation, config);
backgroundGeolocation.start();

plugin get first coordinate and sleep ~60sec. Then continues to read the coordinates. What is the pause? How disable this pause?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mauron85commented, Mar 19, 2017

It is not just that. It is how this provider was designed (to save battery power). You already provided link to the explanation, so I’m not going to repeat it. Just read it and you’ll get it. Basically location updates frequency depend on your speed.

0reactions
alexandretokcommented, Dec 12, 2017

I’m having the same issue with version 3.0.0-alpha.8. When the app goes to background, the gps is turned off and after 60 seconds it is turned on and the plugin starts tracking normally.

How can we avoid this 60 seconds pause? Any updates?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make a plugin wait/sleep for X milliseconds | SpigotMC
In my latest plugin I need there to be a pause between actions. So far I've always used this, where x is time...
Read more >
Better Sleeping Plugin | Minecraft Plugins - YouTube
Minecraft bed plugin. Better sleeping plugin for minecraft is one of the best! Check it out below.
Read more >
Overview - SinglePlayerSleep2 - Bukkit Plugins - Projects
# Set the time limit in seconds which a player must wait between attempting to sleep again. # This prevents a user from...
Read more >
sleep | FlexGet
Sleep during the specified task execution phase. ... each plugin operates can be seen by running the following command from the command ......
Read more >
Sleep filter plugin | Logstash Reference [8.5] - Elastic
The amount of time to sleep is computed by subtracting the previous event's timestamp from the current event's timestamp. This helps you replay ......
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