futurice/festapp-android — pull request #94 by dwarfcrank (2014-04-12 18:44:51+00:00)
Title: Allow overriding API URLs (Issue #13)

API URLs are loaded from assets/url_overrides.json. If this file is not found or has overrides only for specific URLs defaults will be used where appropiate.

Example, replacing only the website base URL and leaving everything else intact:
```
{
"website_base_url" : "http://my-own-festapp-server.herokuapp.com"
}
```

JSON was chosen as the file format to simplify parsing as parsing XML is much more complex with zero benefit over plain JSON. The URLUtil class is a singleton but accessing its instance requires a Context object for (possible) initialization and to avoid having to subclass Application separately to get hold of a Context.