capacitor-community / background-geolocation

A Capacitor plugin that sends you geolocation updates, even while the app is in the background.
MIT License
185 stars 57 forks source link

Setting interval time #1

Closed ramazanapa20 closed 3 years ago

ramazanapa20 commented 3 years ago

image

Hi, we use this plugin in our ionic/react project. It's working great but , we need set location every 30 seconds. In plugin default 1 second. We need property like setInvertal method.

Thank you.

diachedelic commented 3 years ago

iOS does not provide a time interval filter, but both iOS and Android provide a distance filter. I want to keep behaviour consistent across platforms, so I would prefer to implement the latter. Would you consider using a distance filter instead?

Zackery747 commented 3 years ago

Hello, @diachedelic. Great Plugin! Would you still consider adding the distance filter?

diachedelic commented 3 years ago

@Zackery747 yes, if that is something you would find useful.

ramazanapa20 commented 3 years ago

I made my own filter using trigger. But plugin send every 1 second. It's bad for charging on our phones :)

Zackery747 commented 3 years ago

@diachedelic I would find it super useful, as I need to track my users when they move around. The functionality I'm looking for is something that will get a new location if the user moved an X amount of meters from their last location without consuming a lot of battery power.

Anything similar would also be great. Thank you!

diachedelic commented 3 years ago

Available in v0.3.5

Zackery747 commented 3 years ago

Thanks for adding the distance filter. I tested it this morning and it works great !!!