WPI Computer Science Department

Computer Science Department
------------------------------------------

CS 403X, D term Project 3: Stepping out with Android Sensors and SQLite Databases, (9/100 of course grade)
Due date: Thursday, April 9 11.59PM!!


Overview

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.


Project Preparation

Step 1: Get Step Counting Working

The following program available [ HERE ] implements a step counter using the Android Sensor API. Download it, import it into Android Studio, compile it and get it to run on a real phone (e.g. your group's Nexus 5 phone). Remember that real phones are required to run sensor code. The app's screen should look like the following:




Project Requirements

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.


Submitting Your Work

Capture a video of THE LAST 2 min, 30 seconds of your running program. Make sure to double-check that everything works before submitting. Create a zip file containing your code, your APK and MP4 Video (Captured session) files. Submit your zip file using web-based turnin. Do not email me your program or submit it via dropbox. Before submitting MAKE SURE YOUR PROJECT'S APK FILE RUNS ON YOUR ANDROID PHONE Name your group's zip file according to the convention LastName1_LastName2_LastName3_hw3.zip.


[Feedback] [Search Our Web] [Help & Index]

[Return to the WPI Homepage] [Return to CS Homepage]

mailto:emmanuel@cs.wpi.edu