17.07.2015 Views

OCTranspoLive: A live OCTranspo GPS bus location application for ...

OCTranspoLive: A live OCTranspo GPS bus location application for ...

OCTranspoLive: A live OCTranspo GPS bus location application for ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1.2.3 <strong>OCTranspo</strong> Developer API<strong>OCTranspo</strong> on March 22nd, 2012 opened its <strong>live</strong> <strong>GPS</strong> <strong>bus</strong> <strong>location</strong> API to developers.I registered <strong>for</strong> an API key and registered <strong><strong>OCTranspo</strong>Live</strong> as an <strong>application</strong> using myaccount. The API uses HTTP requests and responses as the data de<strong>live</strong>ry mechanism.The responses are returned as XML[3]. This is less than ideal and JSON would haveprovided a much better data <strong>for</strong>mat. JSON is an easier data <strong>for</strong>mat to work withconsidering libraries are already built-in to Android and the key-value structure makesnavigating a response much simpler. One can register <strong>for</strong> an OC Transpo Live NextBus Arrival Data Feed API key at http://www.octranspo1.com/developers.1.2.4 MySQL DatabaseMySQL is a very popular relational database management system (RDBMS). Thismeans it includes not only the database itself but all the management tools.Forthis project a database was needed to allow me make queries on the data providedby <strong>OCTranspo</strong>. The data itself is several les of plain text and not very useful onits own. It is the database of choice <strong>for</strong> a new generation of <strong>application</strong>s built onthe LAMP stack (Linux, Apache, MySQL, PHP / Perl / Python)[4], and as I hadexperience installing and managing MySQL installation it was an ideal choice.1.2.5 Google Maps APIGoogle provides their Map library <strong>for</strong> use on the Android plat<strong>for</strong>m. Using the AndroidSDK Manager in Eclipse Google Apps <strong>for</strong> Android can be downloaded allowing accessto the Maps library. When congure this allows us to use com.google.android.maps.MapViewin layouts. This is used in the MapViewActivity which is detailed in a later section.Using the Maps library we can then draw custom overlays on top of a map. This is10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!