MiniBus is an Android application which displays bus arrival information for Cambridge and the local region. It was originally developed at the University of Cambridge by David Tattersall as part of a ten-week summer project. This project is licenced under Apache 2.0. Further details are available on the project website.
MiniBus uses Git for source code management and Maven can be used for build management. The instructions below ignore the Maven build configuration and set up dependencies manually.
The source code for MiniBus is available from our public repository. To build minibus itself, you will need to install two repositories, "TIMEBase" and "minibus". TIMEBase provides a common framework which is used in various applications; minibus provides the end-user Android application.
The respositories are available here:
-
Install the Java JDK 1.6 or later on your workstation.
-
Download and unzip Eclipse. At the time of writing Indigo SR2, EE Edition, was used.
-
Install the Android SDK into Eclipse along with the associated plugin by following the developer installation instructions.
-
In Eclipse go to Window -> Android SDK Manager. Install Android 1.6 (API 4) and possibly other API levels too if you want to test functionality on more recent devices. Note: Make sure you select "Google APIs" as well as the SDK platform itself since MiniBus uses the Google Maps API.
-
In Eclipse, go to Help -> Install New Software. Select "Add" and add the EGit repository.
-
Select "Eclipse Git Team Provider" and install.
-
Restart Eclipse
-
In Eclipse, go to File -> Import... -> Git -> Projects from Git. Select URI as the method of accessing the repository and enter: https://github.com/ucam-cl-dtg/timebase.git
-
Select "import existing project" and click through to finish.
-
In Eclipse, go to File -> Import... -> Git -> Projects from Git. Select URI as the method of accessing the repository and enter: https://github.com/ucam-cl-dtg/minibus.git
-
Select "import existing project" and click through to finish.
-
Associate the TIMEBase project with the minibus project by right-clicking on the minibus project in the Package Explorer. Select Properties from the pop-up menu, then select Java Build Path in the dialog box which appears. In the Projects tab inside the dialog box, add TIMEBase as a dependent project. In the Libraries tab, select "Add class folder ... " and add TIMEBase/target/classes. In the Order and Export tab, enable the tickbox next to TIMEBase to tell the compiler to export TIMEBase as part of the minibus application.
-
Associate the JUnit 4 library with TIMEBase by right-clicking on the project, selecting Properties -> Java Build Path -> Libraries (it's a tab) -> Add Library. The select JUnit and choose JUnit 4.
-
Select Window -> AVD Manager and create a virtual device which supports Android 1.6 (API 4), or plug a device in to your workstation via a USB cable and ensure that "USB debugging" is enabled. You will not be able to test MiniBus on a physical device which already has a copy of MiniBus installed from Google Play (formerly Android Market).
-
Right-click on the minibus project, select Run -> Android Application. Select the virutal device or handset on which to run MiniBus (if offered the choice).
-
MiniBus should now load. It will not be able to display Map data or bus information as the source repository does not contain the API keys for these services. You should create your own keys for these services. If you do add your own keys to the source code, and you want to make contributions to our repository, do not commit your keys!
- Install the Android SDK using the developer installation instructions
- Use the android-sdk-deployer to install the google maps jars to your local maven repository (you want Android 1.6 (API 4) and Google APIs.
- To have minibus build correctly with maven you will need to specify the android.keystores property to be a directory containing debug.store (for non release builds) and minibus.keystore (for release builds).