Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The spinner is implemented using Android's drawing APIs to draw wedges of a circle on a canvas, and draw text on top. The backend keeps track of the amount of rotation applied so far, and drawing is done relative to that amount of rotation. The spin animation is achieved by increasing or decreasing the degree rotation at timed intervals, and redrawing the wheel. A swipe gesture is detected by dividing the screen into quadrants and waiting for a finger-swipe that starts and ends in adjacent quadrants.
  • The victor is determined by precomputing the final wheel spin once the user starts spinning the wheel, and computing which wedge is under the pointer drawn on the screen when the wheel is in its final location. The winner is predetermined so that a user can't game the system by trying to stop the wheel in a particular position.

Restaurant Details

  • Restaurant choices and details are gathered by searching the Yelp API. Each search starts with one call to the Yelp API, with the parameters for location and cuisine. The API does not directly return price information, so restaurants are filtered by price by scraping their Yelp info pages for price information.
  • We use a die (instead of the generic star representation) to show the restaurant ratings and location, which are widely like by users (“It’s so cute!”).
  • We use the standard style and style of a hyperlink to suggest that the texts for phone number and address are tappable.
  • We use standard dial activity of Android to place phone calls and Google map Android API to pinpoint locations.

...