I am beginner with Android and I have to make a voip app and after searching I found that the better opensource library for that is PJSIP. I download the below things to build the PJSIP library:
PJSIP from here
Android NDK
SWIG
...But I don't know how to start. I checked this link for the official PJSIP website but I didn't make any progress.
Which Directory do I have to put the Android NDK into?
How to use SWIG to build the PJSIP?!
which Directory i have to put the Android NDK ?
Put it where you want, later you will setup the path to it
$ export ANDROID_NDK_ROOT=/path_to_android_ndk_dir
how to use SWIG to build the PJSIP ?!
You don't need SWIG to compile the PJSIP sources, it's needed only if you want to build and and run the sample application PJSUA.
Updated
The steps to build sources are
Download sources from PJSIP site. Pay attention if you will compile on Windows machine download .zip
file, if on Unix machine (including OS X) then download .bz2
file.
Go to pjlib/include/pj/
from the downloaded sources. Create (or overwrite) a file called config_site.h
. Copy the following code snippet
#define PJ_CONFIG_ANDROID 1 #include <pj/config_site_sample.h>
Open Cmd
or Terminal
Go to pjsip root folder (the downloaded sources)
$ cd /path/to/your/pjsip/dir
Export bash var ANDROID_NDK_ROOT as a environment variable. Variable value should be the path of android ndk directory.
$ export ANDROID_NDK_ROOT=/path_to_android_ndk_dir
(Unix)
SET ANDROID_NDK_ROOT=/path_to_android_ndk_dir
(Windows)
Perform build for target armeabi
$ ./configure-android
If you need to perform build for
target arm64-v8a
do $ TARGET_ABI=armeabi-v8a ./configure-android --use-ndk-cflags
target armeabi-v7a
do $ TARGET_ABI=armeabi-v7a ./configure-android --use-ndk-cflags
target x86
do $ TARGET_ABI=x86 ./configure-android --use-ndk-cflags
Compile sources
$ make dep && make clean && make
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With