Using Liblinphone

Don't forget to check out or tutorials :


Fisrt of all, install the Android SDK from the official site. Then run the android binary and install the following:

  • Android SDK Tools
  • Android SDK Platform-tools
  • Android SDK Build-tools
  • An Android SDK platform

Please take an eye on the README and ChangeLog files from the git repo in order to make sure to have always up to date information about the project.

Note that the README provide detailed instructions to compile the linphone app and liblinphone SDK, which is not required to simply use the SDK in your own app.

Create your project

Create a directory for your new project, then, create your project. You can either use the assistant from your IDE (Eclipse or Android Studio), or the command line:

android create project -n [project_name] -t [target_android_version] -p [path_to_project_dir] -k [package_name] -a [default_activity_name]

If you do create your project using the command line, you can still import it in your IDE.
For Eclipse , go to File -> Import -> Android - Existing Android Code Into Workspace.

Importing liblinphone SDK

Two options are available. The first one is to configure our maven repository in your build.gradle file and add our SDK dependency. The second one is to manually download and install our SDK.

Use our Maven repository

Edit your top level gradle build file and edit the allprojects' repositories list to add our own:

maven {
    name " maven repository"
    url ""
    content {
        includeGroup "org.linphone"

Then in your app's gradle build file add the either one of the following to your dependencies list:

debugImplementation "org.linphone:linphone-sdk-android-debug:5.0+"
releaseImplementation "org.linphone:linphone-sdk-android:5.0+"

Before 4.0.1 there is only a release implementation available !

Changes starting with 4.1:

  • The artifact id is now linphone-android-sdk instead of liblinphone-sdk.
  • A no-video build is available with the group id instead of org.linphone.
  • The javadoc is also available with the release AAR

Here's a sample on how to the latest snapshot:

debugImplementation "org.linphone:linphone-sdk-android-debug:5.0+"
releaseImplementation "org.linphone:linphone-sdk-android:5.0+"

For the no-video builds, use

debugImplementation ""
releaseImplementation ""

If you want the smallest AAR available (with most of the features being disabled to gain some space such as video, advanced IM, sqlite, vCard, MKV, plugins, etc...):

debugImplementation "org.linphone.minimal:linphone-sdk-android-debug:5.0+"
releaseImplementation "org.linphone.minimal:linphone-sdk-android:5.0+"

Finally, for those who still uses the old Java wrapper but still want to be able to update the library, we have created a legacy package.

4.5.x release is the last one that will support it.

debugImplementation "org.linphone.legacy:linphone-sdk-android-debug:4.5+"
releaseImplementation "org.linphone.legacy:linphone-sdk-android:4.5+"

Keep in mind that the debug AAR is a lot bigger than the release one, thus the APK installation will take some time.
So for day to day development, you can use the release AAR to have faster builds.

Use a private maven repository

If you are using a private maven repository, here's how to configure and use it:

maven {
 credentials  {
  username "<user>"
  password "<password>"

 authentication {

 name "<Maven repository name>"
 url "<maven repository url>"

 content {
  includeGroup "org.linphone"

Download our SDK (not recommended)

You can download the AAR directly from the maven repository.

To configure your project, put the aar in the libs/ directory should be enough.

In your build.gradle add in repositories:

repositories {
 flatDir { dirs 'libs' }

If for some reason it's not (for example if you decided to put the aar in another folder), just add the folder to flatDir.

And in dependencies:

repositories {
//compile(name:'liblinphone-sdk-release', ext:'aar') This was the old way and still works but you'll have a warning
 implementation '

And now you have liblinphone sdk integrated in your project.

You can try your setup by trying to start a sample Core:

Factory.instance().setDebugMode(true, "Linphone");
// You must provide the Android app context as createCore last param !
Core core = Factory.instance().createCore(null, null, this.getApplicationContext());

You MUST provide the Android app context as createCore last param !

Using liblinphone API

The JAVA reference API documentation is browsable here.

You can also download the source code of Linphone Android (see the Source Code on this page).

Finally a bunch of tutorials are available.

Compile your app and run

Nothing specific to do, just compile it as a normal Android application (on Eclipse, right click on the project -> Run as -> Android Application).


Activate debug traces using Factory.instance().setDebugMode(true, "appName");

To get debug traces from adb:
adb logcat 

To get symbolicated stack trace from adb, use:
adb logcat -d | ndk-stack -sym ./libs-debug/`adb shell getprop ro.product.cpu.abi | tr -d '\r'` 

Created by SandrineAvakian on 2017/02/22 16:28