Developer

Georg Lukas edited this page Jul 30, 2015 · 6 revisions

Developing for APRSdroid

APRSdroid is written in Scala. To compile it, you will need the Scala compiler and runtime. You are also required to install ProGuard to reduce the binary size.

Required tools

Scala: Obtain the Scala distribution package (2.8.2 has been tested). After unpacking, copy scala-compiler.jarand scala-library.jar from lib/ to aprsdroid/tools/.

ProGuard: get the current version from SourceForge and copy the proguard.jar from the archive to aprsdroid/tools/.

Maps Support

APRSdroid is using the Google Maps API for Android or alternatively the MapsForge library to display Maps (mapsforge branch). The following steps are only needed for the Google Maps version.

You need to install the Maps component in your SDK (From “Available Packages”, install “Google APIs by Google Inc., Android API 19”), have an Emulator built with Maps support (“Google Inc.:Google APIs:19” or later is the target).

You will also need a Maps API key which you can place in your local.properties file:

mapsApiKey=0N1kQgxBL5...

Without a correct API key, the map will only display grey squares. You will also need a different API key for a production build.

Compilation

Compilation is performed using the ANT tool. It should be possible to integrate the project into Eclipse or other frameworks – feel free to document.

You will probably need to create the Android specific files before compilation.

APRSdroid currently is using a quick&dirty hacked together integration of PacketDroid’s multimon engine, which needs to be copied over or symlinked into the APRSdroid source.

Build environment preparation:

# create Android project files
android update project -p .

# check out PacketDroid
git clone -b aprsdroid https://github.com/ge0rg/PacketDroid.git
# symlink to required PacketDroid files
ln -s PacketDroid/jni
cd src
ln -s ../PacketDroid/src/com/jazzido/PacketDroid/AudioBufferProcessor.java
ln -s ../PacketDroid/src/com/jazzido/PacketDroid/PacketCallback.java

Compilation:

$ANDROID_NDK_HOME/ndk-build
ant debug

The poject is targeted at API version Google Inc.:Google APIs:19, please double-check your project.properties file.

Translation

Translation is handled via Launchpad. There is a shell script in aprsdroid called xml2po.sh which relies on the xml2po tool to convert the values.xml to a POT file and the PO files from LaunchPad to xml files.