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 ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Figure 7: Favourites4.1.7 MapViewActivityThe MapViewActivity is composed of a MapView. It is used to either display stopsas would be the case if the user selected Stops near me from the main menu, or todisplay the <strong>live</strong> <strong>GPS</strong> <strong>location</strong>s of <strong>bus</strong>es <strong>for</strong> a route. The second possibility is the resultof the user selecting Stop schedule from the main menu and then clicking the mapbutton in the resulting StopScheduleActivity. In this scenario the MapViewActivitywill send a request to the OC Transpo Live Next Bus Arrival Data Feed API every30 seconds. This is done in the MapViewActivity class using a background threadrunning an instance of the Runnable class <strong>GPS</strong>MapLocationUpdater in the packagecom.rakrezzik.map. In the run() method the AsyncTask DownloadRoute<strong>GPS</strong>Data is22