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

论坛 期权论坛 脚本     
匿名网站用户   2020-12-20 18:03   11   0

如果觉得下面的麻烦可以直接到https://item.taobao.com/item.htm?id=587133228080获取源码。源码功能性更好、更完善。

想测试apk请加群261074724

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

请参考我的博客地址https://blog.csdn.net/Java_lilin/article/details/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);

下面是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 latestlinphone SDK for Android.

If you don't plan on doing any video, you can use asmaller 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 toflatDir.

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

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:1136255
帖子:227251
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP