The aim of this project is to get you familiar with Android Sensors, specifically Step Counting. You will also explore SQLite databases, Android Maps and displaying a toast.
You are to develop an app that counts the smartphone users steps
for 8 minutes. The app continuously tracks the user's steps
for each 1-minute segment (8 segments in total). Create a
SQLite database where the app stores the user's step count
per 1-minute segment.
So, for instance, the step counter is initialized to 0 for
the segment 1. Steps are counted, displayed in a TextView
and then stored in the SQLite database after the first 1
min. Then the counter is reset to 0 and the steps for
segment 2 are counted and stored to the database and so
on. After the steps for the
last segment (8th segment) finish counting, the app calculates
the total number of steps taken and displays the total steps.
So, the final display will have a stack of TextViews displaying
the step count for each 1 minute segment and 1 TextView
displaying the total steps at the bottom.
Note that the steps taken during the currently counting segment
changes in real time (i.e. you can see the steps incrementing
as you walk), while all previous segments display
a static count of the steps taken during that segment.
For instance, if segment 3 is currently counting, then
its step count increases as the user takes steps. The
step counts for segments 1 and 2 will just display
the steps counted during those segments.
After each segment completes, a toast pops up displaying
a message announcing the total steps taken in that
segment. For instance, when segment 2 finishes counting,
a toast pops up announcing "You took 146 steps in segment 2".
So, in total, 8 toasts will be displayed.
Display a map of your current location at the top of
the screen. The map should just show the user's current
location. It does not need to show the user on the map
or the path taken during their walk. i.e. If the user
walked around Fuller labs, the map should just show
Fuller labs and surrounding region on a map. But the
user and their path around Fuller labs do not need to
be indicated on the map. The map should be displayed
from the beginning of the app (when the app starts running).
The final app screen should look like
the screen above.