Skip to content

Instantly share code, notes, and snippets.

@HanCheng
Last active August 29, 2015 14:14
Show Gist options
  • Save HanCheng/ff8f4957ef3fc57048a4 to your computer and use it in GitHub Desktop.
Save HanCheng/ff8f4957ef3fc57048a4 to your computer and use it in GitHub Desktop.
FLT-2240 Solutions to Urgency messaging- Android
Overview:
Get the cached fare information from API and compare with the lowest price to decide whether to show price going up or down message.
Approaches:
1. Using PopupWindow.class to show urgency message
2. Adding new layout file of the popupWinwod and inflating this layout file
3. Adding new model of LastCachedFare and Fetching values of last_cached_fare from API
4. Using logic to decide to show the urgency message, conditions can be:
a. 24 hours timestamps
b. variables in last_cached_fare != null
c. the fare difference should be in the right range, between the min and max value
5. using popupWindow dismiss() to ease urgency message
i. After 5 seconds
ii. If user taps filters/sorts
iii. If user taps an itinerary
iv. If user taps any ad (e.g., CheapOAir click to call)
@ksarmalkar
Copy link

  1. You will have to customize the popup window show/dismiss animations, since we need slide in / slide out effect.
  2. How will the LastCachedFare be referenced ? Will it be part of some other class like FlightSearch / ItinerarySet ?
  3. Where are you planning to save the timestamps ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment