You can make a super simple Android step counter or pedometer application using App Inventor. App Inventor is a free Web based Android programming environment.
In the Designer screen we used the User Interface palette to layout 4 labels and 2 buttons. To help with the layout a TableArrangement component can be used.
Most of today’s smart phones have a built pedometer. In the Sensor palette the non-visible pedometer component is the software piece that connects to the phone’s pedometer hardware.
The next step is to use the Blocks page to add the required logic. The smart phones pedometer hardware is running in the background, so we added 2 buttons. One button to reset the pedometer count and the second button to pause and resume the pedometer counter.
The pedometer component has a WalkStep event, this event is used to update the distance and steps labels. Below is the full logic for our application.
The final application should look something like the screenshot below. With our basic step counter logic we thought that some future features could include:
- Daily summaries
- GPS and Map data
- Hiking information
One thought on “Android Step Counter/Pedometer”
un bon exemple pour commencer , explications simples mais claires .Merci …