add[声望升级-AB面]
This commit is contained in:
@@ -267,13 +267,15 @@ public class Constants {
|
||||
public static final String LIVE_PK_RANDOM_START="RankingStartRandomPK";
|
||||
public static final int LIVE_SDK_KSY = 0;//金山推流
|
||||
public static final int LIVE_SDK_TX = 1;//腾讯推流
|
||||
|
||||
public static final int LIVE_SDK_SW = 2;//声网
|
||||
|
||||
public static final String LIVE_SDK_IS_SW = "liveSdkIsSw"; //是否是聲網
|
||||
|
||||
public static final int LINK_MIC_TYPE_NORMAL = 0;//观众与主播连麦
|
||||
public static final int LINK_MIC_TYPE_ANCHOR = 1;//主播与主播连麦
|
||||
|
||||
public static final String SOCKET_LIVE_ANCHOR_PK_DIALOG="GuildCompetitionNotice";//公会赛弹窗
|
||||
|
||||
//视频举报获取位置
|
||||
public static int xIndex = 0;
|
||||
public static int yindex = 0;
|
||||
|
||||
@@ -424,7 +424,7 @@ public class WebViewActivity extends AbsActivity {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk,boolean isSw) {
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
@@ -440,7 +440,7 @@ public class WebViewActivity extends AbsActivity {
|
||||
}
|
||||
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)));
|
||||
} else {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk),isSw);
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
@@ -24,6 +25,9 @@ public class AiAutomaticSpeechModel extends BaseModel {
|
||||
//气泡背景
|
||||
@SerializedName("system_bubble")
|
||||
private String systemBubble;
|
||||
@SerializedName("icon_en")
|
||||
@JSONField(name = "icon_en")
|
||||
private String iconEn;
|
||||
|
||||
public String getNameColor() {
|
||||
return nameColor;
|
||||
@@ -47,6 +51,16 @@ public class AiAutomaticSpeechModel extends BaseModel {
|
||||
return content;
|
||||
}
|
||||
|
||||
|
||||
public String getIconEn() {
|
||||
return iconEn;
|
||||
}
|
||||
|
||||
public AiAutomaticSpeechModel setIconEn(String iconEn) {
|
||||
this.iconEn = iconEn;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AiAutomaticSpeechModel setContent(String content) {
|
||||
this.content = content;
|
||||
return this;
|
||||
|
||||
@@ -13,6 +13,16 @@ public class CheckLiveModel extends BaseModel {
|
||||
private String typeMsg;
|
||||
@SerializedName("live_sdk")
|
||||
private String liveSdk;
|
||||
@SerializedName("is_shengwang")
|
||||
private String isShengwang;
|
||||
|
||||
public String getIsShengwang() {
|
||||
return isShengwang;
|
||||
}
|
||||
|
||||
public void setIsShengwang(String isShengwang) {
|
||||
this.isShengwang = isShengwang;
|
||||
}
|
||||
|
||||
public static CheckLiveModel objectFromData(String str) {
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ public class EnterRoomNewModel extends BaseModel {
|
||||
private SudGameDateModel sudGameDateModel;
|
||||
@SerializedName("quick_gift_remaining_quantity")
|
||||
private int quickGiftRemainingQuantity;//剩余的小PD礼物数量
|
||||
|
||||
@SerializedName("if_viewing_duration_complete")
|
||||
private int ifViewingDurationComplete;//通过观看时间获取小PD礼物的次数
|
||||
@SerializedName("sendMoneyLongStatus")
|
||||
|
||||
@@ -115,6 +115,35 @@ public class SendBlindGiftEvent extends BaseModel {
|
||||
private String liveGiftNotify;
|
||||
@SerializedName("userNiceName")
|
||||
private String userNiceName;
|
||||
@SerializedName("special_gift")
|
||||
private int specialGift;
|
||||
@SerializedName("special_gift_name")
|
||||
private String specialGiftName;
|
||||
@SerializedName("special_gift_name_en")
|
||||
private String specialGiftNameEn;
|
||||
public int getSpecialGift() {
|
||||
return specialGift;
|
||||
}
|
||||
|
||||
public void setSpecialGift(int specialGift) {
|
||||
this.specialGift = specialGift;
|
||||
}
|
||||
|
||||
public String getSpecialGiftName() {
|
||||
return specialGiftName;
|
||||
}
|
||||
|
||||
public void setSpecialGiftName(String specialGiftName) {
|
||||
this.specialGiftName = specialGiftName;
|
||||
}
|
||||
|
||||
public String getSpecialGiftNameEn() {
|
||||
return specialGiftNameEn;
|
||||
}
|
||||
|
||||
public void setSpecialGiftNameEn(String specialGiftNameEn) {
|
||||
this.specialGiftNameEn = specialGiftNameEn;
|
||||
}
|
||||
|
||||
public String getUserNiceName() {
|
||||
return userNiceName;
|
||||
|
||||
@@ -764,7 +764,7 @@ public class LiveHttpUtil {
|
||||
* @param file 封面图片文件
|
||||
* @param callback
|
||||
*/
|
||||
public static void newcreateRoom(String title, int liveClassId, int type, int typeVal, File file, int clarityType, HttpCallback callback) {
|
||||
public static void newcreateRoom(String title, int liveClassId, int type, int typeVal, File file, int clarityType,boolean isSw, HttpCallback callback) {
|
||||
|
||||
PostRequest<JsonBean> request = HttpClient.getInstance().post("Live.createRoom2", LiveHttpConsts.CREATE_ROOM)
|
||||
.params("title", title)
|
||||
@@ -773,6 +773,7 @@ public class LiveHttpUtil {
|
||||
.params("landscape", "2")
|
||||
.params("class_type", "0")
|
||||
.params("type_val", typeVal)
|
||||
.params("is_shengwang",isSw?1:0)
|
||||
.params("clarityType", clarityType);
|
||||
if (file != null) {
|
||||
request.params("file", file);
|
||||
@@ -817,6 +818,15 @@ public class LiveHttpUtil {
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否是声网开播
|
||||
* @param callback
|
||||
*/
|
||||
public static void getIsSw(HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Tx.setRtcFirm", "Tx.setRtcFirm")
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 腾讯sdk 跟主播连麦时,获取主播的低延时流
|
||||
*/
|
||||
|
||||
@@ -15,9 +15,13 @@ 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.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 +29,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 +117,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 +153,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 +163,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 +178,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 +252,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,6 +34,15 @@ public class AppManager {
|
||||
activityStack.add(activity);
|
||||
}
|
||||
|
||||
public Activity getMainActivity() {
|
||||
for (Activity activity : activityStack) {
|
||||
if (activity.getClass().getSimpleName().contains("MainActivity")) {
|
||||
return activity;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除Activity
|
||||
*/
|
||||
|
||||
@@ -358,6 +358,7 @@ public class DialogUitl {
|
||||
private boolean mCancelable;
|
||||
private boolean mBackgroundDimEnabled;//显示区域以外是否使用黑色半透明背景
|
||||
private boolean mInput;//是否是输入框的
|
||||
private boolean isShowCancelButton=true;
|
||||
private String mHint;
|
||||
private int mInputType;
|
||||
private int mLength;
|
||||
@@ -454,6 +455,11 @@ public class DialogUitl {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setShowCancelButton(boolean showCancelButton) {
|
||||
isShowCancelButton = showCancelButton;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Dialog build() {
|
||||
final Dialog dialog = new Dialog(mContext, mBackgroundDimEnabled ? R.style.dialog : R.style.dialog2);
|
||||
if (mView != 0) {
|
||||
@@ -498,6 +504,9 @@ public class DialogUitl {
|
||||
if (!TextUtils.isEmpty(mCancelString)) {
|
||||
btnCancel.setText(mCancelString);
|
||||
}
|
||||
if(!isShowCancelButton){
|
||||
btnCancel.setVisibility(View.GONE);
|
||||
}
|
||||
View.OnClickListener listener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
@@ -285,7 +285,7 @@ public class JavascriptInterfaceUtils {
|
||||
liveBean.setGiftId(giftId);
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk,boolean isSw) {
|
||||
|
||||
if (!"".endsWith(Constants.mStream)) {
|
||||
|
||||
@@ -295,7 +295,7 @@ public class JavascriptInterfaceUtils {
|
||||
}
|
||||
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)).setLiveEnd(true));
|
||||
} else {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk),isSw);
|
||||
}
|
||||
androidGoBack();
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ public class LiveRoomCheckLivePresenter {
|
||||
private LiveBean mLiveBean;
|
||||
private ActionListener mActionListener;
|
||||
private int mLiveSdk;
|
||||
private boolean isSw;
|
||||
//搜索页面不提示密码
|
||||
public static boolean isRoom = false;
|
||||
|
||||
@@ -50,7 +51,7 @@ public class LiveRoomCheckLivePresenter {
|
||||
@Override
|
||||
public void forwardNormalRoom(CheckLiveModel model) {
|
||||
if (actionListener != null) {
|
||||
actionListener.onLiveRoomChanged(liveUid, stream, model.getType(), model.getTypeVal(), model.getLiveSdk());
|
||||
actionListener.onLiveRoomChanged(liveUid, stream, model.getType(), model.getTypeVal(), model.getLiveSdk(),model.getIsShengwang().equals("1"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +75,7 @@ public class LiveRoomCheckLivePresenter {
|
||||
if (model.getTypeMsg().equalsIgnoreCase(password)) {
|
||||
dialog.dismiss();
|
||||
if (actionListener != null) {
|
||||
actionListener.onLiveRoomChanged(liveUid, stream, model.getType(), model.getTypeVal(), model.getLiveSdk());
|
||||
actionListener.onLiveRoomChanged(liveUid, stream, model.getType(), model.getTypeVal(), model.getLiveSdk(),model.getIsShengwang().equals("1"));
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(mContext.getString(R.string.live_password_error));
|
||||
@@ -93,7 +94,7 @@ public class LiveRoomCheckLivePresenter {
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
if (actionListener != null) {
|
||||
actionListener.onLiveRoomChanged(liveUid, stream, model.getType(), model.getTypeVal(), model.getLiveSdk());
|
||||
actionListener.onLiveRoomChanged(liveUid, stream, model.getType(), model.getTypeVal(), model.getLiveSdk(),model.getIsShengwang().equals("1"));
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
@@ -139,6 +140,7 @@ public class LiveRoomCheckLivePresenter {
|
||||
mLiveTypeMsg = obj.getString("type_msg");
|
||||
if (CommonAppConfig.LIVE_SDK_CHANGED) {
|
||||
mLiveSdk = obj.getIntValue("live_sdk");
|
||||
isSw= obj.getString("is_shengwang").equals("1");
|
||||
} else {
|
||||
mLiveSdk = CommonAppConfig.LIVE_SDK_USED;
|
||||
}
|
||||
@@ -263,17 +265,16 @@ public class LiveRoomCheckLivePresenter {
|
||||
*/
|
||||
private void enterLiveRoom() {
|
||||
if (mActionListener != null) {
|
||||
mActionListener.onLiveRoomChanged(mLiveBean, mLiveType, mLiveTypeVal, mLiveSdk);
|
||||
mActionListener.onLiveRoomChanged(mLiveBean, mLiveType, mLiveTypeVal, mLiveSdk,isSw);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public interface ActionListener {
|
||||
void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk);
|
||||
void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk,boolean isSw);
|
||||
}
|
||||
|
||||
public interface NewActionListener {
|
||||
void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk);
|
||||
void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk,boolean isSw);
|
||||
|
||||
void onCheckError(String contextError);
|
||||
}
|
||||
|
||||
@@ -46,23 +46,25 @@ public class RouteUtil {
|
||||
public static final String PATH_RED_PACKET_LIST = "/main/RedPacketListActivity";
|
||||
public static final String PATH_RED_PACKET_INFO = "/main/RedPacketInfoActivity";
|
||||
public static final String PATH_RED_PACKET_USER = "/main/RedPacketUsersActivity";
|
||||
public static final String PATH_SELECT_AVATAR="/main/UserAvatarSelectActivity";
|
||||
public static final String PATH_BattlePassActivity="/main/BattlePassActivity";
|
||||
public static final String PATH_SudGameActivity="/live/SudGameActivity";
|
||||
public static final String PATH_SELECT_AVATAR = "/main/UserAvatarSelectActivity";
|
||||
public static final String PATH_BattlePassActivity = "/main/BattlePassActivity";
|
||||
public static final String PATH_SudGameActivity = "/live/SudGameActivity";
|
||||
|
||||
public static final String PATH_COMMUNITY_Activity="/main/MainHomeCommunityActivity";
|
||||
public static final String PATH_COMMUNITY_Activity = "/main/MainHomeCommunityActivity";
|
||||
|
||||
|
||||
public static void forwardCommunityActivity() {
|
||||
ARouter.getInstance().build(PATH_COMMUNITY_Activity)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
public static void forwardFansActivity(String uid) {
|
||||
ARouter.getInstance().build(PATH_FANSACTIVITY)
|
||||
.withString(Constants.TO_UID, uid)
|
||||
.navigation();
|
||||
}
|
||||
public static void forwardSudGameActivity(String CreateSudRoom,boolean isAn,boolean isHome) {
|
||||
|
||||
public static void forwardSudGameActivity(String CreateSudRoom, boolean isAn, boolean isHome) {
|
||||
ARouter.getInstance().build(PATH_SudGameActivity)
|
||||
.withString("CreateSudRoom", CreateSudRoom)
|
||||
.withBoolean("CreateIsAn", isAn)
|
||||
@@ -218,7 +220,7 @@ public class RouteUtil {
|
||||
* 跳转到充值页面
|
||||
*/
|
||||
public static void forwardMyCoin(Context context) {
|
||||
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=zhifu&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=zhifu&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
ARouter.getInstance().build(PATH_COIN).withString("url", url).navigation();
|
||||
}
|
||||
|
||||
@@ -250,7 +252,7 @@ public class RouteUtil {
|
||||
/**
|
||||
* 打开直播页面
|
||||
*/
|
||||
public static void forwardLiveAudienceActivity(LiveBean mLiveBean, int mLiveType, int mLiveSDK, int mLiveTypeVal) {
|
||||
public static void forwardLiveAudienceActivity(LiveBean mLiveBean, int mLiveType, int mLiveSDK, int mLiveTypeVal, boolean isSw) {
|
||||
if (MicStatusManager.getInstance().isMic(mLiveBean.getUid())) {
|
||||
MicStatusManager.getInstance().showDownMicDialog(CommonAppContext.activityWeakReference.get());
|
||||
return;
|
||||
@@ -260,7 +262,9 @@ public class RouteUtil {
|
||||
.withParcelable(Constants.LIVE_BEAN, mLiveBean)
|
||||
.withInt(Constants.LIVE_TYPE, mLiveType)
|
||||
.withInt(Constants.LIVE_SDK, mLiveSDK)
|
||||
.withBoolean(Constants.LIVE_SDK_IS_SW, isSw)
|
||||
.withInt(Constants.LIVE_TYPE_VAL, mLiveTypeVal);
|
||||
|
||||
if (mLiveBean.getParams() != null) {
|
||||
for (String key : mLiveBean.getParams().keySet()) {
|
||||
postcard.withString(key, mLiveBean.getParams().get(key));
|
||||
@@ -269,14 +273,14 @@ public class RouteUtil {
|
||||
postcard.navigation();
|
||||
}
|
||||
|
||||
public static void forwardGiftWallActivity(String mStream, String mAnchorName, String mLiveUid, String mAvatarUrl, int isAttention,boolean isLive) {
|
||||
public static void forwardGiftWallActivity(String mStream, String mAnchorName, String mLiveUid, String mAvatarUrl, int isAttention, boolean isLive) {
|
||||
ARouter.getInstance().build(PATH_GIFT_WALL)
|
||||
.withString(Constants.LIVE_UID, mLiveUid)
|
||||
.withString(Constants.STREAM, mStream)
|
||||
.withString("mAnchorName", mAnchorName)
|
||||
.withString("mAvatarUrl", mAvatarUrl)
|
||||
.withInt("isAttention", isAttention)
|
||||
.withBoolean("isLive",isLive)
|
||||
.withBoolean("isLive", isLive)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
@@ -354,7 +358,7 @@ public class RouteUtil {
|
||||
/**
|
||||
* 战令
|
||||
*/
|
||||
public static void forwardBattlePass(){
|
||||
public static void forwardBattlePass() {
|
||||
ARouter.getInstance().build(PATH_BattlePassActivity)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
@@ -131,8 +131,8 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
new LiveRoomCheckLivePresenter(itemView.getContext(), liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal));
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk,boolean isSw) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal),isSw);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
Reference in New Issue
Block a user