Final Project for CS5520
ThingsHub is an mobile software that can track everything of everyday via 'Things Calendar'.
Yaning Ding: 25%
Yiman Liu: 25%
Zixin Zhao: 25%
Jiandong Zhang : 25%
-
Login Page
User can either login or create via same button to get into our app.
-
Account Page
Users can modify their personal information here, and I visit friends or profile page.
Upload avatar via photo libraries or camera like this: (Camera Sensor Usage)
-
Friends Page
People can visit their friends to see theirs' activities, can add friend via add button.
-
Profile Page
This is the most important page of our app, we can track every details of everyday here:
User can add things via add button:
Where colors can picked via color picker:
App also track location to record things happened, but user can deny this permission request:
A full thing should be like:
After adding, the page would be:
We can long press some thing to make it completed:
The colors would also change based on the completion date.
we can also visit friends' profile page.
Sensor Usage: Camera, GPS
DB URL: ThingsHub – Firebase console (google.com)
Database User Graph
Users
- User1(UserName, unique)
- History
- Date(unique)
- First Thing Name : Thing Structure
- Second Thing Name : Thing Structure
- ...
- Date (must not be empty)
- ...
- Date(unique)
- Things
- Thing Name ( unique ) :
- StartDate: Date
- EndDate: Date
- isCompleted: Boolean
- color: int
- longitude: double
- latitude: double
- Thing Name ( unique ) :
- History
- User2(UserName, unique)
Class
public class User{
private String userName;
private Map<String, List<Things>> history;
private List<Thing> things;
private List<String> friends;
}
public class Date implements Comparable<Date>{
private int year;
private int month;
private int day;
public String toKey(){ //==> same as toString()
return year+"-"+month+"-"+day;
}
}
public class Thing {
private String thingsName;
private Date startDate;
private Date endDate;
private Boolean isCompleted;
private int color;
private double longitude;
private double latitude;
}
-
createUser(userName):boolean
: create an user with password, return true if successfully created, return false if user was already existed.Usage:
Server.getInstance().createUser(userName, created->{});
-
checkUser(userName, exist):boolean
: check if user is valid, return true if user is valid.Usage:
Server.getInstance().checkUser(userName, exist->{});
-
addThing(Things):void
add thing to current user;Usage:
Server.getInstance().addThing(someThing:Thing);
-
getThings(userName):ArrayList<Things>
: return things of given user, return null if current user is not exists.Usage:
Server.getInstance().getThings(userName, things->{});
-
filterThings(List<Thing> things, isCompleted)
: filter all the things from giventhings
thatisCompleted
is given.Usage:
filteredThings = Server.getInstance().filterThings(things, true/false);
-
filterThings(things, startDate)
filter all the things from giventhigns
that have an end date after givenstartDate
.Usage:
filteredThings = Server.getInstance().filterThings(things, some date);
-
getFriends(userName, callback)
: get friends of given user.Usage:
Server.getInstance().getFriends(userName, friends->{});
-
addFriend(userName)
: add given user as a friend to current user.Usage:
Server.getInstance().addFriend(userName);
-
markCompleted(thing:Thing or thingName: String)
: mark some thing as done, automatically added to historyUsage:
Server.getInstance().markCompleted(thing, true/false);
-
getHistory(userName, callback)
: get history of given user as a Map<Date, List>;Usage:
Server.getInstance().getHistory(userName, history->{});
-
mixColor(things)
: mix all the colors of giventhings
to one color, temporarily return as an integer. (May add hex-decimal conversion in the future) -
getAddress(context, location)
: get accurate address -
mixColor(List<Thing> colors)
: mix these colors with equal opportunity.