Skip to content

Like android-step-counter-demo but uses Sensor.TYPE_STEP_DETECTOR for simplicity.

Notifications You must be signed in to change notification settings

fullStackOasis/android-step-detector-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This implements a super simple step counter.

The service uses `Sensor.TYPE_STEP_DETECTOR`, not `Sensor.TYPE_STEP_COUNTER`. The former is simpler to deal with for something like a pedometer because it just sends a signal every time it detects a step. You don't have to worry about offsets when counting steps. With `Sensor.TYPE_STEP_COUNTER`, a running total of steps since boot time is returned.

Communication between the Activity and the Service is done in a dead simple way using SharedPreferences. Quick and easy, but not necessarily performant.

About

Like android-step-counter-demo but uses Sensor.TYPE_STEP_DETECTOR for simplicity.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages