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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

sActivity.Figure 9: Preferences using MyPreferencesActivity4.2 <strong><strong>OCTranspo</strong>Live</strong> API (Server)In order to utilize the text data provided by <strong>OCTranspo</strong> two things needed to bedone.First I needed to create a database and that will be discussed in the nextsection. The second thing was to create a web based API <strong>for</strong> the Android client touse. After some discussion with Dr. White I decided HTTP requests serving backresponses in JSON was the right choice <strong>for</strong> this project. The web container used totake the requests and serve up the responses is TomCat.The API is implemented as a servlet meant to be deployed to a web container,in this case TomCat. The servlet itself is a web <strong>application</strong> that makes use of theJAX-RS, a Java API <strong>for</strong> RESTful web services. The implementation of JAX-RS used<strong>for</strong> this project is Jersey. The way it works is by dening a path <strong>for</strong> a resource (using@Path decorator) and then implementing the HTTP methods that are needed (GET,24

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

Saved successfully!

Ooh no, something went wrong!