WPI Computer Science Department

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

CS 528, Fall 17 Project 3: Recognizing Activities with Android Sensors, (10/100 of course grade)
Due date: Thursday, October 26 by class time

Overview

The aim of this project is to get you familiar with Android Sensors, specifically the activity recognition API. You will also explore GeoFences and Android Maps. You should do the project in your groups of 3 or 4 students.


Project Preparation

Step 1: Review Slides for Lectures 5 - 6

Step 2: Review the following tutorial on Activity Recognition

[ How to recognize user activity with activity recognition ]

Step 3: Get Activity Recognition Working

Download the code for the activity recognition tutorial above, open it in Android Studio, compile it and get it to run on a real phone. Remember that real phones are required to run sensor code. Study the code.

Step 4: Get GeoFencing Working

Review the following tutorials on geoFencing and get them working.

Step 5: Implement step counting

Implement the simple step counting algorithm we covered in lecture 6 of the class. Don't use the Android step counter. Write your own!

Project Requirements

You are to develop an app that continously recognizes 3 of the user's activities (walking, running, and still). Whenever an activity is recognized, an appropriate picture is displayed and text describing the activity is displayed as well. Display the following images corresponding to the activities:

[ Running ]
[ Still ]
[ Walking ]

Whenever a user switches to a new activity, a toast pops up displaying how long the last activity lasted. For instance, if the user was walking and became still, a toast may pop up announcing "You have just walked for 1 min, 36 seconds".

Set up 2 GeoFences at the following locations:

Your app keeps a running total of how many times the user entered each of these geofences and displays them. The user must take 6 steps in each geofence before it increments the counter. If the user does not take 6 steps inside the geofence, the counter is not incremented. Once the user has completed 6 steps inside the geoFence, a toast may pops up announcing "You have taken 6 steps inside the Gordon Library Geofence, incrementing counter". Display a similar message for the Fuller labs geoFence.

Display a map of your current location at the top of the screen. The final app screen should look like the screen below.





Submitting Your Work

Capture a video 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 [ Instruct Assist ] . 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 zip file according to the convention LastName1_LastName2_LastName3_hw3.zip, listing all team members' last names. Your submitted zip file for submission should contain the following folders/files:

\team.txt
\src\
\demo.mp4
\hw3.apk

The contents of team.txt should list team members as follows:

Username, Last Name, First Name
emmanuel, Agu, Emmanuel
msmith, Smith, Mary

Phone tested on: Google Nexus 5 Smartphone
Zoolab machine tested on: PC 16


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

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

mailto:emmanuel@cs.wpi.edu