Linphone is a free VoIP and video softphone based on the SIP protocol.
Download the Android sdk (API 23 at least) with platform-tools and tools updated to latest revision, then add both 'tools' and 'platform-tools' folders in your path.
Download the Android ndk (version r11c or 12b) from google and add it to your path (no symlink !!!).
Install yasm, nasm, ant, python, intltoolize, cmake and vim-common.
dpkg --add-architecture i386
aptitude update
aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
Run ./prepare.py
in the top level directory. This will configure the build and generate a Makefile in the top level directory. Some options can be passed to choose what you want to include in the build and the platforms for which you want to build. Use ./prepare.py --help
to see what these options are.
Run the Makefile script in the top level directory, make
.
(optional) To install the generated apk into a plugged device, run make install
.
(optional) To generate a liblinphone SDK zip containing a full jar and native libraries, run make liblinphone-android-sdk
(optional) To generate a libmediastreamer2 SDK zip containing a full jar and native libraries, run make mediastreamer2-sdk
(optional) To generate a signed apk to publish on the Google Play, run make release
. Make sure you filled the ant.properties values for version.name, key.store and key.alias in order to correctly sign the generated apk. You also may want to create a file name ant_password.properties with the following:
If you don't, the passwords will be asked at the signing phase.
Open the res/values/non_localizable_custom.xml file and change the show_tutorials_instead_of_app to true.
Compile again using make
and make install
.
Don't forget to put it back to false to run the linphone application normally.
You need to edit the custom_rules.xml file:
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 ccache.samba.org). Give the "-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" options to the prepare.py script.
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.
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
The build options are to be passed to the prepare.py script. For example to enable the x264 encoder give the "-DENABLE_X264=YES" to prepare.py.
The available options can be listed with the ./prepare.py --list-features
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。