修复33000问题
This commit is contained in:
parent
fcd13751c9
commit
8d87dda691
@ -5,24 +5,28 @@ import android.graphics.Color;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.TreeMap;
|
||||
|
||||
public class DebugDialogAdapter extends RecyclerView.Adapter<DebugDialogAdapter.DebugViewHolder> {
|
||||
TreeMap<String, String> paramMap = new TreeMap<>();
|
||||
HashMap<String, View> paramMap = new HashMap<>();
|
||||
private Context mContext;
|
||||
|
||||
public DebugDialogAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
public void setParamMap(TreeMap<String, String> paramMap) {
|
||||
public void setParamMap(HashMap<String, View> paramMap) {
|
||||
Log.i("debug弹窗", "setParamMap: 添加值到view " + paramMap.size());
|
||||
this.paramMap = paramMap;
|
||||
notifyDataSetChanged();
|
||||
@ -31,7 +35,8 @@ public class DebugDialogAdapter extends RecyclerView.Adapter<DebugDialogAdapter.
|
||||
@NonNull
|
||||
@Override
|
||||
public DebugViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new DebugViewHolder(new TextView(mContext));
|
||||
Log.i("debug弹窗", "onCreateViewHolder: 创建适配器");
|
||||
return new DebugViewHolder(new LinearLayout(mContext));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -53,10 +58,24 @@ public class DebugDialogAdapter extends RecyclerView.Adapter<DebugDialogAdapter.
|
||||
super(itemView);
|
||||
}
|
||||
|
||||
public void setData(String tag, String msg) {
|
||||
Log.i("debug弹窗", "setData: 添加值到view " + tag + "|" + msg);
|
||||
((TextView) itemView).setText(tag + ":" + msg);
|
||||
((TextView) itemView).setTextColor(Color.BLACK);
|
||||
public void setData(String msg, View view) {
|
||||
Log.i("debug弹窗", "setData: 添加值到view " + view + "|" + msg + "|" + ((LinearLayout) itemView).indexOfChild(view));
|
||||
if (view instanceof TextView && StringUtil.isEmpty(((TextView) view).getText().toString())) {
|
||||
((TextView) view).setText(msg);
|
||||
}
|
||||
int indexOfChild = ((LinearLayout) itemView).indexOfChild(view);
|
||||
if (indexOfChild != -1) {
|
||||
if (((LinearLayout) itemView).getChildAt(indexOfChild) instanceof TextView) {
|
||||
((TextView) ((LinearLayout) itemView).getChildAt(indexOfChild)).setText(msg);
|
||||
} else {
|
||||
((LinearLayout) itemView).removeViewAt(indexOfChild);
|
||||
}
|
||||
} else {
|
||||
if (view.getParent() != null) {
|
||||
((ViewGroup) view.getParent()).removeView(view);
|
||||
}
|
||||
((LinearLayout) itemView).addView(view);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,10 +3,10 @@ package com.yunbao.common.dialog;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@ -19,23 +19,32 @@ import com.yunbao.common.adapter.DebugDialogAdapter;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.TreeMap;
|
||||
|
||||
|
||||
public class DebugDialog {
|
||||
RecyclerView recyclerView;
|
||||
TreeMap<String, String> params;
|
||||
HashMap<String, View> params;
|
||||
DebugDialogAdapter adapter;
|
||||
private static DebugDialog debugDialog;
|
||||
Context mContext;
|
||||
private ShowPattern showPattern = ShowPattern.CURRENT_ACTIVITY;
|
||||
|
||||
public static DebugDialog getInstance() {
|
||||
private DebugDialogRunnable runnable;
|
||||
|
||||
public static void getInstance(DebugDialogRunnable runnable) {
|
||||
if (debugDialog == null) {
|
||||
debugDialog = new DebugDialog();
|
||||
debugDialog = new DebugDialog(runnable);
|
||||
} else {
|
||||
runnable.run(debugDialog);
|
||||
}
|
||||
return debugDialog;
|
||||
debugDialog.showPattern = ShowPattern.CURRENT_ACTIVITY;
|
||||
}
|
||||
|
||||
public static boolean checkShow() {
|
||||
return EasyFloat.isShow("debug");
|
||||
}
|
||||
|
||||
public DebugDialog clear() {
|
||||
@ -45,37 +54,33 @@ public class DebugDialog {
|
||||
|
||||
public void setParams(String tag, String msg) {
|
||||
Log.i("debug弹窗", "setParams: " + tag + "|" + msg);
|
||||
params.put(tag, msg);
|
||||
if (adapter != null)
|
||||
if (params.containsKey(tag)) {
|
||||
((TextView) params.get(tag)).setText(tag + ":" + msg);
|
||||
} else {
|
||||
TextView textView = new TextView(mContext);
|
||||
textView.setText(tag + ":" + msg);
|
||||
params.put(tag, textView);
|
||||
adapter.setParamMap(params);
|
||||
}
|
||||
EasyFloat.updateFloat("debug");
|
||||
}
|
||||
|
||||
private DebugDialog() {
|
||||
private DebugDialog(DebugDialogRunnable runnable) {
|
||||
this.runnable = runnable;
|
||||
if (params == null) {
|
||||
Log.i("debug弹窗", "DebugDialog: 初始化参数");
|
||||
params = new TreeMap<>();
|
||||
params = new HashMap<>();
|
||||
}
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
this.mContext = AppManager.getInstance().getMainActivity();
|
||||
if (mContext == null) {
|
||||
startWaitMainActivity();
|
||||
return;
|
||||
}
|
||||
if (PermissionUtils.checkPermission(mContext)) {
|
||||
createView();
|
||||
} else {
|
||||
PermissionUtils.requestPermission((Activity) mContext, new OnPermissionResult() {
|
||||
@Override
|
||||
public void permissionResult(boolean b) {
|
||||
ToastUtil.show("悬浮权限" + b);
|
||||
if (b) {
|
||||
createView();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
runnable.run(this);
|
||||
// createView();
|
||||
}
|
||||
|
||||
@ -92,6 +97,30 @@ public class DebugDialog {
|
||||
}, 0, 1000);
|
||||
}
|
||||
|
||||
public void close() {
|
||||
EasyFloat.dismiss("debug");
|
||||
}
|
||||
|
||||
public void show() {
|
||||
if (showPattern == ShowPattern.CURRENT_ACTIVITY) {
|
||||
createView();
|
||||
return;
|
||||
}
|
||||
if (PermissionUtils.checkPermission(mContext)) {
|
||||
createView();
|
||||
} else {
|
||||
PermissionUtils.requestPermission((Activity) mContext, new OnPermissionResult() {
|
||||
@Override
|
||||
public void permissionResult(boolean b) {
|
||||
ToastUtil.show("悬浮权限" + b);
|
||||
if (b) {
|
||||
createView();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected void createView() {
|
||||
recyclerView = new RecyclerView(mContext);
|
||||
adapter = new DebugDialogAdapter(mContext);
|
||||
@ -99,21 +128,42 @@ public class DebugDialog {
|
||||
recyclerView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setBackgroundColor(Color.WHITE);
|
||||
TextView textView = new TextView(mContext);
|
||||
textView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
ToastUtil.show("debug弹窗:" + params.size());
|
||||
EasyFloat.updateFloat("debug");
|
||||
}
|
||||
});
|
||||
params.put("debug弹窗", textView);
|
||||
adapter.setParamMap(params);
|
||||
|
||||
EasyFloat.with(mContext)
|
||||
.setTag("debug")
|
||||
.setShowPattern(ShowPattern.FOREGROUND)
|
||||
.setShowPattern(this.showPattern)
|
||||
.setLayout(recyclerView)
|
||||
.show();
|
||||
if(!params.isEmpty()){
|
||||
|
||||
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
adapter.setParamMap(params);
|
||||
}
|
||||
},1000);
|
||||
Log.i("debug弹窗", "createView: 有值");
|
||||
}
|
||||
runnable.run(this);
|
||||
Log.i("debug弹窗", "createView: 创建");
|
||||
}
|
||||
|
||||
public void setView(String value, View view, View.OnClickListener onClickListener) {
|
||||
if (params.containsKey(value)) {
|
||||
params.get(value).setOnClickListener(onClickListener);
|
||||
} else {
|
||||
view.setOnClickListener(onClickListener);
|
||||
params.put(value, view);
|
||||
}
|
||||
adapter.setParamMap(params);
|
||||
EasyFloat.updateFloat("debug");
|
||||
}
|
||||
|
||||
public void setShowPattern(ShowPattern showPattern) {
|
||||
this.showPattern = showPattern;
|
||||
}
|
||||
|
||||
public interface DebugDialogRunnable {
|
||||
void run(DebugDialog dialog);
|
||||
}
|
||||
}
|
||||
|
@ -484,7 +484,7 @@ public class GameMicManager {
|
||||
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;
|
||||
TextMessage messageContent = TextMessage.obtain(new Gson().toJson(sudGameSocketImEvent));
|
||||
Message message = Message.obtain("v" + mRoomID, conversationType, messageContent);
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
|
@ -15,9 +15,14 @@ import com.bumptech.glide.request.RequestOptions;
|
||||
import com.iflytek.cloud.SpeechConstant;
|
||||
import com.iflytek.cloud.SpeechUtility;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.dialog.DebugDialog;
|
||||
import com.yunbao.common.event.RongIMConnectionStatusEvent;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
@ -25,6 +30,7 @@ import io.rong.imkit.GlideKitImageEngine;
|
||||
import io.rong.imkit.IMCenter;
|
||||
import io.rong.imkit.RongIM;
|
||||
import io.rong.imkit.config.RongConfigCenter;
|
||||
import io.rong.imlib.IRongCallback;
|
||||
import io.rong.imlib.RongIMClient;
|
||||
import io.rong.imlib.model.Conversation;
|
||||
import io.rong.imlib.model.Message;
|
||||
@ -112,12 +118,31 @@ public class RongcloudIMManager {
|
||||
|
||||
}
|
||||
|
||||
public static void connectIM(Context context) {
|
||||
connectIM(context, new RongIMClient.ConnectCallback() {
|
||||
@Override
|
||||
public void onSuccess(String t) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(RongIMClient.ConnectionErrorCode e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDatabaseOpened(RongIMClient.DatabaseOpenStatus code) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 连接融云服务器
|
||||
*
|
||||
* @param context
|
||||
*/
|
||||
public static void connectIM(Context context) {
|
||||
public static void connectIM(Context context, RongIMClient.ConnectCallback callback) {
|
||||
MessageIMManager.get(context).addImRongCloudObserver();
|
||||
MessageIMManager.get(context).getSystemMessages();
|
||||
IMLoginModel userInfo = IMLoginManager.get(context).getUserInfo();
|
||||
@ -129,6 +154,7 @@ public class RongcloudIMManager {
|
||||
RongIM.connect(IMToken, 0, new RongIMClient.ConnectCallback() {
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
callback.onSuccess(s);
|
||||
//连接成功,如果 onDatabaseOpened() 时没有页面跳转,也可在此时进行跳转。
|
||||
Log.e(CLASSNAME, "onSuccess:" + s);
|
||||
isReady = true;
|
||||
@ -138,6 +164,7 @@ public class RongcloudIMManager {
|
||||
|
||||
@Override
|
||||
public void onError(RongIMClient.ConnectionErrorCode connectionErrorCode) {
|
||||
callback.onError(connectionErrorCode);
|
||||
if (connectionErrorCode.equals(RongIMClient.ConnectionErrorCode.RC_CONN_TOKEN_EXPIRE)) {
|
||||
//从 APP 服务请求新 token,获取到新 token 后重新 connect()
|
||||
Log.e(CLASSNAME, "onError:(从 APP 服务请求新 token)" + RongIMClient.ConnectionErrorCode.RC_CONN_TOKEN_EXPIRE);
|
||||
@ -152,6 +179,7 @@ public class RongcloudIMManager {
|
||||
|
||||
@Override
|
||||
public void onDatabaseOpened(RongIMClient.DatabaseOpenStatus databaseOpenStatus) {
|
||||
callback.onDatabaseOpened(databaseOpenStatus);
|
||||
if (RongIMClient.DatabaseOpenStatus.DATABASE_OPEN_SUCCESS.equals(databaseOpenStatus)) {
|
||||
//本地数据库打开,跳转到会话列表页面
|
||||
Log.e(CLASSNAME, "onDatabaseOpened:(本地数据库打开)" + databaseOpenStatus);
|
||||
@ -225,4 +253,66 @@ public class RongcloudIMManager {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发送消息失败重连次数,超过3就重新登录
|
||||
*/
|
||||
private static int reconnectIndex = 0;
|
||||
|
||||
public static void sendMessage(final Message message, final String pushContent, final String pushData, final IRongCallback.ISendMessageCallback callback) {
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, pushContent, pushData, new IRongCallback.ISendMessageCallback() {
|
||||
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
if (callback != null) {
|
||||
callback.onAttached(message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Message message) {
|
||||
reconnectIndex = 0;
|
||||
if (callback != null) {
|
||||
callback.onSuccess(message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Message message, RongIMClient.ErrorCode errorCode) {
|
||||
if (reconnectIndex > 2) {
|
||||
reconnectIndex = 0;
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.login_invalid));
|
||||
EventBus.getDefault().post(new RongIMConnectionStatusEvent());
|
||||
return;
|
||||
}
|
||||
if (errorCode.code == 33000) {
|
||||
reconnectIndex++;
|
||||
connectIM(AppManager.getInstance().getMainActivity(), new RongIMClient.ConnectCallback() {
|
||||
@Override
|
||||
public void onSuccess(String t) {
|
||||
sendMessage(message, pushContent, pushData, callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(RongIMClient.ConnectionErrorCode e) {
|
||||
sendMessage(message, pushContent, pushData, callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDatabaseOpened(RongIMClient.DatabaseOpenStatus code) {
|
||||
if (RongIMClient.DatabaseOpenStatus.DATABASE_OPEN_ERROR.equals(code)) {
|
||||
sendMessage(message, pushContent, pushData, callback);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (callback != null) {
|
||||
callback.onError(message, errorCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -70,6 +70,7 @@ import com.yunbao.common.manager.IMRTCManager;
|
||||
import com.yunbao.common.manager.MicUserManager;
|
||||
import com.yunbao.common.manager.MicedUserManager;
|
||||
import com.yunbao.common.manager.RandomPkManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.BitmapUtil;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DateFormatUtil;
|
||||
@ -429,7 +430,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
TextMessage messageContent = TextMessage.obtain(msg1.mResult.toString());
|
||||
Message message = Message.obtain("g" + mLiveUid, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
@ -1873,7 +1874,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
Message message = Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
|
@ -30,6 +30,7 @@ import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
import com.yunbao.common.manager.MicUserManager;
|
||||
import com.yunbao.common.manager.MicedUserManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.CommonIconUtil;
|
||||
import com.yunbao.common.utils.SVGAViewUtils;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
@ -181,7 +182,7 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter<UserBean> {
|
||||
Conversation.ConversationType conversationType = Conversation.ConversationType.PRIVATE;
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(bean.getId(), conversationType, messageContent);
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(io.rong.imlib.model.Message message) {
|
||||
|
||||
|
@ -25,6 +25,7 @@ import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
@ -204,7 +205,7 @@ public class LiveMicUserDialogFragment extends AbsDialogFragment implements View
|
||||
TextMessage messageContent = TextMessage.obtain(msg1.mResult.toString());
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(io.rong.imlib.model.Message message) {
|
||||
|
||||
@ -253,7 +254,7 @@ public class LiveMicUserDialogFragment extends AbsDialogFragment implements View
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(io.rong.imlib.model.Message message) {
|
||||
|
||||
|
@ -49,6 +49,7 @@ import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.IMRTCManager;
|
||||
import com.yunbao.common.manager.RandomPkManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
@ -805,7 +806,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
TextMessage messageContent = TextMessage.obtain(msg1.mResult.toString());
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain("g" + CommonAppConfig.getInstance().getUid(), conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(io.rong.imlib.model.Message message) {
|
||||
|
||||
@ -1068,7 +1069,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
TextMessage messageContent = TextMessage.obtain(msg1.mResult.toString());
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(io.rong.imlib.model.Message message) {
|
||||
|
||||
@ -1343,7 +1344,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
TextMessage messageContent = TextMessage.obtain(msg1.mResult.toString());
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(io.rong.imlib.model.Message message) {
|
||||
|
||||
@ -1439,7 +1440,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
TextMessage messageContent = TextMessage.obtain(msg1.mResult.toString());
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(io.rong.imlib.model.Message message) {
|
||||
|
||||
@ -1543,7 +1544,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
TextMessage messageContent = TextMessage.obtain(msg1.mResult.toString());
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(io.rong.imlib.model.Message message) {
|
||||
|
||||
@ -1585,7 +1586,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
TextMessage messageContent = TextMessage.obtain(msg1.mResult.toString());
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(io.rong.imlib.model.Message message) {
|
||||
|
||||
|
@ -13,6 +13,7 @@ import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
@ -55,7 +56,7 @@ public class SocketRyChatUtil {
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
Message message = Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
@ -121,7 +122,7 @@ public class SocketRyChatUtil {
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
Message message = Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
@ -192,7 +193,7 @@ public class SocketRyChatUtil {
|
||||
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
Message message = Message.obtain(targetId, conversationType, messageContent);
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
@ -257,7 +258,7 @@ public class SocketRyChatUtil {
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
Message message = Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
@ -396,7 +397,7 @@ public class SocketRyChatUtil {
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
Message message = Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
@ -466,7 +467,7 @@ public class SocketRyChatUtil {
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
Message message = Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
@ -513,7 +514,7 @@ public class SocketRyChatUtil {
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
Message message = Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
@ -550,7 +551,7 @@ public class SocketRyChatUtil {
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
Message message = Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
@ -593,7 +594,7 @@ public class SocketRyChatUtil {
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
Message message = Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
@ -630,7 +631,7 @@ public class SocketRyChatUtil {
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
Message message = Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
@ -670,7 +671,7 @@ public class SocketRyChatUtil {
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
Message message = Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
@ -776,7 +777,7 @@ public class SocketRyChatUtil {
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
Message message = Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
|
@ -7,6 +7,7 @@ import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
|
||||
import io.rong.imlib.IRongCallback;
|
||||
@ -73,7 +74,7 @@ public class SocketRyLinkMicPkUtil {
|
||||
TextMessage messageContent = TextMessage.obtain(msg1.mResult.toString());
|
||||
Message message1 = Message.obtain("g" + CommonAppConfig.getInstance().getUid(), conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message1, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message1, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
@ -136,7 +137,7 @@ public class SocketRyLinkMicPkUtil {
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
Message message = Message.obtain(pkUid, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
|
@ -46,6 +46,7 @@ import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.IMRTCManager;
|
||||
import com.yunbao.common.manager.RandomPkManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
@ -258,7 +259,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
|
||||
TextMessage messageContent = TextMessage.obtain(msg1.mResult.toString());
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(targetId, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(io.rong.imlib.model.Message message) {
|
||||
|
||||
|
@ -29,6 +29,7 @@ import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.lzf.easyfloat.EasyFloat;
|
||||
import com.lzf.easyfloat.permission.PermissionUtils;
|
||||
import com.lzf.easyfloat.utils.LifecycleUtils;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.MobclickAgent;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
@ -1005,7 +1006,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(liveID, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(io.rong.imlib.model.Message message) {
|
||||
|
||||
|
@ -59,6 +59,7 @@ import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.interfaces.OnItemLongClickListener;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
@ -589,7 +590,7 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli
|
||||
messagesList.remove(position);
|
||||
setDellPosition(position);
|
||||
}
|
||||
RongIMClient.getInstance().sendMessage(inMessage, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
RongcloudIMManager.sendMessage(inMessage, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
Loading…
Reference in New Issue
Block a user