Android:Getting Started

This documment is a dump of things to get you started with the Android Branch

Development

 * How to set up a development environment
 * IntelliJ Setup for OpenLP/Android

These notes are for Fedora BUT the software is available in different packages for different environments. The imports into Eclipse for the Android development is platform independent.

There are instructions for other systems on the Android SDK page

There are instructions for adding bzr to eclipse BzrEclipse

Building an AVD
When the SDK is installed from the tools subdirectory run the android command. This will allow you to update the version of the SDK to the latest version and fixes. In addition from the Tools menu item you can crate and manage AVD's which are phone configurations. An AVD is required to test an application.

Running the Emulator
Once the environment is installed and an AVD is created it is possible to test an application.

Emulator has details how to install an application outside the development environment.

Code Standards
Android Code Standards The difference to the base standards is the Try Catch Block.

try { serverPort = Integer.parseInt(value); }    catch (NumberFormatException e) { throw new ConfigurationException("Port " + value + " is not valid."); }

This can be amended by setting up your own formatter in Preferences --> Java --> Coding -->Formatter.

Launchpad Integration
How I have done it! Eclipse does not work with bzr so I did: bzr co lp:openlp/android android bzr branch android workingAndroid

In eclipse I created a OpenLP android project. Copies the src and res directories from wokringAndroid to my eclipse workspace. I then could develop the code.

When the development is finished. Copy the src and res directories back as well as the OpenLP,apk file from the bin directory. bzr commit -m'My changes' bzr push.

There job done!

When you propose a merge remember to do it against the correct trunk!