SlideShare a Scribd company logo
1 of 11
A restaurant suggestion android app
BY TEAM 5:
JAGATDEEP ANAND, ALEX BROWN, ERIC BLACK, IVAN GONZALEZ,
DAVID KARAPETIAN, NICU LISTANA, and ANTHONY WONG
Füd5 is...
❖An Android app that
helps users choose a
restaurant
❖Press the FuD Plz
button to get results
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)
Restaurant Selection Algorithm
Utilizes:
❖User Input
❖Randomization
❖Timestamp
Restaurant Selection Algorithm
Step 0: Yelp Query Result
1 private class GetResultTask
2 extends AsyncTask<String, Void, RestaurantList> {
3 @Override
4 protected RestaurantList doInBackground(String... params) {
5 try {
6 return new RestaurantApiClient.Builder(mYelpKey)
7 .location(location)
8 .sort(RestaurantApiClient.SortBy.BEST_MATCH)
9 .term(searchTerm).radiusFilter(maxRadius)
10 .build().getRestaurantList();
11 } catch (Exception e) { return null; }
12 }
13 }
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
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
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
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;
}
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;
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.

More Related Content

Viewers also liked

Местная и региональная авиация
Местная и региональная авиацияМестная и региональная авиация
Местная и региональная авиацияСергей Абдыкеров
 
Comportamiento de compra del consumidor
Comportamiento de compra del consumidorComportamiento de compra del consumidor
Comportamiento de compra del consumidorsetmonasos
 
Баянхонгор аймгийн хөдөлмөрийн зах зээлийн судалгааны тайлан Ш.Чимгээ /Ph.D, ...
Баянхонгор аймгийн хөдөлмөрийн зах зээлийн судалгааны тайлан Ш.Чимгээ /Ph.D, ...Баянхонгор аймгийн хөдөлмөрийн зах зээлийн судалгааны тайлан Ш.Чимгээ /Ph.D, ...
Баянхонгор аймгийн хөдөлмөрийн зах зээлийн судалгааны тайлан Ш.Чимгээ /Ph.D, ...99447039
 
Daily Newsletter: 14th February, 2011
Daily Newsletter: 14th February, 2011Daily Newsletter: 14th February, 2011
Daily Newsletter: 14th February, 2011Fullerton Securities
 
Zelula amak-zuzenketak.ppt
Zelula amak-zuzenketak.pptZelula amak-zuzenketak.ppt
Zelula amak-zuzenketak.pptburlau voy
 
เรื่องเกี่ยวกับ โรงเรียนวิชาชีพ ในญี่ปุ่น
เรื่องเกี่ยวกับ โรงเรียนวิชาชีพ ในญี่ปุ่นเรื่องเกี่ยวกับ โรงเรียนวิชาชีพ ในญี่ปุ่น
เรื่องเกี่ยวกับ โรงเรียนวิชาชีพ ในญี่ปุ่นMatumit Sombunjaroen
 

Viewers also liked (8)

Местная и региональная авиация
Местная и региональная авиацияМестная и региональная авиация
Местная и региональная авиация
 
Comportamiento de compra del consumidor
Comportamiento de compra del consumidorComportamiento de compra del consumidor
Comportamiento de compra del consumidor
 
2 BÁSICO B
2 BÁSICO B2 BÁSICO B
2 BÁSICO B
 
Баянхонгор аймгийн хөдөлмөрийн зах зээлийн судалгааны тайлан Ш.Чимгээ /Ph.D, ...
Баянхонгор аймгийн хөдөлмөрийн зах зээлийн судалгааны тайлан Ш.Чимгээ /Ph.D, ...Баянхонгор аймгийн хөдөлмөрийн зах зээлийн судалгааны тайлан Ш.Чимгээ /Ph.D, ...
Баянхонгор аймгийн хөдөлмөрийн зах зээлийн судалгааны тайлан Ш.Чимгээ /Ph.D, ...
 
10 big issues on ce
10 big issues on ce10 big issues on ce
10 big issues on ce
 
Daily Newsletter: 14th February, 2011
Daily Newsletter: 14th February, 2011Daily Newsletter: 14th February, 2011
Daily Newsletter: 14th February, 2011
 
Zelula amak-zuzenketak.ppt
Zelula amak-zuzenketak.pptZelula amak-zuzenketak.ppt
Zelula amak-zuzenketak.ppt
 
เรื่องเกี่ยวกับ โรงเรียนวิชาชีพ ในญี่ปุ่น
เรื่องเกี่ยวกับ โรงเรียนวิชาชีพ ในญี่ปุ่นเรื่องเกี่ยวกับ โรงเรียนวิชาชีพ ในญี่ปุ่น
เรื่องเกี่ยวกับ โรงเรียนวิชาชีพ ในญี่ปุ่น
 

Recently uploaded

Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 

Recently uploaded (20)

Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
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)
  • 4. Restaurant Selection Algorithm Utilizes: ❖User Input ❖Randomization ❖Timestamp
  • 5. Restaurant Selection Algorithm Step 0: Yelp Query Result 1 private class GetResultTask 2 extends AsyncTask<String, Void, RestaurantList> { 3 @Override 4 protected RestaurantList doInBackground(String... params) { 5 try { 6 return new RestaurantApiClient.Builder(mYelpKey) 7 .location(location) 8 .sort(RestaurantApiClient.SortBy.BEST_MATCH) 9 .term(searchTerm).radiusFilter(maxRadius) 10 .build().getRestaurantList(); 11 } catch (Exception e) { return null; } 12 } 13 }
  • 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

  1. Feel free to insert it wherever you like -anthony.
  2. Feel free to insert it wherever you like -anthony.