Version 10 (modified by ismangil, 12 years ago) (diff) |
---|
Getting Started: Building for Android
TracNav
Getting Started- Moved to: https://docs.pjsip.org/en/latest/index.html#get-started
Preparation
Build for Desktop
Build for Mobile
- iOS: Apple iPhone, iPad, and iPod Touch
- Android
- BlackBerry 10 (BB10)
- Windows Mobile
- Windows Phone 8.x and UWP
Symbian...
- Build for Other
Next: Using the libraries
See Also
- Requirements
- Build Preparation
- Building PJSIP
- Building apjsua sample application
- Other Android projects
Android target is currently available in Android branch and currently still experimental.
Requirements
- Besides the Android SDK, you will also need the Android NDK.
- Optional: SWIG if you want to build the sample application apjsua.
Build Preparation
- Get the source code, if you haven't already.
- Set your config_site.h to the following:
#define PJ_CONFIG_ANDROID 1 #include <pj/config_site_sample.h>
This will activate Android specific settings in the config_site_sample.h.
Building PJSIP
Just run:
$ cd /path/to/your/pjsip/dir $ export ANDROID_NDK=/path_to_android_ndk_dir $ ./configure-android $ make dep && make clean && make
Notes:
- the ./configure-android is a wrapper that calls the standard ./configure script with settings suitable for Android target.
- you may pass standard ./configure options to this script too.
- for more info, run ./configure-android --help
- other customizations are similar to what is explained in Building with GNU page.
Building apjsua sample application
We have apjsua sample application located under pjsip-apps/src/apjsua. It is not built by default, and you need SWIG to build it.
Follow these steps to build apjsua:
- Go to apjsua source directory:
$ cd pjsip-apps/src/apjsua
- Make sure swig is in the PATH and build the app:
$ make
- Create Android project from apjsua and run it. You can modify apjsua/res/raw/config.txt for apjsua's config file.
Other Android projects
Also have a look at the following PJSIP Android project:
- csipsimple project, an Android port of pjsip.