j4velin / Pedometer

Lightweight pedometer app for Android using the hardware step sensor
https://play.google.com/store/apps/details?id=de.j4velin.pedometer
Apache License 2.0
1.44k stars 672 forks source link

Use activity recognition to filter invalid steps #42

Open M66B opened 10 years ago

M66B commented 10 years ago

"On foot" is reliably detected in about 30 steps: http://developer.android.com/training/location/activity-recognition.html

This will prevent steps from being counted while driving and on bicycle.

M66B commented 10 years ago

This would also solve #6 and even without user intervention.

j4velin commented 10 years ago

I assume the step sensor already does that. Also you can not send the request for those update from a service but only from an Activity

M66B commented 10 years ago

Unfortunately the step sensor doesn't do this, resulting in many false steps while bicycling and driving.

You can send the activity recognition events to a service. Check this source for how to: https://github.com/M66B/ActivityTracker/blob/master/src/biz/bokhorst/activitytracker/BackgroundService.java

thelou1s commented 1 year ago

@M66B Hi, Did you tried the combine method: activity recognition + On foot?