-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
144 lines (112 loc) · 6.27 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
****************************
* LINPHONE for ANDROID *
****************************
COMPILATION INSTRUCTIONS
************************
To build liblinphone for Android, you must:
-------------------------------------------
0) download the Android sdk with platform-tools and tools updated to latest revision (at least API 16 is needed), then add both 'tools' and 'platform-tools' folders in your path.
1) download the Android ndk (=r10c) from google and add it to your path (no symlink !!!).
2) install yasm, nasm, curl, ant, rsync and the autotools: autoconf, automake, aclocal, libtoolize, pkgconfig
On 64 bits linux systems you'll need the ia32-libs package
With the latest Debian (multiarch), you need this:
dpkg --add-architecture i386
aptitude update
aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
3) run the Makefile script in the top level directory. This will download iLBC source files and convert some assembly files in VP8 project.
$ make
4) (Optional) To install the generated apk into a plugged device, run
$ make install
5) (Optional) To generate a liblinphone SDK zip containing a full jar and native libraries, run
$ make liblinphone-android-sdk
6) (Optional) To generate a libmediastreamer2 SDK zip containing a full jar and native libraries, run
$ make mediastreamer2-sdk
7) (Optional) To generate a signed apk to publish on the Google Play, run
$ make release
It will ask you for the version number that will be displayed in the about page of the app.
Make sure you filled the ant.properties values for key.store and key.alias in order to correctly
sign the generated apk (it will ask you the password during the process)
To run the tutorials:
--------------------
1) open the res/values/non_localizable_custom.xml file and change the value of the show_tutorials_instead_of_app to true.
2) compile again using make && make install.
3) /!\ don't forget to put it back to false to run the linphone application normally. /!\
To create an apk with a different package name
----------------------------------------------
You need to edit the custom_rules.xml file:
1) look for the property named "linphone.package.name" and change it value accordingly
2) also update the values in the AndroidManifest file where the comment <!-- Change package ! --> appears
3) update the path to the sounds in the linphonerc-factory files in the res folders and optionally change default sip account on linphonerc-default
4) run again the Makefile script by calling "make"
To run the liblinphone test suite on android
--------------------------------------------
Simply run
$ make liblinphone_tester
This will be build everything, generate an apk, and install it on the connected device if any.
You can speed up the compilation by using ccache (compiler cache, see https://ccache.samba.org/). Simply export:
export NDK_CCACHE=ccache
TROUBLESHOOTING
***************
If you encounter the following issue:
E/dalvikvm( 2465): dlopen("/data/app-lib/org.linphone-1/liblinphone-armeabi-v7a.so") failed: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "rand" referenced by "liblinphone-armeabi-v7a.so"...
it's because you have installed the android-21 platform (which is chosen automatically because it's the most recent) and you deployed the apk on a android < 5 device.
To fix this, in the Makefile, force ANDROID_MOST_RECENT_TARGET=android-19
If you encounter troubles with the make clean target and you are using the 8e android ndk, the solution can be found here: https://groups.google.com/forum/?fromgroups=#!topic/android-ndk/3wIbb-h3nDU
If you built the app using eclipse, ensure you ran at least once the make command (see above steps 0 to 3) ! Else you'll have this exceptions:
FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
...
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load linphone-armeabi-v7a: findLibrary returned null
...
BUILD OPTIONS
*************
Some options can be passed to make, like "make SOME_OPTION=SOME_VALUE".
ENABLE_GPL_THIRD_PARTIES
values: 0 (GPL third parties disabled) or 1 (GPL third parties enabled), default value: 1
GPL third parties are: X264 and G729
BUILD_VIDEO
values: 0 (no video) or 1 (video enabled), default value: 1
BUILD_OPENH264
values: 0 (don't build openH264) or 1 (build openH264), default value: 1
ENABLE_OPENH264_DECODER
values: 0 (disable openh264 decoder) or 1 (enable openh264 decoder), default value: 1
BUILD_X264
values: 0 (don't build x264) or 1 (build x264), default value: 0
BUILD_AMRNB
values: 0 (don't build amrnb codec), light (try to use amrnb codec from android), full (build your own amrnb codec), default value: full
BUILD_AMRWB
values: 0 (don't build amrwb codec), 1 (build your own amrwb codec): default value: 1
BUILD_ZRTP
values: 0 (don't support ZRTP), 1 (support ZRTP), default value: 1
BUILD_SILK
values: 0 (don't build silk plugin), 1 (build silk) [silk is Skype nonfree patented audio codec], default value: 1
BUILD_G729
values: 0 (don't build g729 plugin), 1 (build g729) [g729 is nonfree patented audio codec, contact Sipro lab for more details]
default value: 1
BUILD_TUNNEL
values: 0 (don't build tunnel), 1 (build tunnel) [requires a non-free tunnel implementation in submodules/linphone/tunnel]
default value: 0
BUILD_WEBRTC_AECM
values: 0 (don't build echo canceler), 1 (build echo canceler)
default value: 1
USE_JAVAH
values: 0 (don't generate header), 1 (generate header for linphone_core_jni) [used to check errors at liblinphone compilation]
default value: 1
BUILD_FOR_X86
values: 0 (don't generate liblinphone libraries for x86 architecture), 1 (build liblinphone libraries for x86 architecture)
default value: 1
BUILD_SQLITE
values: 0 (don't build sqlite3), 1 (build sqlite3) [used to store chat messages inside liblinphone]
default value: 1
BUILD_TLS
values: 0 (don't build tls), 1 (do build tls), default value: 1
BUILD_WEBRTC_ISAC
values: 0 (don't build isac), 1 (do build isac), default value: 1
BUILD_OPUS
values: 0 (don't build opus), 1 (do build opus), default value: 1
BUILD_UPNP
values: 0 (don't build upnp), 1 (do build upnp), default value: 1
BUILD_MATROSKA
values: 0 (don't build matroska and ebml), 1 (do build matroska and ebml), default value: 0
BUILD_ILBC
values: 0 (don't build iLBC), 1 (do build iLBC), default value: 1