Android Step Counter/Pedometer

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.

AI2_Step_Setup

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.

AI2_Step_blocks

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

Set_Screenshot

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s