capacitor-community / background-geolocation

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

distanceFilter battery consumption #106

Closed loicrob closed 11 months ago

loicrob commented 11 months ago

Hi,

This is more a question than an Issue report, but I didn't know where to ask it, sorry if it is inappropriate.

For a Ionic app project, my teammate and I want to detect and record rides. To do so, for the moment, we use the Background Geolocation watcher of this plugin as follows:

We noticed that the first watcher consumes battery, especially during the night (~30% consumed) and we were wondering if it would be a better way to constantly watch the accelerometer to detect new rides, in order to save battery.

Here are the questions:

Thanks for helping, Best regards

diachedelic commented 11 months ago

I actually don't know whether the OS uses accelerometer data. Here are the relevant sections for Android and iOS if you want to dig deeper.

You might want to look into geofencing, that will be far more battery efficient than constantly monitoring GPS.