aalto-trafficsense / regular-routes-client

"Learning Regular Routes" -client
MIT License
0 stars 0 forks source link

Power-saving when device is still #29

Closed MJRinne closed 9 years ago

MJRinne commented 9 years ago

When activity recognition reports that the phone is "still", the "still"-condition could be logged only once and location sensing could be relaxed until movement is detected again.

Some hysteresis (e.g. phone still for 30 seconds) is needed to avoid toggling the location provider constantly on and off.

ktkarhu commented 9 years ago

I implemented a new ActivityFilterProbe that starts/stop between movement/still and FusedLocationProbe is a StateListener for it and basically follows the state. Whereas Accelerometer and OrientationProbes use ActivityFilterProbe as a schedule and thus collect data for specified duration whenever filter sends any data. I will test this for few days to ensure that everything works as expected.