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.

Background Location Storage

See original GitHub issue

Hello,

i always get the same error when trying to call getLocations().

Retrieving locations failed code: 21: message: library routine called out of sequence

Here my config

this.backgroundGeolocation.configure(callbackFn, failureFn, {
                desiredAccuracy: 10,
                stationaryRadius:5,
                distanceFilter: 5,
                activityType: 'Other',
                debug: true, 
                stopOnTerminate: false 
            });
            this.backgroundGeolocation.start();

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
mauron85commented, Jul 4, 2016

After some thinking I came to this. Hopefully you will agree on this.

If option.url is not defined, all locations updates are recorded in local db. When App is in foreground or background in addition to storing location in local db, location callback function is triggered. Number of location stored in db is limited by option.maxLocations a never exceeds this number. Instead old locations are replaced by new ones.

When option.url is defined. Location updates are also stored in local db. In addition, each location is also immediately posted to url defined by option.url. If post is successful, the location is marked as deleted in local db. All failed to post locations will be coalesced and send in some time later in one single batch. <TO_BE_DEFINED>Batch sync takes place only as per interval defined in IntervalForBatchSync config option.</TO_BE_DEFINED>.

Is almost same as your suggestion. The difference is that location is stored into db at all times and also when url is set it is also immediately posted to server. Failed to post locations are coalesced and posted as single batch sync.

4reactions
mauron85commented, Jun 30, 2016

Currently no. Sorry. But I will probably release update soon.

If Url option is not defined, all locations updates when App is killed/Background/Foreground are recorded in local db. When App is in foreground or background in addition to storing location in local db, location callback function is triggered.

ok, it will be possible as soon I implement row limit on location table, so old location records will be replaced by newer ones. Without this db can grow very large, because people might tend to forget clean up db with deleteAllLocations…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Where is the current custom wallpaper stored in Windows 10?
Hi, A copy of the current wallpaper can be found in: %AppData%\Microsoft\Windows\Themes\CachedFiles.
Read more >
Path to current desktop backgrounds in Windows 10?
In Windows Photo Viewer, you can right click on the image & select Open File Location to view the original location of current...
Read more >
Where to Find the Windows Wallpaper Location on Your PC
1. Right-click on your desktop. 2. Choose Personalize. 3. It will take you to settings. Select Background.
Read more >
Here's Where Windows 10 Stores Its Default Wallpapers
Windows 10's default desktop wallpapers are stored in C:\Windows\Web. This folder usually contains subfolders named after different wallpaper ...
Read more >
Where does Microsoft Teams store virtual background images?
Navigate to the Teams default image backgrounds directory: C:\Users\<enter_your_windows_your_user_name>\AppData\Roaming\Microsoft\Teams\Backgrounds . Make a ...
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