blob: d940da7dd318f859fb885db3a70e9565ef3517a7 [file] [log] [blame]
sfl android42fcf7a2012-08-06 15:45:32 -04001This repository is meant for the porting of SFLphone to Android.
2
3
4To build SFLphone and all its dependencies, make sure that Android's NDK and SDK
5are properly installed on your system.
6
7You have also to make sure that the following environment variables are defined:
8
Tristan Matthewsd8aa4322013-07-17 10:51:54 -04009export ANDROID_NDK=$HOME/path/to/android-ndk-r*b
Alexandre Lision22119112014-04-14 13:31:13 -040010export ANDROID_NDK_ROOT=$ANDROID_NDK
Tristan Matthewsd8aa4322013-07-17 10:51:54 -040011export ANDROID_SDK=$HOME/path/to/android-sdk-linux
sfl android42fcf7a2012-08-06 15:45:32 -040012
13The path to the required Android's build executable must be also specified:
14
15export PATH=$PATH:$ANDROID_NDK
Emeric Vigier9701e032012-09-12 12:38:01 -040016
17BUILD
18-----
Emeric Vigiercca7f562012-09-20 14:22:30 -040019install swig-2.0.6 or later and python-2.7 or later on your system
Emeric Vigier9701e032012-09-12 12:38:01 -040020
21$ cd sflphone-android
22
23Check that following files are executable:
24 jni/sflphone/daemon/src/JavaJNI2CJNI_Load.py
25 make-swig.sh
26
Alexandre Lision22119112014-04-14 13:31:13 -040027Generate swig interface
Alexandre Lision7c6f4a62013-09-05 13:27:01 -040028$ ./make-swig.sh
29
Alexandre Lision22119112014-04-14 13:31:13 -040030Configure daemon for Android
31$ pushd jni/sflphone/daemon
32$ ./configure-android.sh
33
34Compile pjsip (-a is for android compilation)
35$ cd libs
36$ ./compile-pjsip.sh -a
Adrien BĂ©raudc232fdb2014-01-28 11:12:07 -050037$ popd
Emeric Vigier9701e032012-09-12 12:38:01 -040038
Alexandre Lision22119112014-04-14 13:31:13 -040039Build modules
40$ cd jni
41$ ndk-build -j4
42
Emeric Vigierc30b71d2012-09-12 14:51:47 -040043Check that no errors occurred. In particular, following files should have been generated by make-swig.sh:
Emeric Vigier9701e032012-09-12 12:38:01 -040044 sflphoneservice_loader.c
45 callmanager_wrap.cpp
46 sflphoneservice.java
47 sflphoneserviceJNI.java
48 ManagerImpl.java
49
alisionf76de3b2013-04-16 15:35:22 -040050
Alexandre Lision0fbcc4e2014-01-22 13:02:28 -050051Then build android project with your favorite JDK: eclipse, intellijidea or ant.
52
53
54
55************************** GENYMOTION HOW TO *************************
56
57Genymotion is an open source project to run Android VMs with standard images (Nexus, 4, 7, 10, Xperia etc.) on top of VirtualBox.
58
59www.genymotion.com/
60
61Pros:
62 - Very fast
63 - Integrated to IDEs (tested with IntellijIDEA)
64 - Can be integrated in jenkins as well
Alexandre Lision39ec4cd2014-01-27 13:51:33 -050065 - Offers 20+ different devices
Alexandre Lision0fbcc4e2014-01-22 13:02:28 -050066
Alexandre Lision0fbcc4e2014-01-22 13:02:28 -050067Notes:
68
69 - Using SFLphone on VMs:
70 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.
71
72 To solve that problem, you need to change VirtualBox settings of the Android VMs.
73 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.
74
75 In the network panel, leave the first Adapter as it is (Host-only, vboxnet0).
76 In the second adapter tab, switch NAT, to Bridged Adapter.
77
78 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.
Alexandre Lision08494102014-01-24 15:17:04 -050079
80
Alexandre Lision39ec4cd2014-01-27 13:51:33 -050081
82************************** JENKINS HOW TO *************************
83
84
85SFLphone android uses jenkins to run tests on genymotions emulators.
86
87To manage available emulators:
88
89 - start ssh graphical session as jenkins user: ssh -X jenkins@hostname
90 - enter jenkins password (availbale in sflvault)
91 - run ./genymotion: UI should be streamed to your computer