Source code and build instructions

Lumicall is an open source project

This project is licensed to you under the terms of the GNU General Public License v3

What this means in practice is that if you extend this code in any way, you are obliged to share the source code with the community. You can't just make a derivative product and distribute it through Google Play in binary format only.

Browse the source code online

You can browse the source code using the Github - Lumicall repository

Getting the pre-requisites

Build tools

  • Eclipse for J2SE - Indigo release
  • Android Developer Toolkit (ADT), tools versions are:
    • SDK tools r20.0.3
    • SDK platform tools r14
  • ADT plugin for Eclipse
  • Android Native Development Kit (required to build some JNI codecs)
  • Optional: Apache Ant (for automated command line builds)

Getting the code

The code is hosted on Github.


mkdir -p ~/ws
git clone git://github.com/opentelecoms-org/lumicall.git ~/ws/lumicall
cd ~/ws/lumicall
git submodule init
git submodule update

Building the JNI code

There is some JNI code. It is NOT automatically built by Eclipse.

This code provides the SILK and G.729 and some other codecs.

You must have the Android Native Development Kit (NDK) installed. See the NDK online documentation for installation instructions

You only need to re-build the JNI code in these circumstances:

  • The first time you checkout the project
  • If you checkout a new version of the project and some of the JNI code has changed
  • If you modify some of the JNI code yourself

Eclipse clean/build functions will NOT detect when this code must be rebuilt - you must do this manually.

To build the JNI code, just execute the ndk-build command from the command line, for example:


$ cd ~/ws/lumicall
$ ${NDK_HOME}/ndk-build

All JNI modules should be built and copied to libs/armeabi-v7a. See jni/README.txt for more details about building for other architectures and debugging JNI.

Prepare the Android artifacts

This step is mandatory. Run the following command and various artifacts such as local.properties are created in the root of the build tree:


android update project --path . --target android-8

The properties file

The assets/ directory contains sample files, app.properties-*

Copy one of them to create a new file, app.properties and edit the values to match your site

A symlink to one of the existing files is also valid

Without this file, Eclipse will still build the application, but certain parts of the application will not work correctly when it is installed on a phone.

Building the code with Apache Ant

If you prefer running the build with ant, you can try it now

Just go to the root of the Lumicall repository you have cloned and run the command


$ ant

and after a brief wait, you should see


BUILD SUCCESSFUL
Total time: 34 seconds
$

Building the code with Eclipse

  • Download the standard Eclipse for J2EE (we are using Eclipse Indigo Service Release 1)
  • Set up the Android Developer Toolkit within Eclipse
  • Create a new workspace within Eclipse (Eclipse will create it's own workspace directory for this)
  • Import each of the projects into the Eclipse workspace
    • Import the main project first
    • Then import each of the submodule projects under zrtp, opentelecoms.org-util, pbkdf2, gmetric4j and icej4
    • If you don't import the submodule projects into Eclipse, they won't build. If they are imported correctly, you will see them listed in the Package Explorer panel on the left hand side of the editing panel.
  • In each project, check the build path settings, make sure that Lumicall project can find the JAR files produced by the other projects
  • Build it like any project in Eclipse. Start by trying to build opentelecoms.org-util, as that is the most trivial way to check your environment
  • Run -> Run As -> Android Application to run it on your phone or the emulator

Build problems and tips

  • If you get an error about java.lang.Object not found, then your Android SDK may not have the runtime JARs for the target Android version, or the SDK version itself may be too old. In Eclipse, click `Windows' and `Android SDK Manager' and make sure all the necessary components are installed and/or upgraded to the latest versions.
  • There are a number of classes for testing, for example, to run the ZRTP code in a test harness. This is a good way to become familiar with the code and verify that your build environment is working.
  • If you get many errors about classes not found, it may be because you are trying to build the submodules (e.g. gmetric4j or ice4j) as Android code. The submodules are NOT Android projects. They expect to be built with normal J2SE runtime libraries. Build normal JARs for these projects (as normal J2SE JAR projects in Eclipse). The only project that should be built using the Android runtime is the top-level Lumicall project itself, it will convert the classes from the submodule JARs without any classpath errors.

Getting help

If you are developing with Lumicall and want to participate in the community, please join the mailing list for developers.