Skip to content
elihart edited this page Mar 21, 2013 · 4 revisions

Overview

The CompanyList class provides static methods that help with retrieving information on companies from the server

Features

  1. syncListWithServer(Context) - This method retrieves the list of available companies from the server and saves it as a local file in the private application space of the provided context. This is done asynchronously in the background. If the server cannot be reached the local file is unchanged.
  2. getCompanyList(Context) - This method retrieves the local list of companies, parses it, and returns an ArrayList of Strings representing each company name.
  3. getCompanyLogosFromServer(String) - This method takes a company name in the form of a String and returns an ArrayList of bitmaps. This list is populated asynchronously with all the available logos for the given company name. Since this is asynchronous it can take some time before the list is fully populated (~1 sec or more depending on image size and quantity of logos) and immediate usage of the list might not show all available logos.

Bugs

  1. getCompanyLogosFromServer currently uses hardcoded test urls. There is not yet a system in place to retrieve actual logo urls from the server.

Planned Features

  1. Provide more methods for interacting with company data such as grabbing company profiles, current rewards/promotions, etc.
Clone this wiki locally