seididieci / capacitor-backround-geolocation

Ionic capacitor backgroung geolocation Plugin
MIT License
12 stars 2 forks source link

updateInterval not updating when passing different value when initializing #12

Closed SebaBeltran closed 3 years ago

SebaBeltran commented 3 years ago

Describe the bug When initializing with updateInterval: 30000 it doesn't update location every 30 seconds, instead get the location every 5 seconds or so.

To Reproduce Initialize the plugin with different value other than 10000 and check in the console every new location.

Expected behavior Time between location logs show match the updateInterval value.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

seididieci commented 3 years ago

HI, I checked the code and noticed a typo in typescript definitions: updateInteval => updateInteRval... I'm correcting it but i have to make a precisation on this value:

It sets the updateInterval Android location request option and, for convention, it sets the fastestInterval at half of this value.

I could add another property to the configuration object but I wonder if it will make it too complicated, the two values are actually correlated.