Commit 68c46651 by 刘鹏

feat: 云信埋点完成

parent 81ae4930
...@@ -10,7 +10,7 @@ ext { ...@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.01", "m-fm" : "0.0.30.01",
"m-user" : "0.0.61.18", "m-user" : "0.0.61.18",
"m-home" : "0.0.22.55", "m-home" : "0.0.22.55",
"m-im" : "0.0.18.41", "m-im" : "0.0.18.45",
"m-dynamic" : "0.0.7.19", "m-dynamic" : "0.0.7.19",
"m-article" : "0.0.0.6", "m-article" : "0.0.0.6",
...@@ -93,7 +93,7 @@ ext { ...@@ -93,7 +93,7 @@ ext {
"m-fm" : "0.0.30.01", "m-fm" : "0.0.30.01",
"m-user" : "0.0.61.18", "m-user" : "0.0.61.18",
"m-home" : "0.0.22.54", "m-home" : "0.0.22.54",
"m-im" : "0.0.18.40", "m-im" : "0.0.18.45",
"m-dynamic" : "0.0.7.19", "m-dynamic" : "0.0.7.19",
"m-article" : "0.0.0.6", "m-article" : "0.0.0.6",
......
...@@ -10,6 +10,8 @@ import com.netease.nimlib.sdk.avchat.AVChatManager; ...@@ -10,6 +10,8 @@ import com.netease.nimlib.sdk.avchat.AVChatManager;
import com.netease.nimlib.sdk.avchat.constant.AVChatControlCommand; import com.netease.nimlib.sdk.avchat.constant.AVChatControlCommand;
import com.netease.nimlib.sdk.avchat.model.AVChatData; import com.netease.nimlib.sdk.avchat.model.AVChatData;
import com.ydl.ydlcommon.base.BaseActivityMgr; import com.ydl.ydlcommon.base.BaseActivityMgr;
import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.avchatkit.activity.AVChatActivity; import com.yidianling.avchatkit.activity.AVChatActivity;
import com.yidianling.avchatkit.common.log.ILogUtil; import com.yidianling.avchatkit.common.log.ILogUtil;
import com.yidianling.avchatkit.common.log.LogUtil; import com.yidianling.avchatkit.common.log.LogUtil;
...@@ -149,6 +151,8 @@ public class AVChatKit { ...@@ -149,6 +151,8 @@ public class AVChatKit {
*/ */
public static void outgoingCall(Context context, String account, String displayName, int callType, int source) { public static void outgoingCall(Context context, String account, String displayName, int callType, int source) {
AVChatActivity.outgoingCall(context, account, displayName, callType, source); AVChatActivity.outgoingCall(context, account, displayName, callType, source);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"outgoingCall 发起音视频通话呼叫");
} }
/** /**
...@@ -162,7 +166,7 @@ public class AVChatKit { ...@@ -162,7 +166,7 @@ public class AVChatKit {
*/ */
public static void outgoingTeamCall(Context context, boolean receivedCall, String teamId, String roomId, ArrayList<String> accounts, String teamName) { public static void outgoingTeamCall(Context context, boolean receivedCall, String teamId, String roomId, ArrayList<String> accounts, String teamName) {
TeamAVChatActivity.startActivity(context, receivedCall, teamId, roomId, accounts, teamName); TeamAVChatActivity.startActivity(context, receivedCall, teamId, roomId, accounts, teamName);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"outgoingTeamCall 发起群组音视频通话呼叫");
} }
/** /**
......
...@@ -35,6 +35,7 @@ public abstract class AVChatBaseUI extends AppCompatActivity { ...@@ -35,6 +35,7 @@ public abstract class AVChatBaseUI extends AppCompatActivity {
super.onStart(); super.onStart();
} }
@Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
......
...@@ -157,6 +157,7 @@ public class CustomAlertDialog extends AlertDialog { ...@@ -157,6 +157,7 @@ public class CustomAlertDialog extends AlertDialog {
} }
} }
@Override
public void setTitle(int resId) { public void setTitle(int resId) {
this.title = context.getString(resId); this.title = context.getString(resId);
isTitleVisible = TextUtils.isEmpty(title) ? false : true; isTitleVisible = TextUtils.isEmpty(title) ? false : true;
......
...@@ -11,6 +11,8 @@ import android.os.Build; ...@@ -11,6 +11,8 @@ import android.os.Build;
import android.telephony.TelephonyManager; import android.telephony.TelephonyManager;
import android.text.TextUtils; import android.text.TextUtils;
import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.avchatkit.common.log.LogUtil; import com.yidianling.avchatkit.common.log.LogUtil;
public class NetworkUtil { public class NetworkUtil {
...@@ -79,8 +81,9 @@ public class NetworkUtil { ...@@ -79,8 +81,9 @@ public class NetworkUtil {
NetworkInfo networkInfo = getActiveNetworkInfo(context); NetworkInfo networkInfo = getActiveNetworkInfo(context);
if (networkInfo == null) { if (networkInfo == null) {
return -1; return -1;
} else } else {
return networkInfo.getType(); return networkInfo.getType();
}
} }
...@@ -145,7 +148,7 @@ public class NetworkUtil { ...@@ -145,7 +148,7 @@ public class NetworkUtil {
} }
} }
curNetworkType = type; curNetworkType = type;
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.NETSTATUS, "网络类型:" + type);
return type; return type;
} }
...@@ -271,8 +274,11 @@ public class NetworkUtil { ...@@ -271,8 +274,11 @@ public class NetworkUtil {
NetworkInfo ni = cm.getActiveNetworkInfo(); NetworkInfo ni = cm.getActiveNetworkInfo();
if (ni != null) { if (ni != null) {
if (ni.getType() == ConnectivityManager.TYPE_WIFI) { if (ni.getType() == ConnectivityManager.TYPE_WIFI) {
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.NETSTATUS, "网络类型:TYPE_WIFI");
return true; return true;
} else { } else {
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.NETSTATUS, "网络类型:非WIFI环境");
return false; return false;
} }
} else { } else {
......
...@@ -35,6 +35,8 @@ import com.netease.nimlib.sdk.avchat.model.AVChatParameters; ...@@ -35,6 +35,8 @@ import com.netease.nimlib.sdk.avchat.model.AVChatParameters;
import com.netease.nimlib.sdk.avchat.video.AVChatCameraCapturer; import com.netease.nimlib.sdk.avchat.video.AVChatCameraCapturer;
import com.netease.nimlib.sdk.avchat.video.AVChatVideoCapturerFactory; import com.netease.nimlib.sdk.avchat.video.AVChatVideoCapturerFactory;
import com.netease.nrtc.video.render.IVideoRender; import com.netease.nrtc.video.render.IVideoRender;
import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.avchatkit.AVChatKit; import com.yidianling.avchatkit.AVChatKit;
import com.yidianling.avchatkit.TeamAVChatProfile; import com.yidianling.avchatkit.TeamAVChatProfile;
import com.yidianling.avchatkit.common.activity.AVChatBaseUI; import com.yidianling.avchatkit.common.activity.AVChatBaseUI;
...@@ -436,6 +438,7 @@ public class TeamAVChatActivity extends AVChatBaseUI { ...@@ -436,6 +438,7 @@ public class TeamAVChatActivity extends AVChatBaseUI {
public void onSuccess(AVChatData data) { public void onSuccess(AVChatData data) {
chatId = data.getChatId(); chatId = data.getChatId();
LogUtil.i(TAG, "join room success, roomId=" + roomId + ", chatId=" + chatId); LogUtil.i(TAG, "join room success, roomId=" + roomId + ", chatId=" + chatId);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"join room success, roomId=" + roomId + ", chatId=" + chatId);
} }
@Override @Override
...@@ -458,13 +461,17 @@ public class TeamAVChatActivity extends AVChatBaseUI { ...@@ -458,13 +461,17 @@ public class TeamAVChatActivity extends AVChatBaseUI {
startLocalPreview(); startLocalPreview();
startTimerForCheckReceivedCall(); startTimerForCheckReceivedCall();
LogUtil.i(TAG, "team avchat running..." + ", roomId=" + roomId); LogUtil.i(TAG, "team avchat running..." + ", roomId=" + roomId);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"onJoinRoomSuccess 进入房间成功");
} }
private void onJoinRoomFailed(int code, Throwable e) { private void onJoinRoomFailed(int code, Throwable e) {
if (code == ResponseCode.RES_ENONEXIST) { if (code == ResponseCode.RES_ENONEXIST) {
showToast(getString(R.string.im_t_avchat_join_fail_not_exist)); showToast(getString(R.string.im_t_avchat_join_fail_not_exist));
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"startRtc 进入房间失败 房间不存在 code:"+code);
} else { } else {
showToast("join room failed, code=" + code + ", e=" + (e == null ? "" : e.getMessage())); showToast("join room failed, code=" + code + ", e=" + (e == null ? "" : e.getMessage()));
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"join room failed, code=" + code + ", e=" + (e == null ? "" : e.getMessage()));
} }
} }
...@@ -483,6 +490,7 @@ public class TeamAVChatActivity extends AVChatBaseUI { ...@@ -483,6 +490,7 @@ public class TeamAVChatActivity extends AVChatBaseUI {
updateAudioMuteButtonState(); updateAudioMuteButtonState();
LogUtil.i(TAG, "on user joined, account=" + account); LogUtil.i(TAG, "on user joined, account=" + account);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"on user joined, account=" + account);
} }
public void onAVChatUserLeave(String account) { public void onAVChatUserLeave(String account) {
...@@ -496,6 +504,7 @@ public class TeamAVChatActivity extends AVChatBaseUI { ...@@ -496,6 +504,7 @@ public class TeamAVChatActivity extends AVChatBaseUI {
updateAudioMuteButtonState(); updateAudioMuteButtonState();
LogUtil.i(TAG, "on user leave, account=" + account); LogUtil.i(TAG, "on user leave, account=" + account);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"on user leave, account=" + account);
} }
private void startLocalPreview() { private void startLocalPreview() {
......
...@@ -19,6 +19,8 @@ import com.ydl.ydlcommon.utils.NetworkParamsUtils ...@@ -19,6 +19,8 @@ import com.ydl.ydlcommon.utils.NetworkParamsUtils
import com.ydl.ydlcommon.utils.UserInfoCache import com.ydl.ydlcommon.utils.UserInfoCache
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils.Companion.handleError import com.ydl.ydlcommon.utils.remind.HttpErrorUtils.Companion.handleError
import com.ydl.ydlcommon.view.dialog.CommonDialog import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper.Companion.getInstance
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.R import com.yidianling.im.R
...@@ -194,6 +196,7 @@ object IMChatUtil { ...@@ -194,6 +196,7 @@ object IMChatUtil {
isFromQingShu: Int, isFromQingShu: Int,
context: AppCompatActivity context: AppCompatActivity
) { ) {
getInstance().sendLog(AliYunLogConfig.YUNXIN, "startChatSession 开启聊天会话")
val p2PCustomActionHandlerImpl = P2PCustomActionHandlerImpl(toUid, expertInfo) val p2PCustomActionHandlerImpl = P2PCustomActionHandlerImpl(toUid, expertInfo)
p2PCustomActionHandlerImpl.isFromQingShu = isFromQingShu p2PCustomActionHandlerImpl.isFromQingShu = isFromQingShu
SessionHelper.startP2PSession( SessionHelper.startP2PSession(
...@@ -278,7 +281,7 @@ object IMChatUtil { ...@@ -278,7 +281,7 @@ object IMChatUtil {
} else { } else {
upLoadLog("consult/get-expert", resp.code, resp.msg) upLoadLog("consult/get-expert", resp.code, resp.msg)
if (resp.code == ImConstants.HTTP_CODE_UNLOGIN) { if (resp.code == ImConstants.HTTP_CODE_UNLOGIN) {
ImIn.loginByOneKeyLogin(context,true) ImIn.loginByOneKeyLogin(context, true)
ToastUtil.toastShort(resp.msg) ToastUtil.toastShort(resp.msg)
} else if (resp.code == ImConstants.SILENCED_CODE) { //禁言 } else if (resp.code == ImConstants.SILENCED_CODE) { //禁言
showSilencedDialog(context, resp.data.tips, resp.data.url) showSilencedDialog(context, resp.data.tips, resp.data.url)
...@@ -326,7 +329,7 @@ object IMChatUtil { ...@@ -326,7 +329,7 @@ object IMChatUtil {
} else { } else {
upLoadLog("consult/get-expert", resp.code, resp.msg) upLoadLog("consult/get-expert", resp.code, resp.msg)
if (resp.code == ImConstants.HTTP_CODE_UNLOGIN) { if (resp.code == ImConstants.HTTP_CODE_UNLOGIN) {
ImIn.loginByOneKeyLogin(context,true) ImIn.loginByOneKeyLogin(context, true)
ToastUtil.toastShort(resp.msg) ToastUtil.toastShort(resp.msg)
} else if (resp.code == ImConstants.SILENCED_CODE) { //禁言 } else if (resp.code == ImConstants.SILENCED_CODE) { //禁言
showSilencedDialog(context, resp.data.tips, resp.data.url) showSilencedDialog(context, resp.data.tips, resp.data.url)
...@@ -367,7 +370,9 @@ object IMChatUtil { ...@@ -367,7 +370,9 @@ object IMChatUtil {
tb.setmMinTitleVisiable(View.GONE) tb.setmMinTitleVisiable(View.GONE)
} else { } else {
//对方是用户,自己是助理 //对方是用户,自己是助理
if (actionHandler.userType == USER_TYPE_USER && ModularServiceManager.provide(IUserService::class.java) if (actionHandler.userType == USER_TYPE_USER && ModularServiceManager.provide(
IUserService::class.java
)
.getUserInfo()?.user_type == USER_TYPE_ASSISTANT .getUserInfo()?.user_type == USER_TYPE_ASSISTANT
) { ) {
tb.setTitleTextRightIcon(R.drawable.user_info_icon) { tb.setTitleTextRightIcon(R.drawable.user_info_icon) {
......
...@@ -5,6 +5,8 @@ import android.content.Context; ...@@ -5,6 +5,8 @@ import android.content.Context;
import com.netease.nimlib.sdk.msg.attachment.MsgAttachment; import com.netease.nimlib.sdk.msg.attachment.MsgAttachment;
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum; import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
import com.netease.nimlib.sdk.msg.model.IMMessage; import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.nimbase.api.BaseNimUIKit; import com.yidianling.nimbase.api.BaseNimUIKit;
import com.yidianling.nimbase.api.model.session.SessionCustomization; import com.yidianling.nimbase.api.model.session.SessionCustomization;
import com.yidianling.uikit.business.contact.selector.activity.ContactSelectActivity; import com.yidianling.uikit.business.contact.selector.activity.ContactSelectActivity;
...@@ -30,6 +32,7 @@ public class NimUIKit extends BaseNimUIKit { ...@@ -30,6 +32,7 @@ public class NimUIKit extends BaseNimUIKit {
*/ */
public static void startYDLChatting(Context context, String id, SessionTypeEnum sessionType, SessionCustomization public static void startYDLChatting(Context context, String id, SessionTypeEnum sessionType, SessionCustomization
customization, IMMessage anchor, IP2PCustomActionHandler handler) { customization, IMMessage anchor, IP2PCustomActionHandler handler) {
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "startYDLChatting 打开壹点灵定制聊天窗口,开始聊天");
NimUIKitImpl.startChatting(context, id, sessionType, customization, anchor, handler); NimUIKitImpl.startChatting(context, id, sessionType, customization, anchor, handler);
} }
......
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