Commit 56992691 by 刘鹏

Merge branch 'feat/qj_new_dev' into 'new_dev_4.3.91'

Feat/qj new dev

See merge request app_android_lib/YDL-Component!1
parents 38ced661 596b8160
apply from: "config.gradle"
buildscript {
ext.kotlin_version = '1.3.50'
ext {
kotlin_version = '1.3.21'
kotlin_version = '1.3.50'
support_version = '26.1.0'
minSdkVersion = 21
targetSdkVersion = 28
......@@ -16,50 +15,27 @@ buildscript {
constrait_support_version = '1.0.2'
}
repositories {
google()
//壹点灵android maven私服 开发版
maven {
url 'http://nexus.yidianling.com/repository/AndroidRepository/'
credentials {
username "admin"
password "fjoi#1+#@"
}
}
maven {
url 'http://nexus.yidianling.com/repository/AndroidReleases/'
url 'http://nexus.yidianling.com/repository/android/'
credentials {
username "admin"
password "fjoi#1+#@"
}
}
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
// maven {
// url 'https://dl.bintray.com/zouyuhan/maven'
// }
mavenCentral()
google()
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
//Umeng sdk maven 地址
maven { url 'https://repo1.maven.org/maven2/'}
mavenLocal()
// maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0'
classpath 'com.meituan.android.walle:plugin:1.1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.meituan.robust:gradle-plugin:0.4.87'
classpath 'com.meituan.robust:auto-patch-plugin:0.4.87'
//bugly 符号表
classpath 'com.tencent.bugly:symtabfileuploader:2.2.1'
//微信资源混淆
classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.2.16'
classpath 'com.ydl.plugins:modular:1.0.3'
classpath 'com.ydl:notracepoint-gradle-plugin:0.0.3'
classpath 'com.ydl.plugins:restools:0.0.1'
classpath 'com.ydl.plugins:restools:1.0.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-rc1'
}
}
......@@ -68,34 +44,16 @@ allprojects {
repositories {
//壹点灵android maven私服 开发版
maven {
url 'http://nexus.yidianling.com/repository/AndroidRepository/'
credentials {
username "admin"
password "fjoi#1+#@"
}
}
maven {
url 'http://nexus.yidianling.com/repository/AndroidReleases/'
url 'http://nexus.yidianling.com/repository/android/'
credentials {
username "admin"
password "fjoi#1+#@"
}
}
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
// maven { url'http://developer.huawei.com/repo/' }
maven { url "https://jitpack.io" }
maven {
// url 'https://maven.google.com'
url'https://dl.google.com/dl/android/maven2/'
}
// maven {
// url 'https://dl.bintray.com/zouyuhan/maven'
// }
mavenCentral()
google()
jcenter()
maven { url 'https://maven.aliyun.com/repository/releases' }
//Umeng sdk maven 地址
maven { url 'https://repo1.maven.org/maven2/'}
mavenLocal()
}
}
......
......@@ -75,9 +75,8 @@ dependencies {
kapt "com.alibaba:arouter-compiler:$arouter_compiler"
api "com.alibaba:arouter-api:$arouter_api"
api ('com.ydl:ydl-av:1.3.4@aar'){
transitive = true
}
implementation "com.ydl:ydl-av:1.3.9"
implementation 'com.volcengine:apm_insight:1.4.6.cn'
if (rootProject.ext.dev_mode){
//开发时使用
......
......@@ -34,6 +34,7 @@ import com.ydl.audioim.player.AudioPlayer
import com.ydl.audioim.presenter.AudioHomePresenterImpl
import com.ydl.audioim.utils.AudioLogUtils
import com.ydl.audioim.utils.DateUtils
import com.ydl.audioim.utils.onConfideEvent
import com.ydl.audioim.widget.AxbConfirmDialog
import com.ydl.audioim.widget.ZDialog
import com.ydl.webview.H5Params
......@@ -55,7 +56,6 @@ import com.ydl.ydlcommon.utils.log.AliYunLogConfig
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.api.service.IUserService
import de.greenrobot.event.EventBus
import io.agora.rtc.Constants
......@@ -262,6 +262,7 @@ class AudioHomeActivity :
override fun onJoinChannelSuccess(channel: String?, uid: Int, elapsed: Int) {
super.onJoinChannelSuccess(channel, uid, elapsed)
onMeJoined()
callEventSave("20", "$uid 用户声网加入频道成功:channel=$channel")
LogUtil.e("[agora]$uid 用户声网加入频道成功:channel=$channel")
......@@ -349,6 +350,7 @@ class AudioHomeActivity :
super.onUserJoined(uid, elapsed)
callEventSave("20", "${uid}加入频道回调")
LogUtil.e("[agora]远端用户/主播加入频道回调")
onPeerJoined()
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "远端用户/主播加入频道回调")
}
......@@ -795,6 +797,7 @@ class AudioHomeActivity :
fun rtcCall() {
YDLavManager.instances.rtcCall(listenerUid, channelId, sendDoctocrMsg)
onStartCall()
}
/**
......@@ -1411,4 +1414,24 @@ class AudioHomeActivity :
) {
YDLavManager.instances.callEventSave(status,res , session, line)
}
private fun onStartCall() {
val dimension = hashMapOf("conversation" to "start_call", "call" to "call_start")
onConfideEvent(dimension, channelId)
}
private fun onMeJoined() {
val dimension = hashMapOf("conversation" to "me_joined")
onConfideEvent(dimension, channelId)
}
fun onPeerAccepted() {
val dimension = hashMapOf("conversation" to "peer_accepted", "call" to "call_accepted")
onConfideEvent(dimension, channelId)
}
private fun onPeerJoined() {
val dimension = hashMapOf("conversation" to "peer_joined")
onConfideEvent(dimension, channelId)
}
}
......@@ -6,6 +6,7 @@ import android.os.Handler
import android.text.TextUtils
import android.util.Log
import com.alibaba.android.arouter.launcher.ARouter
import com.bytedance.apm.insight.ApmInsightAgent
import com.google.gson.Gson
import com.ydl.audioim.bean.AgoraInvitationBean
import com.ydl.audioim.http.AudioApiRequestUtil
......@@ -13,6 +14,7 @@ import com.ydl.audioim.http.command.ConnectExceptionCommand
import com.ydl.audioim.router.AudioImIn
import com.ydl.audioim.utils.AudioLogUtils
import com.ydl.audioim.utils.AudioLogUtils.Companion.writeAgoraLog
import com.ydl.audioim.utils.onConfideEvent
import com.ydl.consultantim.ConsultantAudioHomeActivity
import com.ydl.ydl_av.messge_service.YDLRTMClient
import com.ydl.ydl_av.messge_service.bean.RTMMesssage
......@@ -41,6 +43,7 @@ import io.agora.rtm.RtmStatusCode.ConnectionChangeReason.CONNECTION_CHANGE_REASO
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import org.json.JSONObject
import java.util.*
import java.util.concurrent.TimeUnit
......@@ -99,6 +102,8 @@ class YDLavManager {
"${response?.calleeId}已收到呼叫邀请,频道号${response?.ChannelId}"
)
val dimension = hashMapOf("call" to "call_received_by_peer")
onConfideEvent(dimension, response?.ChannelId)
val act = ActivityManager.getInstance().getTopTaskActivity()
if (act is AudioHomeActivity) {
act.runOnUiThread {
......@@ -120,6 +125,7 @@ class YDLavManager {
if (act is AudioHomeActivity) {
act.runOnUiThread {
act.joinChannel()
act.onPeerAccepted()
}
}
}
......@@ -131,6 +137,8 @@ class YDLavManager {
AliYunLogConfig.AGORA,
"${response?.calleeId}已拒绝呼叫邀请"
)
val dimension = hashMapOf("call" to "call_refused")
onConfideEvent(dimension, response?.ChannelId)
val act = ActivityManager.getInstance().getTopTaskActivity()
if (act is AudioHomeActivity) {
act.runOnUiThread {
......@@ -152,6 +160,8 @@ class YDLavManager {
AliYunLogConfig.AGORA,
"主叫已取消呼叫邀请"
)
val dimension = hashMapOf("call" to "call_canceled")
onConfideEvent(dimension, response?.ChannelId)
val act = ActivityManager.getInstance().getTopTaskActivity()
if (act is AudioHomeActivity) {
act.runOnUiThread {
......@@ -168,6 +178,11 @@ class YDLavManager {
AliYunLogConfig.AGORA,
"呼叫${response?.calleeId}用户失败:${response?.response}"
)
val dimension = hashMapOf(
"call" to "call_fail",
"call_fail" to "code${errorCode}"
)
onConfideEvent(dimension, response?.ChannelId)
val act = ActivityManager.getInstance().getTopTaskActivity()
//专家离线或者30 秒后仍未收到专家响应,重新再邀请一次
when (errorCode) {
......
package com.ydl.audioim.utils
import com.apm.insight.log.VLog
import com.bytedance.apm.insight.ApmInsightAgent
import com.ydl.ydlcommon.modular.ModularServiceManager
import org.json.JSONObject
internal fun onConfideEvent(dimension: HashMap<String, String>, channel: String?) {
try {
val uid = ModularServiceManager.getPlatformUserService()?.getUser()?.userId
val ext = JSONObject(mapOf("uid" to uid, "channelId" to (channel ?: "unknown")))
ApmInsightAgent.monitorEvent("confide", dimension, hashMapOf(), ext)
} catch (throwable: Throwable) {
VLog.e("onConfideEvent", throwable.message)
}
}
\ No newline at end of file
......@@ -5,6 +5,13 @@ def mavenRepositoryUrl = "http://nexus.yidianling.com/repository/AndroidReleases
def getVersionName() {
return hasProperty('VERSION_NAME') ? VERSION_NAME : rootProject.ext.ydlPublishVersion[project.getName()]
}
task sourceJar(type:Jar){
classifier = 'source'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives sourceJar
}
afterEvaluate { project ->
uploadArchives {
......@@ -16,6 +23,7 @@ afterEvaluate { project ->
repository(url: mavenRepositoryUrl) {
authentication(userName: "admin", password: "fjoi#1+#@")
}
// repository(url:mavenLocal().url)
}
}
}
......
......@@ -75,6 +75,7 @@ dependencies {
//====================YDL Repository====================
// api rootProject.ext.dependencies["ydl-pushagent"]
// api rootProject.ext.dependencies["ydl-hnet"]
implementation 'com.volcengine:apm_insight:1.4.6.cn'
api(rootProject.ext.dependencies["ydl-notracepoint"]) {
transitive = true
exclude group: 'com.google.code.gson', module: 'gson'
......
package com.ydl.ydlcommon.utils.log
import com.aliyun.sls.android.producer.*
import com.apm.insight.log.VLog
import com.ydl.ydlcommon.base.BaseApp.Companion.getApp
import com.ydl.ydlcommon.data.PlatformDataManager.getRam
import com.ydl.ydlcommon.modular.ModularServiceManager.getPlatformUserService
......@@ -45,6 +46,7 @@ class AliYunRichLogsHelper {
* @param value 具体的状态值
* */
fun sendRichLog(key: String, value: String) {
VLog.i(key, value)
val log = Log()
val userInfo = getPlatformUserService()!!.getUser()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment