This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
Project setup
Subhas Dandapani edited this page Jun 19, 2014
·
64 revisions
This page is only for setting up development environment for Mobile App . If you are looking for Web app Source Code & Details go here
- Mobile App Source Code available here.
This is maven project for more information on how to develop android application with maven see Getting started with the android maven plugin and also Android Application Development with Maven
We are currently targeting Android v2.3.6 because those are the devices that are currently used. However, this is going to change as we shall be supporting Android v4.0.x
- RapidFTR-Android maven project have the source code along with the the unit test code. Unit tests are written with the help of Robolectric, Mockito and PowerMock.
- The RapidFTR-Android contains a folder called feature which is the home of the android integration tests run with calabash
- Download the android sdk from the android developers website and unzip the same. If you are on Mac, it is recommended to use homebrew to install Ex: 'brew install android'
- Entering 'android' command in your terminal will launch the Android SDK Manager. We will use the SDK Manager to install the appropriate Android Platform version as well as the appropriate Support Library (The latest should do as of this writing v19.1.0). Since we want to support a wide varierty of Android phones, we will compile and build with 2.2 version (API Version 8) of Android. Install version 2.2 from the SDK manager GUI.
- Create an AVD (from within the SDK Manager) with the size 240320. The least resolution we would be using is 240320, so, testing for that resolution will help.
- Start the created AVD
As an alternative to using the android AVD, you can use Genymotion for instructions on how to setup and use Genymotion visit (https://cloud.genymotion.com/page/doc/)
- Click File -> Open Project and select the pom file, and the Maven project will be automatically imported. For more information on how to do this (http://www.jetbrains.com/idea/webhelp/importing-project-from-maven-model.html)
- Intellij comes with default Android support, so once the project is loaded it asks for configuring the android framework. Go ahead and configure the framework.
- From IntelliJ Preferences -> Plugins, install the Lombok Plugin. We are using Project Lombok to generate helper methods (like getters, setters, etc)
- To run the tests in IntelliJ select the appropriate test file and run it as a junit test
- If you get any error related to maven, then click on Preferences => Maven then specify the Maven home directory: to the path of the maven home (In Mac OSX its /usr/share/maven.)
- If you get an error saying "ANDROID_HOME" not found, go to IntelliJ Preferences > Path Variables, and add an entry for ANDROID_HOME. The ANDROID_HOME points to the "sdk" folder in your Android SDK.
- You can run all the tests from the android parent directory RapidFTR---Android by using the command mvn clean install. This will also generate the .apk files which could be installed on the mobile phones for testing.
- To run unit tests alone, navigate to RapidFTR-Android folder and then run mvn clean test.
- Use GenyMotion to launch the AVDs