BasicAirData / GPSLogger

A GPS logger for Android mobile devices
http://www.basicairdata.eu/projects/android/android-gps-logger/
GNU General Public License v3.0
403 stars 126 forks source link

Adjust logging rate based on the DetectedActivity API #206

Open kuro68k opened 1 year ago

kuro68k commented 1 year ago

The DetectedActivity API allows the app to respond to changes in activity, like going from sill to walking, or getting in a vehicle.

By adjusting the logging rate based on the current activity, significant battery savings could be made for people who like to keep logging for long periods of time.

https://developers.google.com/android/reference/com/google/android/gms/location/DetectedActivity

GrazianoCapelli commented 1 year ago

Unfortunately we cannot use the DetectedActivity API because it is part of Google Play Services: we chosen to make an app that doesn't depends on any of them. Anyway, we could implement an automatic logging adjustment basing on the type of activity, that could be detected basing on speed and other GPS information (the app already implements a basic activity recognition algorithm).

kuro68k commented 1 year ago

Thanks @GrazianoCapelli. Any implementation would be good. Maybe you could also use the device accelerometer to detect one of the most common situations where updates are unnecessary: the device is still, e.g. sat on a desk.