OneBusAway/onebusaway-android — pull request #57 by barbeau (2013-06-05 22:13:39+00:00)
Title: Implements full multi-region functionality (Issue #37)

Fix Issue #37 - Implements the ability to automatically switch between different OBA servers, using the [Regions REST API](https://github.com/OneBusAway/onebusaway/wiki/Multi-Region).

Noteworthy items:
* Current default behavior is that the app will automatically retrieve the contents of the Regions REST API weekly, on app startup (i.e., this is *not* monitored in the background). Default behavior also includes an auto-selection of the correct OBA region on startup (i.e., you could travel from one OBA city to another, and it should automatically show OBA stops nearby when you open the app). On first startup the user is shown a ProgressDialog while the initial region list is retrieved, but after this the checks occur silently in the background to avoid interrupting the user experience of the app.
* For existing Puget Sound users - the only visible difference that most users will notice is the initial ProgressDialog "Detecting regions, please wait..." while the initial regions list is retrieved. After this, the app experience should be identical.
* Preferences for enabling/disabling Region auto-selection and weekly Region auto-updates are included in the Preferences screen. These are included to allow the users to opt-out of each, in case there are unexpected problems with determining the closest OBA server due to wacky locations on some devices.
* Entering a custom API URL via "Preferences->OneBusAway API Server" will override all region settings, and this is the OBA server that will be used. When this field is cleared by the user, the app returns to default behavior of auto-selecting regions.
* For the "My Routes" and "My Stops" lists (for recent/starred items), only the recent/starred items for the currently selected region will be shown. For backwards compatibility, recent/starred items entered in previous versions of OBA (i.e., with region_id column = NULL) will also be shown. If a custom API URL is entered by the user, all recent/starred items for all regions are shown (including those with region_id column = NULL). The behavior of "My Reminders" is not modified, so all reminders for all regions should always be shown on this screen, and all reminders should notify users as before.
* A workaround for onebusaway-application-modules [Issue #59](https://github.com/OneBusAway/onebusaway-application-modules/issues/59) is included, so that the app can still detect out-of-range devices without explicitly getting that field from the server
* These improvements have been tested as a fresh install. They have NOT been tested as an install over an existing version of OBA. Additional testing is needed to ensure that we're not inadvertently deleting users existing favorites, settings, etc.
* App version in AndroidManifest has not been altered, so the version will need to be bumped before release.

@paulcwatts - I'd like to get your feedback on this version of the app first, and then if you're happy with it I'd like to get a version signed with the production key out to a limited group of beta testers via me, UW, and GA Tech so we can get the QA started.