mauron85/cordova-plugin-background-geolocation

forceSync in headlessTask

Closed this issue · 2 comments

Your Environment

  • Plugin version: v3.0.3
  • Platform: Ionic 4 > Android
  • OS version: 9
  • Device manufacturer and model: Samsung Tab 10.1 2019
  • Running in Simulator:

  • Cordova version (cordova -v): 9.0.0 (cordova-lib@9.0.1)

  • Cordova platform version (cordova platform ls):
    Installed platforms:
    android 8.1.0
    Available platforms:
    browser ^6.0.0
    electron ^1.0.0
    ios ^5.0.0
    osx ^5.0.0
    windows ^7.0.0

  • Plugin configuration options:

  • Link to your project:

Context

I dont know if it is a bug or even possible but I could not find any information about this online.

Expected Behavior

I want to forcesync pending locations in the headlessTask. The locations sync are working normally, even when the app is killed, but if the device lost internet the pending locations will not be sync after find connection again.

Actual Behavior

nothing append

Possible Fix

Steps to Reproduce

this.backgroundGeolocation.headlessTask(function(event) {
    this.forceSync();
});

Context

Debug logs

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale commented

This issue has been automatically closed, because it has not had recent activity. If you believe this issue shouldn't be closed, please reopen or write down a comment requesting issue reopening with explanation why you think it's important. Thank you for your contributions.