CSC 413 - Software Development
Summer 2015
Student Project Presentation Slides
San Francisco State University
Credits:
Jagatdeep Anand, Alex Brown, Eric Black, Ivan Gonzalez,
David Karapetian, Nicu Listana, and Anthony Wong
Full source code available here: https://github.com/awong9/t5
Project documentation available here: http://issuu.com/niculistana/docs/team5writeup?e=18658229/14771110
For more information and distribution permissions, please e-mail Mark Sosnick at: msosnick@sfsu.edu
A Secure and Reliable Document Management System is Essential.docx
Füd5, A restaurant suggestion android application
1. A restaurant suggestion android app
BY TEAM 5:
JAGATDEEP ANAND, ALEX BROWN, ERIC BLACK, IVAN GONZALEZ,
DAVID KARAPETIAN, NICU LISTANA, and ANTHONY WONG
2. Füd5 is...
❖An Android app that
helps users choose a
restaurant
❖Press the FuD Plz
button to get results
3. The Result Screen
❖ Restaurant
Image/Rating
Uses Yelp API
❖ Menu Button
Displays a
restaurant menu
from Locu if
available
❖ Map Location
Uses Google
Maps API
❖ Info Button
Shows full address,
phone#/website, and
opening hours
❖ User Feedback
Lets user tell the app
whether they are
happy with the
suggestion (green) or
would like an
alternative (yellow/
red)
6. Step 1: Filter RedList and MinRating
1 for (int i = 0; i < mResultList.getSize(); ) {
2 if (mResultList.getRestaurant(i).getRating() < minRating ||
3 db.isRestaurantInList(mResultList.getRestaurant(i),
4 Constants.RED_LIST)) {
5 Restaurant removed = mResultList.removeRestaurant(i);
6 if (removed == null)
7 i++;
8 } else
9 i++;
10 }
Restaurant Selection Algorithm
7. Step 2: Weigh restaurants
1 for (int i = 0; i < mResultList.getSize(); i++) {
2 randomNum = rand.nextInt((100 - 1) + 1);
3 Restaurant r = mResultList.getRestaurant(i);
4 if (db.isRestaurantInList(r, Constants.GREEN_LIST)) {
5 randomNum *= 1.15; }
6 else if (db.isRestaurantInList(r, Constants.YELLOW_LIST)) {
7 Timestamp timestamp = Timestamp.valueOf(db
8 .getRestaurantTimeStampFromList(r, Constants.YELLOW_LIST));
9 long timeElapsed = System.currentTimeMillis() - timestamp.getTime();
10 final long ONE_WEEK_IN_MILI = 604800000;
11 randomNum *= (0.6 + 0.4 * timeElapsed/ONE_WEEK_IN_MILI);
12 }
13 mResultList.getRestaurant(i).setWeight((int) randomNum);
14 }
Restaurant Selection Algorithm
8. Step 3: Top Restaurant is displayed
1
2 if (mResultList.isEmpty()) return;
3 int largest = 0;
4 for (int i = 0; i<mResultList.getSize(); i++) {
5 if (mResultList.getRestaurant(i).getWeight() > largest) {
6 largest = mResultList.getRestaurant(i).getWeight();
7 mReadResult = mResultList.getRestaurant(i);
8 }
9 }
Restaurant Selection Algorithm
9. How are images preloaded? Part One
❖ Load image in the background(AsyncTask)
protected Bitmap doInBackground (URL... imageURL){
// Open an InputStream
// Decode it using BitmapFactory
}
❖ Store it somewhere once it’s loaded
protected void onPostExecute(Bitmap result) {
nextImage = result;
}
10. How are images preloaded? Part Two
❖ Make sure it’s loaded when you use it!
if(nextImage!=null){
//display nextImage
} else {//load the image}
❖ Finally, empty out the store.
nextImage = null;
11. Extra Features
❖ Locu
➢Menu
➢Hours
❖ Uber
➢Push Let’s Go!
■ Choose between opening Maps
Directions or Uber
➢Choosing Uber
■ Füd5 checks device for Uber app.
■ If Uber isn’t installed, it’s opened in
browser.
Editor's Notes
Feel free to insert it wherever you like -anthony.
Feel free to insert it wherever you like -anthony.