Technical Reference Manual

Study Buddy

Created by James Hollowell and Connor Kinzie

Clemson University

CPSC 4820 Android Development

Last Edited 4/25/2017

Table Of Contents

Introduction 2

Functionality 3

Technical Features 4

Database Design 5

Database Description 6

Database Schemas 6

PHP Scripts and Authoring Tool 8

Authoring Tool 8

PHP Files 8

Introduction

The purpose of this application is to help college students find friends to study with on Clemson’s campus, but hopefully more locations will be available as the app becomes more robust. The app will begin by allowing a user to make a list of friends by searching for their friends’ usernames in a search bar. Once both parties have agreed to become friends, they can begin sharing locations. Using GPS tracking, the app will detect when a user stops by a given building and ask the user whether or not they want to share their location with their friends. It will also prompt the user to enter a more exact location than GPS allows, such as the 5th floor of Cooper by Starbucks. Then it will display a list of friends at that location, along with details such as their more specific location and how long they will be there. At any time, a user can search for the location of their friends, but when they walk within range of a building, the app will actively ask if they wish to find friends.

Functionality

1.  Location Detection

a.  The app will detect when a user has entered a preprogrammed location and ask if they wish to find friends or let others know their location.

2.  Specific Location

a.  The app will allow users to select or enter a more specific location.

b.  Example: Rather than just being “In the Library”, a user can specify that they are on the 5th floor in Starbucks.

3.  Make Friends List

a.  Make friends by searching for usernames in a search bar. A request gets submitted and you become friends when they accept your request.

4.  Finding Friends

a.  Find friends based on general location and see their specific location.

5.  Location Pin Drop

a.  Allows the user to drop their location at a specific GPS coordinate instead of just using the built in locations.

6.  Time in location

a.  The app will prompt the user to enter what time they plan on leaving their study spot. When other users open the app to find their friends, the app will warn the user if their friend will only be in their location for another 10 minutes or less.

b.  This will allow people to go take their friends spot if the location is busy, or go find other friends who are staying longer.

7.  Privacy

a.  The app will allow the user to utilize 2 different privacy settings. The first is to only make their location visible to their confirmed friends. The second setting is to go invisible and hide their location from all users.

8.  Study Groups

a.  The app will allow users to create and invite users into a study group. It will allow all members to know exactly where to meet and who has arrived to the meeting location.

Technical Features

The app uses GPS to track a user’s specific location as they walk around. It also utilizes push notifications to notify users when they can find their friends. Finally, the app uses a few different APIs to accomplish various tasks. The Firebase API is used to simplify the login process and allow users to login through Facebook, email, or their Google account. We also have utilized the Google API for location tracking. Picasso is being used for retrieving and displaying users’ profile pictures (found through logging in with Google or Facebook).

Database Design

Database Description

Both our internal and external databases contain four tables:

1.  Locations

a.  The location table stores the list of predefined study locations. Each location has a name, longitude, latitude, and a radius from the specified point.

2.  Sublocations

a.  The sublocations table stores a list of more specific locations associated with a larger study location. These sublocations could a specific floor of a building or an easily identifiable landmark.

3.  Users

a.  The users table stores a list of all the application users. Each user has a username, password, full name, timestamp of the last login, a location, and other information related to their location, such as sublocation, duration of studying, and any extra notes to share with friends.

4.  Friends

a.  The friends table stores a list of relationships between two users. The table contains the ID’s of the two users, and whether they are confirmed friends or the friend request is pending.

Database Schemas

External Database Internal Database

PHP Scripts and Authoring Tool

Authoring Tool

The authoring tool allows for app managers to add study locations to the app. Managers enter a location’s name, longitude, latitude, and radius. They also receive the option of entering some predefined sub locations for a location. The URL for the authoring tool is as follows:

https://people.cs.clemson.edu/~jthollo/4820/projects/proj/

PHP Files

API Files

●  Friend

○  Confirm.php - confirm a friend request

○  Delete.php - delete a friend request or unfriend a user

○  Getall.php - get all the friends and requests for a given user

○  Request.php - create a new friend request

○  Search.php - search for friends by name

●  Locations

○  Sub.add.php - add a sublocation

○  Sub.delete.php - delete a sublocation

○  Sub.edit.php - edit a sublocation

●  Sync

○  Firsttime.php - get all (sub)locations

○  Getnew.php - get only newly changed (sub)locations

○  Latest.php - get the timestamp of the latest changed location and sublocation

●  User

○  Firebase_login.php - login using firebase, possibly for the first time

○  Set_location.php - set the user’s location

○  Set_sub_location.php - set the user’s sublocation

Authoring Tool

●  Index.php - list locations and provide links to add/edit/delete

●  Add_loc.php - add a new location

●  Edit_loc.php - edit locations and their sublocations

●  Delete_loc.php - delete a location

4/25/2017