blob: d940da7dd318f859fb885db3a70e9565ef3517a7 [file] [log] [blame]
This repository is meant for the porting of SFLphone to Android.
To build SFLphone and all its dependencies, make sure that Android's NDK and SDK
are properly installed on your system.
You have also to make sure that the following environment variables are defined:
export ANDROID_NDK=$HOME/path/to/android-ndk-r*b
export ANDROID_NDK_ROOT=$ANDROID_NDK
export ANDROID_SDK=$HOME/path/to/android-sdk-linux
The path to the required Android's build executable must be also specified:
export PATH=$PATH:$ANDROID_NDK
BUILD
-----
install swig-2.0.6 or later and python-2.7 or later on your system
$ cd sflphone-android
Check that following files are executable:
jni/sflphone/daemon/src/JavaJNI2CJNI_Load.py
make-swig.sh
Generate swig interface
$ ./make-swig.sh
Configure daemon for Android
$ pushd jni/sflphone/daemon
$ ./configure-android.sh
Compile pjsip (-a is for android compilation)
$ cd libs
$ ./compile-pjsip.sh -a
$ popd
Build modules
$ cd jni
$ ndk-build -j4
Check that no errors occurred. In particular, following files should have been generated by make-swig.sh:
sflphoneservice_loader.c
callmanager_wrap.cpp
sflphoneservice.java
sflphoneserviceJNI.java
ManagerImpl.java
Then build android project with your favorite JDK: eclipse, intellijidea or ant.
************************** GENYMOTION HOW TO *************************
Genymotion is an open source project to run Android VMs with standard images (Nexus, 4, 7, 10, Xperia etc.) on top of VirtualBox.
www.genymotion.com/
Pros:
- Very fast
- Integrated to IDEs (tested with IntellijIDEA)
- Can be integrated in jenkins as well
- Offers 20+ different devices
Notes:
- Using SFLphone on VMs:
By default, Android VMs are in their own virtual NAT, which blocks RTP communications in SFLphone. To be more precise, RTP stream will work FROM the VM to the outside, but it won't be able to receive incoming streams.
To solve that problem, you need to change VirtualBox settings of the Android VMs.
After creating a VM with Genymotion wizard, open VirtualBox. You should see that the VM appears there (the factory-backup). Right-click on it -> Settings.
In the network panel, leave the first Adapter as it is (Host-only, vboxnet0).
In the second adapter tab, switch NAT, to Bridged Adapter.
Now, when running your Android VM, you should have an IP adress on the same NAT as your desktop, allowing data streams to be correctly sent TO/FROM your VM.
************************** JENKINS HOW TO *************************
SFLphone android uses jenkins to run tests on genymotions emulators.
To manage available emulators:
- start ssh graphical session as jenkins user: ssh -X jenkins@hostname
- enter jenkins password (availbale in sflvault)
- run ./genymotion: UI should be streamed to your computer