想起来了,做的过程中遇到一个问题,license一直返回-5,注册失败,原因找到了,
原因:https://cloud.tencent.com/developer/ask/226553,我的测试机型,恰好是Android9.0
注意测试机的版本,如果是大于O就不行了。license的LICENSE_URL给的是http开头,
android O之后默认禁止不安全的http协议,你可以把url的http改成https。。。。。
再或者配置项目支持http。《android:networkSecurityConfig=XXXXXX》
解决办法:
将licenceURL的http:// 改为https://
就可以了
1.效果图
2.官方地址: https://cloud.tencent.com/document/product/454/7873
我也是看着官方文档,一步一步执行,然后就运行成功了,从集成环境到推流成功,大概花了3个小时
3.推流工具:我用的是vlc,怎么使用,怎么下载,请关注我的上篇博客
4.开始集成环境
4.1先看一下,我的项目结构,项目源码地址:https://github.com/wrs13634194612/TenXunRtmpLive
用到了aar和jni中的so和jar文件,直接从官网下载,然后复制就完事了
4.2 app 下的配置:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.1"
defaultConfig {
applicationId "com.example.administrator.testz"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk {
abiFilters "armeabi", "armeabi-v7a"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementat