liblinphone-android-sdk-4.0.1.zip 安卓的使用方法

使用方式和3的版本差不多 

請參考我的博客地址https://mp.csdn.net/postedit/80539116

只要將LinphoneCoreListener、LinphoneCore類更新爲CoreListener、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);
core.start();

下面是aar的導入說明

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 {
    url "https://gitlab.linphone.org/BC/public/maven_repository/raw/master"
}

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

releaseImplementation 'org.linphone:liblinphone-sdk:4.0.1'
debugImplementation 'org.linphone:liblinphone-sdk:4.0.1-DEBUG'

The 4.0.1 is the latest available version at the moment these lines are written, but feel free to use a newer one if available.

Download our SDK

You can download a zip with the latest linphone SDK for Android.

If you don't plan on doing any video, you can use a smaller SDK.

Unzip it in the root folder of your project (next to the AndroidManifest.xml file).

Your project might already contain a libs directory, in that case, just merge the two of them.

To configure your project, putting 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 'org.linphone.core:liblinphone-sdk-release@aar'
}

討論羣261074724

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章