From d383a0801373081825aa4cbf1e8f7bdf097bc49d Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 15 Sep 2023 10:04:02 +0800 Subject: [PATCH 01/19] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E3=80=90=E5=BC=B9?= =?UTF-8?q?=E6=A1=86=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/common/bean/OpenAdModel.java | 150 ++++++++++++++++ .../AbsDialogFullScreenPopupWindow.java | 39 +++++ .../dialog/OpenAdBottomDialogPopup.java | 70 ++++++++ .../dialog/OpenAdCenterDialogPopup.java | 82 +++++++++ .../com/yunbao/common/http/PDLiveApi.java | 7 + .../common/http/live/LiveNetManager.java | 24 +++ .../yunbao/common/manager/OpenAdManager.java | 164 ++++++++++++++++++ .../com/yunbao/common/utils/ToastUtil.java | 2 +- .../main/res/layout/dialog_open_bottom_ad.xml | 28 +++ .../main/res/layout/dialog_open_center_ad.xml | 32 ++++ .../main/res/mipmap-mdpi/ic_open_ad_close.png | Bin 0 -> 807 bytes .../live/activity/LiveAudienceActivity.java | 3 + .../live/views/LivePlayRyViewHolder.java | 28 +-- .../live/views/PortraitLiveManager.java | 4 +- .../yunbao/main/activity/MainActivity.java | 8 +- 15 files changed, 622 insertions(+), 19 deletions(-) create mode 100644 common/src/main/java/com/yunbao/common/bean/OpenAdModel.java create mode 100644 common/src/main/java/com/yunbao/common/dialog/AbsDialogFullScreenPopupWindow.java create mode 100644 common/src/main/java/com/yunbao/common/dialog/OpenAdBottomDialogPopup.java create mode 100644 common/src/main/java/com/yunbao/common/dialog/OpenAdCenterDialogPopup.java create mode 100644 common/src/main/java/com/yunbao/common/manager/OpenAdManager.java create mode 100644 common/src/main/res/layout/dialog_open_bottom_ad.xml create mode 100644 common/src/main/res/layout/dialog_open_center_ad.xml create mode 100644 common/src/main/res/mipmap-mdpi/ic_open_ad_close.png diff --git a/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java b/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java new file mode 100644 index 000000000..d284d5c8b --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java @@ -0,0 +1,150 @@ +package com.yunbao.common.bean; + +import com.google.gson.annotations.SerializedName; +import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.utils.StringUtil; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Locale; + +public class OpenAdModel extends BaseModel { + public static final int TYPE_HOME = 1;//主页 + public static final int TYPE_LIVE = 2;//直播间 + public static final int TYPE_LIVE_DELAY = 3;//直播间延迟 + public static final int MODEL_SQUARE = 1;//正方形 + public static final int MODEL_RECTANGLE = 2;//长方形 + public static final int MODEL_BOTTOM = 3;//底部 + @SerializedName("id") + private int id; + @SerializedName("popup_location") + private int type = TYPE_HOME; + @SerializedName("activity_url") + private String url; + @SerializedName("image_url") + private String imageUrl; + @SerializedName("display_time") + private int showTime; //持续展示时间 + @SerializedName("delay_show_time") + private int delayShowTime;//延迟展示时间 + @SerializedName("popup_model") + private int model = MODEL_SQUARE; + @SerializedName("start_show_time") + private String startTime;//活动开始时间 + @SerializedName("end_show_time") + private String endTime;//活动结束时间 + + + public OpenAdModel() { + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + + public String getUrl() { + if (url.startsWith("http://") || url.startsWith("https://")) { + return CommonAppConfig.HOST + "/" + url; + } + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public int getShowTime() { + return showTime * 1000; + } + + public void setShowTime(int showTime) { + this.showTime = showTime; + } + + public int getDelayShowTime() { + return delayShowTime * 1000; + } + + public void setDelayShowTime(int delayShowTime) { + this.delayShowTime = delayShowTime; + } + + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } + + public int getModel() { + return model; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public void setModel(int model) { + this.model = model; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public boolean isInTime() { + if (StringUtil.isEmpty(startTime, endTime)) { + return true; + } + Date startTime = null; + Date endTime = null; + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()); + + try { + startTime = sdf.parse(this.startTime); + endTime = sdf.parse(this.endTime); + } catch (ParseException e) { + e.printStackTrace(); + } + + long time = System.currentTimeMillis(); + return startTime.getTime() <= time && time <= endTime.getTime(); + } + + @Override + public String toString() { + return "OpenAdModel{" + + "id=" + id + + ", type=" + type + + ", url='" + url + '\'' + + ", imageUrl='" + imageUrl + '\'' + + ", showTime=" + showTime + + ", delayShowTime=" + delayShowTime + + ", model=" + model + + ", startTime='" + startTime + '\'' + + ", endTime='" + endTime + '\'' + + '}'; + } +} diff --git a/common/src/main/java/com/yunbao/common/dialog/AbsDialogFullScreenPopupWindow.java b/common/src/main/java/com/yunbao/common/dialog/AbsDialogFullScreenPopupWindow.java new file mode 100644 index 000000000..76a7e48cb --- /dev/null +++ b/common/src/main/java/com/yunbao/common/dialog/AbsDialogFullScreenPopupWindow.java @@ -0,0 +1,39 @@ +package com.yunbao.common.dialog; + +import android.content.Context; + +import androidx.annotation.NonNull; + +import com.lxj.xpopup.XPopup; +import com.lxj.xpopup.impl.FullScreenPopupView; + +/** + * 居中弹窗 + */ +public abstract class AbsDialogFullScreenPopupWindow extends FullScreenPopupView { + public final Context mContext; + + public AbsDialogFullScreenPopupWindow(@NonNull Context context) { + super(context); + this.mContext = context; + } + + /** + * 参考配置 + */ + public abstract void buildDialog(XPopup.Builder builder); + public abstract int bindLayoutId(); + + @Override + protected int getImplLayoutId() { + return bindLayoutId(); + } + + public void showDialog() { + XPopup.Builder builder = new XPopup.Builder(mContext); + builder.isDestroyOnDismiss(true); + builder.enableDrag(false); + buildDialog(builder); + builder.asCustom(this).show(); + } +} diff --git a/common/src/main/java/com/yunbao/common/dialog/OpenAdBottomDialogPopup.java b/common/src/main/java/com/yunbao/common/dialog/OpenAdBottomDialogPopup.java new file mode 100644 index 000000000..b4f0dc002 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/dialog/OpenAdBottomDialogPopup.java @@ -0,0 +1,70 @@ +package com.yunbao.common.dialog; + +import android.content.Context; +import android.widget.ImageView; + +import androidx.annotation.NonNull; + +import com.lxj.xpopup.XPopup; +import com.yunbao.common.R; +import com.yunbao.common.activity.WebViewActivity; +import com.yunbao.common.bean.OpenAdModel; +import com.yunbao.common.glide.ImgLoader; +import com.yunbao.common.interfaces.OnItemClickListener; + +public class OpenAdBottomDialogPopup extends AbsDialogPopupWindow { + private ImageView mImageView; + private ImageView mClose; + private OpenAdModel model; + private OnItemClickListener mListener; + + public OpenAdBottomDialogPopup(@NonNull Context context, OpenAdModel model) { + super(context); + this.model = model; + } + + + @Override + public void buildDialog(XPopup.Builder builder) { + + } + + @Override + public int bindLayoutId() { + return R.layout.dialog_open_bottom_ad; + } + + @Override + public void dismiss() { + super.dismiss(); + if (mListener != null) { + mListener.onItemClick(model, 0); + mListener = null; + } + } + + public OpenAdBottomDialogPopup setListener(OnItemClickListener mListener) { + this.mListener = mListener; + return this; + } + + @Override + protected void onCreate() { + super.onCreate(); + mImageView = findViewById(R.id.img); + mClose = findViewById(R.id.close); + mImageView.setOnClickListener(v -> { + WebViewActivity.forward(mContext, model.getUrl(), model.getType() != OpenAdModel.TYPE_HOME); + if (mListener != null) { + mListener.onItemClick(model, 1); + mListener = null; + } + dismiss(); + }); + mClose.setOnClickListener(v -> dismiss()); + ImgLoader.display(mContext, model.getImageUrl(), mImageView); + if (model.getShowTime() > 0) { + mClose.postDelayed(this::dismiss, model.getShowTime()); + } + } +} diff --git a/common/src/main/java/com/yunbao/common/dialog/OpenAdCenterDialogPopup.java b/common/src/main/java/com/yunbao/common/dialog/OpenAdCenterDialogPopup.java new file mode 100644 index 000000000..5e92f5f10 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/dialog/OpenAdCenterDialogPopup.java @@ -0,0 +1,82 @@ +package com.yunbao.common.dialog; + +import android.content.Context; +import android.widget.ImageView; + +import androidx.annotation.NonNull; +import androidx.constraintlayout.widget.ConstraintLayout; + +import com.lxj.xpopup.XPopup; +import com.yunbao.common.R; +import com.yunbao.common.activity.WebViewActivity; +import com.yunbao.common.bean.OpenAdModel; +import com.yunbao.common.glide.ImgLoader; +import com.yunbao.common.interfaces.OnItemClickListener; +import com.yunbao.common.utils.DpUtil; +import com.yunbao.common.utils.ScreenDimenUtil; + +public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow { + private ImageView mImageView; + private ImageView mClose; + private OpenAdModel model; + private OnItemClickListener mListener; + + public OpenAdCenterDialogPopup(@NonNull Context context, OpenAdModel model) { + super(context); + this.model = model; + } + + public OpenAdCenterDialogPopup setListener(OnItemClickListener mListener) { + this.mListener = mListener; + return this; + } + + @Override + public void buildDialog(XPopup.Builder builder) { + } + + @Override + public int bindLayoutId() { + return R.layout.dialog_open_center_ad; + } + + @Override + public void dismiss() { + super.dismiss(); + if (mListener != null) { + mListener.onItemClick(model, 0); + mListener = null; + } + } + + + @Override + protected void onCreate() { + super.onCreate(); + mImageView = findViewById(R.id.img); + mClose = findViewById(R.id.close); + findViewById(R.id.layout).setOnClickListener(v -> dismiss()); + mImageView.setOnClickListener(v -> { + WebViewActivity.forward(mContext, model.getUrl(), model.getType() != OpenAdModel.TYPE_HOME); + if (mListener != null) { + mListener.onItemClick(model, 1); + mListener = null; + } + dismiss(); + }); + mClose.setOnClickListener(v -> dismiss()); + ImgLoader.display(mContext, model.getImageUrl(), mImageView); + int width = ScreenDimenUtil.getInstance().getScreenWdith() - DpUtil.dp2px(40); + int height = (int) (width * 1.4); + if (model.getModel() == OpenAdModel.MODEL_SQUARE) { + height = width; + } + ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mImageView.getLayoutParams(); + params.width = width; + params.height = height; + mImageView.setLayoutParams(params); + if (model.getShowTime() > 0) { + mClose.postDelayed(this::dismiss, model.getShowTime()); + } + } +} diff --git a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java index c7adca890..204a13d7b 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -40,6 +40,7 @@ import com.yunbao.common.bean.MsgSwitchDetailModel; import com.yunbao.common.bean.NewPeopleInfo; import com.yunbao.common.bean.NobleRankHideUserListModel; import com.yunbao.common.bean.NobleTrumpetModel; +import com.yunbao.common.bean.OpenAdModel; import com.yunbao.common.bean.PkRankBean; import com.yunbao.common.bean.PrankGiftBean; import com.yunbao.common.bean.PrankHttpTurntableBean; @@ -969,5 +970,11 @@ public interface PDLiveApi { @GET("/api/public/?service=gift.getGiftNamingInfo") Observable> getGiftNamingInfo(@Query("gift_id") String giftId); + /** + * 活动弹窗 + */ + @GET("/api/public/?service=Home.activityPopup") + Observable>> activityPopup(); + } diff --git a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java index d63b8dcff..4943589da 100644 --- a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java @@ -39,6 +39,7 @@ import com.yunbao.common.bean.LiveUserMailBoxModel; import com.yunbao.common.bean.MedalAchievementModel; import com.yunbao.common.bean.NobleRankHideUserListModel; import com.yunbao.common.bean.NobleTrumpetModel; +import com.yunbao.common.bean.OpenAdModel; import com.yunbao.common.bean.PkRankBean; import com.yunbao.common.bean.PrankGiftBean; import com.yunbao.common.bean.PrankHttpTurntableBean; @@ -2194,6 +2195,29 @@ public class LiveNetManager { }).isDisposed(); } + public void activityPopup(HttpCallback> callback) { + API.get().pdLiveApi(mContext) + .activityPopup() + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Consumer>>() { + @Override + public void accept(ResponseModel> listResponseModel) throws Exception { + if (callback != null) { + callback.onSuccess(listResponseModel.getData().getInfo()); + } + } + }, new Consumer() { + @Override + public void accept(Throwable throwable) throws Exception { + throwable.printStackTrace(); + if (callback != null) { + callback.onError(mContext.getString(R.string.net_error)); + } + } + }).isDisposed(); + } + /** * 直播间取消网络请求 */ diff --git a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java new file mode 100644 index 000000000..29d416018 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java @@ -0,0 +1,164 @@ +package com.yunbao.common.manager; + +import android.os.Handler; +import android.os.Looper; +import android.util.Log; + +import com.yunbao.common.CommonAppContext; +import com.yunbao.common.bean.OpenAdModel; +import com.yunbao.common.dialog.OpenAdBottomDialogPopup; +import com.yunbao.common.dialog.OpenAdCenterDialogPopup; +import com.yunbao.common.http.base.HttpCallback; +import com.yunbao.common.http.live.LiveNetManager; +import com.yunbao.common.utils.ToastUtil; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +public class OpenAdManager { + public static final int TYPE_HOME = 1; + public static final int TYPE_LIVE = 2; + private static final String TAG = "-----弹窗-----"; + private Map showMap; + private List list = new ArrayList<>(); + private Handler handler = new Handler(Looper.getMainLooper()); + private Map runnableMap = new HashMap<>(); + private int showType; + + private OpenAdManager() { + showMap = new HashMap<>(); + init(false); + } + + public void reset() { + for (Integer integer : runnableMap.keySet()) { + handler.removeCallbacks(Objects.requireNonNull(runnableMap.get(integer))); + } + runnableMap.clear(); + showMap.clear(); + list.clear(); + } + + private static final class MInstanceHolder { + static final OpenAdManager mInstance = new OpenAdManager(); + } + + public static OpenAdManager getInstance() { + return MInstanceHolder.mInstance; + } + + private void init(boolean isShow) { + LiveNetManager.get(CommonAppContext.getTopActivity()) + .activityPopup(new HttpCallback>() { + @Override + public void onSuccess(List data) { + list = data; + if (isShow) { + show(TYPE_HOME); + } + } + + @Override + public void onError(String error) { + System.err.println("弹框列表:" + error); + } + }); + } + + + public synchronized void show(int type) { + if (list.isEmpty()) { + init(true); + return; + } + showType=type; + for (OpenAdModel model : list) { + if (model.getType() == type) { + if (runnableMap.containsKey(model.getId())) { + AdRunnable runnable = runnableMap.get(model.getId()); + if (runnable != null) { + Log.d(TAG, "reset: "+model); + handler.removeCallbacks(runnable); + runnableMap.remove(model.getId()); + } + } + if (!isShow(model)) { + Log.i(TAG, "show: "+model); + handler.postDelayed(new AdRunnable(model), model.getDelayShowTime()); + }else{ + Log.i(TAG, "notshow: "+model); + } + + } + } + Log.i(TAG, "------------------------------"); + + } + + public synchronized void dismiss() { + Log.d(TAG, "准备dismiss:"+runnableMap.size() ); + for (Integer model : runnableMap.keySet()) { + AdRunnable runnable = runnableMap.get(model); + Log.d(TAG, "dismiss:"+runnable); + if (runnable != null) { + runnable.dismiss(); + handler.removeCallbacks(runnable); + } + } + runnableMap.clear(); + } + + private synchronized boolean isShow(OpenAdModel type) { + if (showMap.containsKey(type.getId()) && showMap.get(type.getId()) != null) { + return Boolean.TRUE.equals(showMap.get(type.getId())); + } + return false; + } + + private class AdRunnable implements Runnable { + OpenAdModel model; + + public AdRunnable(OpenAdModel model) { + this.model = model; + runnableMap.put(model.getId(), this); + } + public void dismiss(){ + Log.e(TAG, "dismiss: "+model ); + } + + @Override + public synchronized void run() { + Log.i(TAG, "run: "+model); + if (model == null) { + ToastUtil.showDebug("model为空"); + return; + } + if (!model.isInTime()) { + ToastUtil.showDebug("不在展示时间内:" + model.getStartTime() + "|" + model.getEndTime()); + return; + } + if (isShow(model)) { + ToastUtil.showDebug(model.getId() + "|model展示过了"); + return; + } + if(model.getType()!=showType){ + return; + } + showMap.put(model.getId(), true); + if (model.getModel() == OpenAdModel.MODEL_BOTTOM) { + new OpenAdBottomDialogPopup(CommonAppContext.getTopActivity(), model) + .setListener((bean, position) -> { + }) + .showDialog(); + } else { + new OpenAdCenterDialogPopup(CommonAppContext.getTopActivity(), model) + .setListener((bean, position) -> { + }) + .showDialog(); + } + } + } +} diff --git a/common/src/main/java/com/yunbao/common/utils/ToastUtil.java b/common/src/main/java/com/yunbao/common/utils/ToastUtil.java index 3aa789611..f76b84f92 100644 --- a/common/src/main/java/com/yunbao/common/utils/ToastUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/ToastUtil.java @@ -80,7 +80,7 @@ public class ToastUtil { } public static void showDebug(String s){ if(BuildConfig.DEBUG){ - show(s); + show("开发模式:"+s); } } public static void showDebug(int s){ diff --git a/common/src/main/res/layout/dialog_open_bottom_ad.xml b/common/src/main/res/layout/dialog_open_bottom_ad.xml new file mode 100644 index 000000000..5137df634 --- /dev/null +++ b/common/src/main/res/layout/dialog_open_bottom_ad.xml @@ -0,0 +1,28 @@ + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/dialog_open_center_ad.xml b/common/src/main/res/layout/dialog_open_center_ad.xml new file mode 100644 index 000000000..217d47e2b --- /dev/null +++ b/common/src/main/res/layout/dialog_open_center_ad.xml @@ -0,0 +1,32 @@ + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/mipmap-mdpi/ic_open_ad_close.png b/common/src/main/res/mipmap-mdpi/ic_open_ad_close.png new file mode 100644 index 0000000000000000000000000000000000000000..62d53f0ef7a358feff93bf2823c0885db5ce3afe GIT binary patch literal 807 zcmV+?1K9kDP)Px%;Ymb6R7gv;mP@FPVHAa*MI@I(n7SqdhC*Q=%7DoII8w@GgmTJd#DpT{HgPE> za=%T`aV?=_B7^}EheC*Qr>*sSzvJ_r|2uvI@8lo6-@De{Yp=ccFIqVf(Fd3cj0FY* zz0&6|f!n}&;Hac0WiYCC5fQzC4GFw0@DaEV7}&=|gMf~}58w!}T+-7bUJHVVmbnX-MDz!40$+e(l1%c?Cn5#_*8$gU zu%xDp;3O~!m?G&!BJB>i9y=s`D=~wC79}TD3=k1^oul6`sa_E=5V!|ilQb%q@uPDQ?G0?(gyz%)rNV&x=o4=#gN zz$H0)-+9nwB#pLm!KO2SL%<3Xcy>If(r62Sowiy6sDS4J$dfFQw5`x+!-4+UsBkoH z@%*Up%%279$|5hiEM?-3KQ8Hc%5Dl^B@Rle%Lu%=Zl%RCwA$h*vv46RFRB}Wv->^l z5_3JUFOBPQk{;Cpnv=y+yH@?u?5ZrD;=);(3jPLIEa^ZkBoQ$uZN6^6GD(}WcV#Qn zQ`A OpenAdManager.getInstance().show(OpenAdManager.TYPE_LIVE), 400); } @Override diff --git a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java index d450c23af..10c41e025 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java @@ -689,13 +689,13 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder { } }); } else if ("inviteMic".equals(str)) { - String content="邀請您進行語音連麥"; - String confirm="接受"; - String cancel="拒絕"; - if(!WordUtil.isNewZh()){ - content="You are invited to join the voice connection"; - confirm="accept"; - cancel="cancel"; + String content = "邀請您進行語音連麥"; + String confirm = "接受"; + String cancel = "拒絕"; + if (!WordUtil.isNewZh()) { + content = "You are invited to join the voice connection"; + confirm = "accept"; + cancel = "cancel"; } DialogUitl.Builder builder = new DialogUitl.Builder(mContext) .setContent(content) @@ -708,12 +708,12 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder { public void onConfirmClick(Dialog dialog, String content) { String[] permissions; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { - permissions=new String[]{ + permissions = new String[]{ Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.RECORD_AUDIO }; - }else{ - permissions=new String[]{ + } else { + permissions = new String[]{ Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.RECORD_AUDIO @@ -780,9 +780,9 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder { onPrepared(); rcrtcRoom = null; MicStatusManager.getInstance().clear(); - if(WordUtil.isNewZh()) { + if (WordUtil.isNewZh()) { ToastUtil.show("已成功退出語音連麥"); - }else{ + } else { ToastUtil.show("You have successfully exited the voice connection"); } resumePlay(); @@ -867,10 +867,10 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder { } private void showToast() { - if(WordUtil.isNewZh()) { + if (WordUtil.isNewZh()) { DialogUitl.showToast(mContext, "設置成功\n" + "正在為你轉換中", 3000); - }else{ + } else { DialogUitl.showToast(mContext, "successful\n" + "It's being converted for you", 3000); } diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 0df33d47d..2d6b485f2 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -59,6 +59,7 @@ import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpClient; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.manager.OpenAdManager; import com.yunbao.common.utils.AppManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DialogUitl; @@ -262,6 +263,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe public void run() { loading.setVisibility(View.GONE); enterRoomLeaveHandler.post(enterRoomLeaveRunnable); + OpenAdManager.getInstance().show(OpenAdManager.TYPE_LIVE); } }; final Runnable loadTimeoutRunnableGone = new Runnable() { @@ -293,7 +295,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRyLinkMicPkPresenter.release(); mLiveRyLinkMicPkPresenter = null; } - + OpenAdManager.getInstance().dismiss(); mLiveBean = data; mLiveSDK = liveSdk; mLiveType = liveType; diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index b53cdb8c4..7e31a51b7 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -88,6 +88,7 @@ import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.manager.APKManager; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.NoviceInstructorManager; +import com.yunbao.common.manager.OpenAdManager; import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; @@ -210,13 +211,14 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene @Override protected void onPause() { super.onPause(); - + OpenAdManager.getInstance().dismiss(); } @Override protected void main() { ActivityCompat.postponeEnterTransition(this); ConversationIMListManager.get(this); + OpenAdManager.getInstance(); //在请求一下这个接口给我后台版本号 CommonHttpUtil.getConfig(mContext, new CommonCallback() { @Override @@ -526,7 +528,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene //获取指导员账号 ConversationIMListManager.get(this).getUserInstructor(this); checkVersion(); - } @Override @@ -875,7 +876,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene NoviceInstructorManager.get(mContext).getNoviceInstructor(); NoviceInstructorManager.get(mContext).checktHomeZdyPop(); initAnchorRecommendBanner(); - + OpenAdManager.getInstance().show(OpenAdManager.TYPE_HOME); } /** @@ -1074,6 +1075,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene if (EasyFloat.isShow("LiveFloatView")) { EasyFloat.dismiss("LiveFloatView", true); } + OpenAdManager.getInstance().reset(); super.onBackPressed(); } } From 54258c3f13a5e2701af4621c01235ef09824b9af Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 15 Sep 2023 14:54:45 +0800 Subject: [PATCH 02/19] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E3=80=90=E5=BC=B9?= =?UTF-8?q?=E6=A1=86=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/common/bean/OpenAdModel.java | 25 ++++++++++++++++--- .../yunbao/common/manager/OpenAdManager.java | 12 +++++---- .../live/activity/LiveAudienceActivity.java | 4 ++- .../com/yunbao/live/bean/LiveGuardInfo.java | 5 ++++ .../live/views/PortraitLiveManager.java | 2 +- .../yunbao/main/activity/MainActivity.java | 2 +- 6 files changed, 39 insertions(+), 11 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java b/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java index d284d5c8b..0189513be 100644 --- a/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java +++ b/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java @@ -2,6 +2,7 @@ package com.yunbao.common.bean; import com.google.gson.annotations.SerializedName; import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.StringUtil; import java.text.ParseException; @@ -34,6 +35,8 @@ public class OpenAdModel extends BaseModel { private String startTime;//活动开始时间 @SerializedName("end_show_time") private String endTime;//活动结束时间 + @SerializedName("popup_permission") + private int permission; public OpenAdModel() { @@ -48,10 +51,10 @@ public class OpenAdModel extends BaseModel { } public String getUrl() { - if (url.startsWith("http://") || url.startsWith("https://")) { - return CommonAppConfig.HOST + "/" + url; + if (!url.startsWith("http://") || !url.startsWith("https://")) { + url = CommonAppConfig.HOST + url; } - return url; + return url + "?t=" + System.currentTimeMillis() / 1000; } public void setUrl(String url) { @@ -114,6 +117,14 @@ public class OpenAdModel extends BaseModel { this.id = id; } + public int getPermission() { + return permission; + } + + public void setPermission(int permission) { + this.permission = permission; + } + public boolean isInTime() { if (StringUtil.isEmpty(startTime, endTime)) { return true; @@ -133,6 +144,13 @@ public class OpenAdModel extends BaseModel { return startTime.getTime() <= time && time <= endTime.getTime(); } + public boolean userIsPermission(boolean isGuard) { + if (permission == 4 && !isGuard) {//守护不可见 + return false; + } + return true; + } + @Override public String toString() { return "OpenAdModel{" + @@ -145,6 +163,7 @@ public class OpenAdModel extends BaseModel { ", model=" + model + ", startTime='" + startTime + '\'' + ", endTime='" + endTime + '\'' + + ", permission='" + permission + '\'' + '}'; } } diff --git a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java index 29d416018..060c72714 100644 --- a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java +++ b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java @@ -34,9 +34,7 @@ public class OpenAdManager { } public void reset() { - for (Integer integer : runnableMap.keySet()) { - handler.removeCallbacks(Objects.requireNonNull(runnableMap.get(integer))); - } + dismiss(); runnableMap.clear(); showMap.clear(); list.clear(); @@ -57,7 +55,7 @@ public class OpenAdManager { public void onSuccess(List data) { list = data; if (isShow) { - show(TYPE_HOME); + show(TYPE_HOME,false); } } @@ -69,7 +67,7 @@ public class OpenAdManager { } - public synchronized void show(int type) { + public synchronized void show(int type,boolean isGuard) { if (list.isEmpty()) { init(true); return; @@ -77,6 +75,9 @@ public class OpenAdManager { showType=type; for (OpenAdModel model : list) { if (model.getType() == type) { + if(type==OpenAdModel.TYPE_LIVE && !model.userIsPermission(isGuard)){ + continue; + } if (runnableMap.containsKey(model.getId())) { AdRunnable runnable = runnableMap.get(model.getId()); if (runnable != null) { @@ -85,6 +86,7 @@ public class OpenAdManager { runnableMap.remove(model.getId()); } } + if (!isShow(model)) { Log.i(TAG, "show: "+model); handler.postDelayed(new AdRunnable(model), model.getDelayShowTime()); diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 6584ac982..432ff0e9b 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -96,6 +96,7 @@ import com.yunbao.live.R; import com.yunbao.live.adapter.VerticalPagerAdapter; import com.yunbao.live.bean.ImUserBean; import com.yunbao.live.bean.LiveChatBean; +import com.yunbao.live.bean.LiveGuardInfo; import com.yunbao.live.dialog.LiveFansFragment; import com.yunbao.live.dialog.LiveGameDialogFragment; import com.yunbao.live.dialog.LiveGiftPopup; @@ -778,7 +779,8 @@ public class LiveAudienceActivity extends LiveActivity { } } GiftCacheUtil.getInstance().restart(); - new Handler(Looper.getMainLooper()).postDelayed(() -> OpenAdManager.getInstance().show(OpenAdManager.TYPE_LIVE), 400); + new Handler(Looper.getMainLooper()).postDelayed(() -> OpenAdManager.getInstance().show(OpenAdManager.TYPE_LIVE, + LiveGuardInfo.isGuard(mLiveGuardInfo)), 400); } @Override diff --git a/live/src/main/java/com/yunbao/live/bean/LiveGuardInfo.java b/live/src/main/java/com/yunbao/live/bean/LiveGuardInfo.java index 0e07e4734..1015a6de7 100644 --- a/live/src/main/java/com/yunbao/live/bean/LiveGuardInfo.java +++ b/live/src/main/java/com/yunbao/live/bean/LiveGuardInfo.java @@ -3,6 +3,8 @@ package com.yunbao.live.bean; import android.os.Parcel; import android.os.Parcelable; +import com.yunbao.common.Constants; + /** * Created by cxf on 2018/11/14. */ @@ -72,5 +74,8 @@ public class LiveGuardInfo implements Parcelable { } }; + public static boolean isGuard(LiveGuardInfo info){ + return info != null && info.getMyGuardType() != Constants.GUARD_TYPE_NONE; + } } diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 2d6b485f2..919693d9f 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -263,7 +263,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe public void run() { loading.setVisibility(View.GONE); enterRoomLeaveHandler.post(enterRoomLeaveRunnable); - OpenAdManager.getInstance().show(OpenAdManager.TYPE_LIVE); + OpenAdManager.getInstance().show(OpenAdManager.TYPE_LIVE,LiveGuardInfo.isGuard(mLiveGuardInfo)); } }; final Runnable loadTimeoutRunnableGone = new Runnable() { diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 7e31a51b7..1693facbf 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -876,7 +876,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene NoviceInstructorManager.get(mContext).getNoviceInstructor(); NoviceInstructorManager.get(mContext).checktHomeZdyPop(); initAnchorRecommendBanner(); - OpenAdManager.getInstance().show(OpenAdManager.TYPE_HOME); + OpenAdManager.getInstance().show(OpenAdManager.TYPE_HOME, false); } /** From a475e5dc2fbde61a7110fd49786c019203b864f6 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 15 Sep 2023 16:15:51 +0800 Subject: [PATCH 03/19] =?UTF-8?q?update=20=E4=B8=AD=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/res/values-en-rUS/string.xml | 47 ++++++++++--------- common/src/main/res/values-zh-rHK/strings.xml | 2 + common/src/main/res/values-zh-rTW/strings.xml | 2 + common/src/main/res/values-zh/strings.xml | 1 + common/src/main/res/values/strings.xml | 47 ++++++++++--------- .../presenter/LiveRyLinkMicPkPresenter.java | 6 +++ .../live/views/LivePlayRyViewHolder.java | 4 +- .../live/views/LivePushRyViewHolder.java | 1 + live/src/main/res/values-en/strings.xml | 2 +- 9 files changed, 64 insertions(+), 48 deletions(-) diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index fc726adaf..dddb57c8a 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -56,14 +56,14 @@ No QQ installed Replication link Replication success - Editing materials - Head portrait - Nickname + Edit + Photo + Name ModifyName Modify remarks Please enter comments~ Signature - autograph + Bio Binding phone TASK1 TASK2 @@ -242,8 +242,8 @@ Service and privacy terms Other login methods More exciting experience after registering! - Please enter your mobile number - Please input a password + Phone Number + Password Login immediately Logon Immediate registration @@ -254,9 +254,9 @@ privilege grant failed Authorization cancelled Live broadcast - Login + Log in shopmall - Recomm + Recommend CSD anchor Live broadcast @@ -289,7 +289,7 @@ Trickster MultiplayerPK Voice Link - Start + billboard LeaveTemporarily ResumeLive Flash lamp @@ -491,11 +491,11 @@ register Please enter your mobile number Please enter the verification code - Please fill in the password - Please confirm the password - Fill in the invitation code (optional) + Password + Password Again + Invite Code(Optional) Register and log in - Get verification code + Get Code Regain Passwords are inconsistent In registration @@ -659,7 +659,7 @@ Preservation Register No one is currently in the voice link - Welcome to PDLIVE + Welcome to PDLive Newcomer Bonus EXP Complete newcomer tasks for more rewards @@ -888,7 +888,7 @@ Limited ride And limited avatar frame Online Service Hot Ticket Register and log in - Sign up for PD LIVE + Sign in PDlive Tell the world! Tell the world! %s recommends anchor %s to everyone! Tell the world! %s recommends the anchor %s to everyone, and the splendid glance is amazing! @@ -1018,7 +1018,7 @@ Limited ride And limited avatar frame There is no choice, the anchor is not turned on FHD live. There is no choice, the anchor is not turned on HD live. Sorry, this feature is on hold. - phone + Phone Number Broadcast Click To View Anchor Task @@ -1047,10 +1047,10 @@ Limited ride And limited avatar frame Go to the sign-in center Confirm pick up Unable to login? Click here to contact customer service - By logging in, you agree to the Terms of - Service - and - Privacy + By continuing, you are agree to our Terms of + use + & + Privacy Policy Terms and policies For details, please read the following message to install the application: Welcome to PD LIVE. For your personal information and privacy, we will adopt the highest standards of treatment and protection. @@ -1126,7 +1126,7 @@ Limited ride And limited avatar frame unfollow Where is the host doing badly~\nBrother, are you sure you want to unfollow? follow - Heat Add + Heating LOW DEFAULT HIGH @@ -1150,7 +1150,7 @@ Limited ride And limited avatar frame Do you want to delete the account After clicking delete, it will take effect immediately and cannot be restored. Are you sure you want to continue? Confirm deletion - Fill And gift + Fill for Gift Fill in the \'*\' option to complete True love powder\nPhoto Frame(7 days) 128 Golden Beans @@ -1211,7 +1211,7 @@ Limited ride And limited avatar frame None Return to account Popularity Red packet - Red packets + Earn Cash Popular red packets amount Diamonds @@ -1318,5 +1318,6 @@ Limited ride And limited avatar frame Whether to use trial coupons Use diamonds Join a fans club + Sorry, your network failed to pull the other party. diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index f3721d6bd..5f0e8673c 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1314,4 +1314,6 @@ 是否使用試用劵 使用鑽石 加入粉絲團 + + 抱歉,您的網絡不佳拉取對方畫面失敗 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index d3839869a..1bf4efe05 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1313,4 +1313,6 @@ 主播: 是否使用試用劵 使用鑽石 + + 抱歉,您的網絡不佳拉取對方畫面失敗 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 7808238ad..32ba03fde 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1314,5 +1314,6 @@ 主播: 加入粉絲團 + 抱歉,您的網絡不佳拉取對方畫面失敗 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index a610a1f49..3b2d1df10 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -56,14 +56,14 @@ No QQ installed Replication link Replication success - Editing materials - Head portrait - Nickname + Edit + Photo + Name ModifyName Modify remarks Please enter comments~ Signature - autograph + Bio Binding phone TASK1 TASK2 @@ -242,8 +242,8 @@ Service and privacy terms Other login methods More exciting experience after registering! - Please enter your mobile number - Please input a password + Phone Number + Password Login immediately Logon Immediate registration @@ -254,9 +254,9 @@ privilege grant failed Authorization cancelled Live broadcast - Login + Log in shopmall - Recomm + Recommend CSD anchor Live broadcast @@ -289,7 +289,7 @@ Trickster MultiplayerPK Voice Link - Start + billboard LeaveTemporarily ResumeLive Flash lamp @@ -491,11 +491,11 @@ register Please enter your mobile number Please enter the verification code - Please fill in the password - Please confirm the password - Fill in the invitation code (optional) + Password + Password Again + Invite Code(Optional) Register and log in - Get verification code + Get Code Regain Passwords are inconsistent In registration @@ -659,7 +659,7 @@ Preservation Register No one is currently in the voice link - Welcome to PDLIVE + Welcome to PDLive Newcomer Bonus EXP Complete newcomer tasks for more rewards @@ -888,7 +888,7 @@ Limited ride And limited avatar frame Online Service Hot Ticket Register and log in - Sign up for PD LIVE + Sign in PDlive Tell the world! Tell the world! %s recommends anchor %s to everyone! Tell the world! %s recommends the anchor %s to everyone, and the splendid glance is amazing! @@ -1018,7 +1018,7 @@ Limited ride And limited avatar frame There is no choice, the anchor is not turned on FHD live. There is no choice, the anchor is not turned on HD live. Sorry, this feature is on hold. - phone + Phone Number Broadcast Click To View Anchor Task @@ -1047,10 +1047,10 @@ Limited ride And limited avatar frame Go to the sign-in center Confirm pick up Unable to login? Click here to contact customer service - By logging in, you agree to the Terms of - Service - and - Privacy + By continuing, you are agree to our Terms of + use + & + Privacy Policy Terms and policies For details, please read the following message to install the application: Welcome to PD LIVE. For your personal information and privacy, we will adopt the highest standards of treatment and protection. @@ -1126,7 +1126,7 @@ Limited ride And limited avatar frame unfollow Where is the host doing badly~\nBrother, are you sure you want to unfollow? follow - Heat Add + Heating LOW DEFAULT HIGH @@ -1168,7 +1168,7 @@ Limited ride And limited avatar frame VOTE %s
box disappears after %s seconds
Please complete the form. - Fill And gift + Fill for Gift Fill in the \'*\' option to complete True love powder\nPhoto Frame(7 days) 128 Golden Beans @@ -1212,7 +1212,7 @@ Limited ride And limited avatar frame None Return to account Popularity Red packet - Red packets + Earn Cash Popular red packets amount Diamonds @@ -1320,4 +1320,5 @@ Limited ride And limited avatar frame Anchor: Join a fans club + Sorry, your network failed to pull the other party. diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java index 8fa494aef..071ac25ba 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java @@ -642,6 +642,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onFailed(RTCErrorCode rtcErrorCode) { Log.i("ry", "订阅资源失败: " + rtcErrorCode.getReason()); + ToastUtil.show(mContext.getString(R.string.live_pk_link_error)); } }); } @@ -768,6 +769,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onFailed(RTCErrorCode rtcErrorCode) { Log.i("ry", "订阅资源失败: " + rtcErrorCode.getReason()); + ToastUtil.show(mContext.getString(R.string.live_pk_link_error)); } }); } @@ -924,6 +926,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onFailed(RTCErrorCode rtcErrorCode) { Log.i("ry", "订阅资源失败: " + rtcErrorCode); + ToastUtil.show(mContext.getString(R.string.live_pk_link_error)); } }); } @@ -1000,6 +1003,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onFailed(RTCErrorCode rtcErrorCode) { Log.e("ry", "订阅资源失败: " + rtcErrorCode); + ToastUtil.show(mContext.getString(R.string.live_pk_link_error)); } }); } @@ -1773,6 +1777,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onFailed(RTCErrorCode rtcErrorCode) { Log.i("ry", "订阅资源失败: " + rtcErrorCode.getReason()); + ToastUtil.show(mContext.getString(R.string.live_pk_link_error)); } }); //2. 合流画布设置 @@ -1963,6 +1968,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onFailed(RTCErrorCode rtcErrorCode) { Log.i("ry", "订阅资源失败: " + rtcErrorCode.getReason()); + ToastUtil.show(mContext.getString(R.string.live_pk_link_error)); } }); diff --git a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java index d450c23af..dd25ac6dd 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java @@ -1007,7 +1007,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder { @Override public void onFailed(RTCErrorCode errorCode) { Log.e("ry", userinputStreamList.size() + LiveActivity.mLiveUid + "订阅失败" + errorCode.toString()); - + ToastUtil.show(mContext.getString(R.string.live_pk_link_error)); } @Override @@ -1045,6 +1045,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder { @Override public void onFailed(RTCErrorCode rtcErrorCode) { Log.e("ry", "远端失败" + list.size()); + ToastUtil.show(mContext.getString(R.string.live_pk_link_error)); } }); } @@ -1197,6 +1198,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder { @Override public void onFailed(RTCErrorCode rtcErrorCode) { Log.e("ry", "订阅资源失败: " + rtcErrorCode.getReason()); + ToastUtil.show(mContext.getString(R.string.live_pk_link_error)); } }); } diff --git a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java index daa33924a..d8eb63a61 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java @@ -176,6 +176,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX @Override public void onFailed(RTCErrorCode rtcErrorCode) { Log.e("ry", "远端失败" + list.size()); + ToastUtil.show(mContext.getString(R.string.live_pk_link_error)); } }); } diff --git a/live/src/main/res/values-en/strings.xml b/live/src/main/res/values-en/strings.xml index f7a06979e..00b2440af 100644 --- a/live/src/main/res/values-en/strings.xml +++ b/live/src/main/res/values-en/strings.xml @@ -45,7 +45,7 @@ Release cancel send No recording has been recognized in over 10 seconds Identity privilege - Nobleman\'s seat + VIP seats %s applies for connected wheat. Check whether The wheat has been kicked off An invitation has been sent and is waiting for the user to accept From ea397af1230d5cdfcf3a3bb4f826c1ef08f34a2d Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 15 Sep 2023 16:55:36 +0800 Subject: [PATCH 04/19] =?UTF-8?q?update=20=E5=BC=B9=E7=AA=97=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yunbao/common/manager/OpenAdManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java index 060c72714..d5a24c3a7 100644 --- a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java +++ b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java @@ -23,7 +23,7 @@ public class OpenAdManager { public static final int TYPE_LIVE = 2; private static final String TAG = "-----弹窗-----"; private Map showMap; - private List list = new ArrayList<>(); + private List list = null; private Handler handler = new Handler(Looper.getMainLooper()); private Map runnableMap = new HashMap<>(); private int showType; @@ -68,7 +68,7 @@ public class OpenAdManager { public synchronized void show(int type,boolean isGuard) { - if (list.isEmpty()) { + if (list==null) { init(true); return; } From a876018b0ae4b0215e445d710f00c39897cb21f2 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 15 Sep 2023 18:12:40 +0800 Subject: [PATCH 05/19] =?UTF-8?q?update=20=E5=BC=B9=E7=AA=97=E5=B8=83?= =?UTF-8?q?=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/res/layout/dialog_open_bottom_ad.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/common/src/main/res/layout/dialog_open_bottom_ad.xml b/common/src/main/res/layout/dialog_open_bottom_ad.xml index 5137df634..192f2d295 100644 --- a/common/src/main/res/layout/dialog_open_bottom_ad.xml +++ b/common/src/main/res/layout/dialog_open_bottom_ad.xml @@ -12,6 +12,7 @@ android:scaleType="fitXY" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" + android:adjustViewBounds="true" app:layout_constraintStart_toStartOf="parent" app:srcCompat="@mipmap/background_gift_wall" /> From 9ec241f2a37bbd63c3dc41378f37b3b3563e63ef Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 15 Sep 2023 18:28:46 +0800 Subject: [PATCH 06/19] =?UTF-8?q?update=20=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/live/activity/LiveAudienceActivity.java | 6 ++++-- .../java/com/yunbao/live/views/PortraitLiveManager.java | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 432ff0e9b..02e55bd3a 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -779,8 +779,10 @@ public class LiveAudienceActivity extends LiveActivity { } } GiftCacheUtil.getInstance().restart(); - new Handler(Looper.getMainLooper()).postDelayed(() -> OpenAdManager.getInstance().show(OpenAdManager.TYPE_LIVE, - LiveGuardInfo.isGuard(mLiveGuardInfo)), 400); + if (manager.isEnterRoom()) { + new Handler(Looper.getMainLooper()).postDelayed(() -> OpenAdManager.getInstance().show(OpenAdManager.TYPE_LIVE, + LiveGuardInfo.isGuard(mLiveGuardInfo)), 400); + } } @Override diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 919693d9f..a122ba9ea 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -263,7 +263,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe public void run() { loading.setVisibility(View.GONE); enterRoomLeaveHandler.post(enterRoomLeaveRunnable); - OpenAdManager.getInstance().show(OpenAdManager.TYPE_LIVE,LiveGuardInfo.isGuard(mLiveGuardInfo)); + OpenAdManager.getInstance().show(OpenAdManager.TYPE_LIVE, LiveGuardInfo.isGuard(mLiveGuardInfo)); } }; final Runnable loadTimeoutRunnableGone = new Runnable() { @@ -2100,4 +2100,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRoomViewHolder.setGiftWall(giftWallLightenNumber, giftWallLightenTotal); } } + + public boolean isEnterRoom() { + return isEnterRoom; + } } From 7b5cd9b79720ed49f2c254e3781067153ba5986c Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Sat, 16 Sep 2023 10:53:08 +0800 Subject: [PATCH 07/19] =?UTF-8?q?update=20=E4=B8=AD=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/res/values-en-rUS/string.xml | 6 +++--- common/src/main/res/values-zh-rHK/strings.xml | 1 + common/src/main/res/values-zh-rTW/strings.xml | 1 + common/src/main/res/values-zh/strings.xml | 2 +- common/src/main/res/values/strings.xml | 8 +++++--- live/src/main/res/layout/dialog_new_live_user.xml | 2 +- live/src/main/res/layout/view_noble_seat.xml | 5 ++--- 7 files changed, 14 insertions(+), 11 deletions(-) diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index dddb57c8a..d2c6e9562 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -829,8 +829,8 @@ You can only speak after completing the previous task - Heat addition - Hot & Time + HEATING + Heat & Time The popularity can increase the exposure to the anchor\'s room. The higher the live broadcast room, the more popular on the homepage, which will bring more users in the house and help the anchor to quickly increase the room heat in a period of time. Immediately after the delivery Effective. How to get the heat card? @@ -1319,5 +1319,5 @@ Limited ride And limited avatar frame Use diamonds Join a fans club Sorry, your network failed to pull the other party. - + say something diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index 5f0e8673c..6667a300c 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1316,4 +1316,5 @@ 加入粉絲團 抱歉,您的網絡不佳拉取對方畫面失敗 + 這家夥很懶,什麽都沒留下 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index 1bf4efe05..b38df1870 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1315,4 +1315,5 @@ 使用鑽石 抱歉,您的網絡不佳拉取對方畫面失敗 + 這家夥很懶,什麽都沒留下 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 32ba03fde..e1c3c7772 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1315,5 +1315,5 @@ 加入粉絲團 抱歉,您的網絡不佳拉取對方畫面失敗 - + 這家夥很懶,什麽都沒留下 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 3b2d1df10..db6cee635 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -829,8 +829,8 @@ You can only speak after completing the previous task - Heat addition - Hot & Time + HEATING + Heat & Time The popularity can increase the exposure to the anchor\'s room. The higher the live broadcast room, the more popular on the homepage, which will bring more users in the house and help the anchor to quickly increase the room heat in a period of time. Immediately after the delivery Effective. How to get the heat card? @@ -956,7 +956,7 @@ Limited ride And limited avatar frame Chat Congratulations %s have won %s in the Lucky Angel! The next lucky angel will be you! Congratulations on %s winning %s in Luck 100 %%! Go pass on the good luck! - Guardian %s + guard %s receive To finish Already collected @@ -1321,4 +1321,6 @@ Limited ride And limited avatar frame Join a fans club Sorry, your network failed to pull the other party. + + say something diff --git a/live/src/main/res/layout/dialog_new_live_user.xml b/live/src/main/res/layout/dialog_new_live_user.xml index 62162d177..0a674ad44 100644 --- a/live/src/main/res/layout/dialog_new_live_user.xml +++ b/live/src/main/res/layout/dialog_new_live_user.xml @@ -327,7 +327,7 @@ android:id="@+id/sign" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="這家夥很懶,什麽都沒留下" + android:text="@string/live_user_dialog_tips" android:textColor="#B1B1B1" android:textSize="14sp" /> diff --git a/live/src/main/res/layout/view_noble_seat.xml b/live/src/main/res/layout/view_noble_seat.xml index 0bafa7619..738e26e86 100644 --- a/live/src/main/res/layout/view_noble_seat.xml +++ b/live/src/main/res/layout/view_noble_seat.xml @@ -8,7 +8,7 @@ @@ -28,14 +28,13 @@ From 6e8842d30d09e3eb764118f500fe0acfd429ec10 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Sat, 16 Sep 2023 14:23:43 +0800 Subject: [PATCH 08/19] =?UTF-8?q?update=20config=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E7=BD=91=E7=BB=9C=E5=A4=B1=E8=B4=A5=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/shayu/phonelive/activity/LauncherActivity.java | 3 +++ .../src/main/java/com/yunbao/common/http/CommonHttpUtil.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java b/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java index 5251deee9..0415e00e9 100644 --- a/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java +++ b/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java @@ -229,8 +229,11 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL } else { checkUidAndToken(); } + }else{ + ToastUtil.show(getString(R.string.net_error)); } } + }); } diff --git a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java index 7431a5d51..66ac11f22 100644 --- a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java +++ b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java @@ -13,6 +13,7 @@ import com.lzy.okgo.callback.StringCallback; import com.lzy.okgo.model.Response; import com.lzy.okgo.request.PostRequest; import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.CommonAppContext; import com.yunbao.common.R; import com.yunbao.common.activity.ErrorActivity; import com.yunbao.common.bean.ConfigBean; @@ -260,6 +261,8 @@ public class CommonHttpUtil { AppManager.getInstance().AppExit(); } }).build().show(); + } else { + ToastUtil.show(CommonAppContext.getTopActivity().getString(R.string.net_error) + "code:" + code + " msg:" + msg); } } From 3595b896724aa986bdbe100e4e93aa7421b727df Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Sat, 16 Sep 2023 14:24:06 +0800 Subject: [PATCH 09/19] =?UTF-8?q?fix=20=E8=B0=83=E6=95=B4=E8=8B=B1?= =?UTF-8?q?=E6=96=87PK=E6=83=A9=E7=BD=9A=E5=80=92=E8=AE=A1=E6=97=B6?= =?UTF-8?q?=E8=BF=87=E9=95=BF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- live/src/main/res/layout/view_link_mic_pk.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/live/src/main/res/layout/view_link_mic_pk.xml b/live/src/main/res/layout/view_link_mic_pk.xml index bf94be235..1708a0dc5 100644 --- a/live/src/main/res/layout/view_link_mic_pk.xml +++ b/live/src/main/res/layout/view_link_mic_pk.xml @@ -1,6 +1,7 @@ @@ -159,17 +160,19 @@ + android:visibility="invisible" + tools:visibility="visible" /> Date: Sat, 16 Sep 2023 18:22:51 +0800 Subject: [PATCH 10/19] =?UTF-8?q?update=20=E6=8E=92=E4=BD=8D=E8=B5=9B?= =?UTF-8?q?=E4=B8=AD=E8=8B=B1=E6=96=87IM=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/bean/PkRankBean.java | 11 +++++++++++ .../com/yunbao/live/socket/SocketRyClient.java | 1 + .../com/yunbao/live/views/LiveRoomViewHolder.java | 15 ++++++++++----- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/bean/PkRankBean.java b/common/src/main/java/com/yunbao/common/bean/PkRankBean.java index dcff7de27..bd70bb03c 100644 --- a/common/src/main/java/com/yunbao/common/bean/PkRankBean.java +++ b/common/src/main/java/com/yunbao/common/bean/PkRankBean.java @@ -23,6 +23,8 @@ public class PkRankBean extends BaseModel { public String clickUrl; @SerializedName("vs_img") public String vsImgUrl; + @SerializedName("new_rank_name_en") + public String newRankNameEn; public int getId() { return id; @@ -94,6 +96,14 @@ public class PkRankBean extends BaseModel { this.vsImgUrl = vsImgUrl; } + public String getNewRankNameEn() { + return newRankNameEn; + } + + public void setNewRankNameEn(String newRankNameEn) { + this.newRankNameEn = newRankNameEn; + } + @Override public String toString() { return "PkRankBean{" + @@ -105,6 +115,7 @@ public class PkRankBean extends BaseModel { ", pkTopImgUrl='" + pkTopImgUrl + '\'' + ", clickUrl='" + clickUrl + '\'' + ", vsImgUrl='" + vsImgUrl + '\'' + + ", newRankNameEn='" + newRankNameEn + '\'' + '}'; } } diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java index 063d23e0d..5adf63ddc 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java @@ -650,6 +650,7 @@ public class SocketRyClient { pkRankBean.setId(Integer.parseInt(item.getString("new_rank_id"))); pkRankBean.setName(item.getString("new_rank_name")); pkRankBean.setImg(item.getString("new_rank_img")); + pkRankBean.setNewRankNameEn(item.getString("new_rank_name_en")); EventBus.getDefault().post(new LiveAudienceEvent() .setType(LiveAudienceEvent.LiveAudienceType.PK_RANK_UPDATE) .setObject(pkRankBean)); diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 4664a66aa..eb35482d8 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -124,6 +124,7 @@ import com.yunbao.common.utils.SpUtil; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.TimeUtils; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.formatBigNum; import com.yunbao.common.views.AbsViewHolder; import com.yunbao.common.views.weight.ClipPathCircleImage; @@ -461,7 +462,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } } else if ("checkNewLetter".equals(str)) { checkNewLetter(); - }else if("exitFansGroup".equals(str)){ + } else if ("exitFansGroup".equals(str)) { setFansGroup("0"); } } @@ -1817,7 +1818,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis .append("&isZh=") .append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); } - if (htmlUrl.toString().contains("StarChallenge")){ + if (htmlUrl.toString().contains("StarChallenge")) { Map map_ekv = new HashMap(); map_ekv.put("link", htmlUrl.toString()); MobclickAgent.onEvent(mContext, "live_room_star", map_ekv); @@ -1889,7 +1890,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis .append("&isZh=") .append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); } - if (htmlUrl.toString().contains("StarChallenge")){ + if (htmlUrl.toString().contains("StarChallenge")) { Map map_ekv = new HashMap(); map_ekv.put("link", htmlUrl.toString()); MobclickAgent.onEvent(mContext, "live_room_star", map_ekv); @@ -2391,7 +2392,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } private void updatePkRank(PkRankBean bean) { - mPkRankText.setText(bean.getName()); + if (WordUtil.isNewZh()) { + mPkRankText.setText(bean.getName()); + } else { + mPkRankText.setText(bean.getNewRankNameEn()); + } ImgLoader.display(mContext, bean.getImg(), mPkRankIcon); } @@ -4159,7 +4164,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis @Override public void onBannerClick(List datas, int p) { - if (TextUtils.equals("特惠首冲", mBannerList4.get(p).getName())){ + if (TextUtils.equals("特惠首冲", mBannerList4.get(p).getName())) { Map map_ekv = new HashMap(); map_ekv.put("link", mBannerList4.get(p).getLink()); From 3150489384058ef1313e1cf5341d6bbb833a9dcb Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Wed, 20 Sep 2023 18:26:59 +0800 Subject: [PATCH 11/19] =?UTF-8?q?update=20=E4=B8=AD=E8=8B=B1=E6=96=87=20fi?= =?UTF-8?q?x=20=E6=92=AD=E6=94=BE=E5=99=A8=E7=9B=91=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fragment/LiveNewWishListFragment.java | 7 +- .../yunbao/common/manager/IMRTCManager.java | 13 +- .../com/yunbao/common/utils/NobleUtil.java | 18 +-- .../com/yunbao/common/utils/ToastUtil.java | 2 +- .../yunbao/common/views/InputCustomPopup.java | 3 +- .../common/views/LiveNewWishListPopup.java | 3 +- common/src/main/res/values-en-rUS/string.xml | 4 +- common/src/main/res/values-zh-rHK/strings.xml | 2 + common/src/main/res/values-zh-rTW/strings.xml | 2 + common/src/main/res/values-zh/strings.xml | 2 + common/src/main/res/values/strings.xml | 4 +- .../live/activity/LiveRyAnchorActivity.java | 13 +- .../adapter/AnchorUserMicInfoAdapter.java | 6 + .../live/dialog/FreePkDialogFragment.java | 4 +- .../dialog/LiveNewWishListDialogFragment.java | 3 +- .../dialog/LiveWishListDialogFragment.java | 3 +- .../presenter/LiveRyLinkMicPkPresenter.java | 7 +- .../live/utils/LiveExoPlayerManager.java | 138 ++++++++++++++++++ .../live/views/LiveLinkMicPkViewHolder.java | 2 +- .../live/views/LivePlayRyViewHolder.java | 1 + .../live/views/LivePushRyViewHolder.java | 2 +- .../live/views/LivePushTxViewHolder.java | 3 +- .../live/views/PortraitLiveManager.java | 2 +- .../main/res/layout/dialog_fans_group_buy.xml | 8 +- .../layout/dialog_live_select_gift_wrap.xml | 2 +- .../main/res/layout/dialog_new_live_user.xml | 4 +- .../src/main/res/layout/view_live_push_ry.xml | 2 +- .../src/main/res/layout/view_live_push_tx.xml | 2 +- .../layout/view_live_search_list_empty.xml | 2 +- .../main/dialog/MainStartDialogFragment.java | 2 +- 30 files changed, 225 insertions(+), 41 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/fragment/LiveNewWishListFragment.java b/common/src/main/java/com/yunbao/common/fragment/LiveNewWishListFragment.java index bb7a963c1..590a95912 100644 --- a/common/src/main/java/com/yunbao/common/fragment/LiveNewWishListFragment.java +++ b/common/src/main/java/com/yunbao/common/fragment/LiveNewWishListFragment.java @@ -21,6 +21,7 @@ import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.HintCustomPopup; import com.yunbao.common.views.LiveNewWishGiftPopup; import com.yunbao.common.views.weight.ViewClicksAntiShake; @@ -149,7 +150,7 @@ public class LiveNewWishListFragment extends BaseFragment { setWishlistV2(type, gson.toJson(wishList2), new HttpCallback() { @Override public void onSuccess(String data) { - ToastUtil.show("修改成功"); + ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success"); } @Override @@ -181,7 +182,7 @@ public class LiveNewWishListFragment extends BaseFragment { setWishlistV2(type, gson.toJson(wishList2), new HttpCallback() { @Override public void onSuccess(String data) { - ToastUtil.show("修改成功"); + ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success"); } @Override @@ -200,7 +201,7 @@ public class LiveNewWishListFragment extends BaseFragment { setWishlistV2(type, gson.toJson(wishList2), new HttpCallback() { @Override public void onSuccess(String data) { - ToastUtil.show("修改成功"); + ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success"); } @Override diff --git a/common/src/main/java/com/yunbao/common/manager/IMRTCManager.java b/common/src/main/java/com/yunbao/common/manager/IMRTCManager.java index 4c3fc88ef..c1b85d3ab 100644 --- a/common/src/main/java/com/yunbao/common/manager/IMRTCManager.java +++ b/common/src/main/java/com/yunbao/common/manager/IMRTCManager.java @@ -6,6 +6,7 @@ import android.os.Handler; import android.os.Looper; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import java.util.ArrayList; import java.util.List; @@ -100,7 +101,11 @@ public class IMRTCManager { public void onSuccess() { callback.onSuccess(); if (!RandomPkManager.getInstance().isRandomModel()) { - ToastUtil.show("发起邀请成功"); + if(WordUtil.isNewZh()) { + ToastUtil.show("发起邀请成功"); + }else{ + ToastUtil.show("successful"); + } } requestUid.add(liveUid); startRequestTimeoutTask(liveUid); @@ -109,7 +114,11 @@ public class IMRTCManager { @Override public void onFailed(RTCErrorCode errorCode) { if (!RandomPkManager.getInstance().isRandomModel()) { - ToastUtil.show("邀请失败 " + errorCode.getValue()); + if(WordUtil.isNewZh()) { + ToastUtil.show("邀请失败 " + errorCode.getValue()); + }else{ + ToastUtil.show("invite failed:" +errorCode.getValue()); + } } if (RandomPkManager.getInstance().isRequestPk()) { RandomPkManager.getInstance().setPkStatus(RandomPkManager.PK_STATUS_REFUSE); diff --git a/common/src/main/java/com/yunbao/common/utils/NobleUtil.java b/common/src/main/java/com/yunbao/common/utils/NobleUtil.java index afe0208c3..a1ec0f2c7 100644 --- a/common/src/main/java/com/yunbao/common/utils/NobleUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/NobleUtil.java @@ -30,7 +30,7 @@ public class NobleUtil { case 1:return "男爵"; case 2:return "子爵"; case 3:return "侯爵"; - case 4:return "公爵"; + case 4:return "公爵"; case 5:return "国王"; case 6:return "皇帝"; case 7:return "超皇"; @@ -39,15 +39,15 @@ public class NobleUtil { } public static String nobleIdToStringNameForEn(int id){ switch (id){ - case 1:return "baron"; - case 2:return "viscount"; - case 3:return "marquis"; - case 4:return "duke"; - case 5:return "king"; - case 6:return "emperor"; - case 7:return "SuperEmperor"; + case 1:return "Baron"; + case 2:return "Viscount"; + case 3:return "Marquis"; + case 4:return "Duke"; + case 5:return "King"; + case 6:return "Emperor"; + case 7:return "SuperKing"; } - return "Not Opened"; + return "Not opened"; } public static int getNobleBackgroundId(int id){ switch (id){ diff --git a/common/src/main/java/com/yunbao/common/utils/ToastUtil.java b/common/src/main/java/com/yunbao/common/utils/ToastUtil.java index 3aa789611..764297b5a 100644 --- a/common/src/main/java/com/yunbao/common/utils/ToastUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/ToastUtil.java @@ -43,7 +43,7 @@ public class ToastUtil { public static void show(int res) { - show(WordUtil.getString(res)); + show(WordUtil.getNewString(res)); } /** diff --git a/common/src/main/java/com/yunbao/common/views/InputCustomPopup.java b/common/src/main/java/com/yunbao/common/views/InputCustomPopup.java index 80b31e916..4aa99edb4 100644 --- a/common/src/main/java/com/yunbao/common/views/InputCustomPopup.java +++ b/common/src/main/java/com/yunbao/common/views/InputCustomPopup.java @@ -14,6 +14,7 @@ import com.lxj.xpopup.animator.PopupAnimator; import com.lxj.xpopup.core.CenterPopupView; import com.yunbao.common.R; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; /** @@ -85,7 +86,7 @@ public class InputCustomPopup extends CenterPopupView { public void onViewClicks() { String textContent = content.getText().toString(); if (TextUtils.isEmpty(textContent)) { - ToastUtil.show("输入内容不可为空"); + ToastUtil.show(WordUtil.isNewZh()?"输入内容不可为空":"The input cannot be empty"); return; } if (listener != null) { diff --git a/common/src/main/java/com/yunbao/common/views/LiveNewWishListPopup.java b/common/src/main/java/com/yunbao/common/views/LiveNewWishListPopup.java index 4ca74750f..a4af32be8 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveNewWishListPopup.java +++ b/common/src/main/java/com/yunbao/common/views/LiveNewWishListPopup.java @@ -32,6 +32,7 @@ import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; import org.greenrobot.eventbus.Subscribe; @@ -332,7 +333,7 @@ public class LiveNewWishListPopup extends BottomPopupView { setWishlistV2(type, gson.toJson(wishList2), new HttpCallback() { @Override public void onSuccess(String data) { - ToastUtil.show("修改成功"); + ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success"); } @Override diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index d2c6e9562..a0b0d26c1 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -1084,7 +1084,7 @@ Limited ride And limited avatar frame One-time gift ≥2000 diamonds), can obtain fan privilege yo Top up User level - aristocracy + Noble\nLevel Fan club Voice connection is not enabled Wall of honor @@ -1320,4 +1320,6 @@ Limited ride And limited avatar frame Join a fans club Sorry, your network failed to pull the other party. say something + No match was found + Add diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index 6667a300c..af444497c 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1317,4 +1317,6 @@ 抱歉,您的網絡不佳拉取對方畫面失敗 這家夥很懶,什麽都沒留下 + 沒有找到匹配結果~ + 確定添加 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index b38df1870..352fdec89 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1316,4 +1316,6 @@ 抱歉,您的網絡不佳拉取對方畫面失敗 這家夥很懶,什麽都沒留下 + 沒有找到匹配結果~ + 確定添加 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index e1c3c7772..fd5574955 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1316,4 +1316,6 @@ 加入粉絲團 抱歉,您的網絡不佳拉取對方畫面失敗 這家夥很懶,什麽都沒留下 + 沒有找到匹配結果~ + 確定添加 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index db6cee635..480f62744 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1084,7 +1084,7 @@ Limited ride And limited avatar frame One-time gift ≥2000 diamonds), can obtain fan privilege yo Top up User level - aristocracy + Noble\nLevel Fan club Voice connection is not enabled Wall of honor @@ -1323,4 +1323,6 @@ Limited ride And limited avatar frame Sorry, your network failed to pull the other party. say something + No match was found + Add diff --git a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java index 72f87232f..4bf42650e 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java @@ -70,6 +70,7 @@ import com.yunbao.common.utils.LogUtil; import com.yunbao.common.utils.MicStatusManager; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.LiveNewWishListPopup; import com.yunbao.common.views.LiveRobotSettingCustomPopup; import com.yunbao.faceunity.FaceManager; @@ -1244,7 +1245,11 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl }); //todo 安卓端状态码说明文档:https://docs.rongcloud.cn/v4/views/rtc/call/code/android.html Log.e("ry", rtcErrorCode + "aaaaaa" + CommonAppConfig.getInstance().getUid() + "VDSSSS" + pkUid); - ToastUtil.show("邀请 " + pkUid + " 发送失败 :" + rtcErrorCode); + if(WordUtil.isNewZh()) { + ToastUtil.show("邀请 " + pkUid + " 发送失败 :" + rtcErrorCode); + }else{ + ToastUtil.show("invite " + pkUid + " failed:"+rtcErrorCode); + } } }); @@ -1293,7 +1298,11 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl @Override public void onSuccess() { if (!extra.equals(SOCKET_LIVE_DRPK_RANDOM)) { - ToastUtil.show("邀请 " + pkUid + " 发送成功"); + if(WordUtil.isNewZh()) { + ToastUtil.show("邀请 " + pkUid + " 发送成功"); + }else{ + ToastUtil.show("invite " + pkUid + " successful"); + } } runOnUiThread(new Runnable() { @Override diff --git a/live/src/main/java/com/yunbao/live/adapter/AnchorUserMicInfoAdapter.java b/live/src/main/java/com/yunbao/live/adapter/AnchorUserMicInfoAdapter.java index c45181bbb..7202da106 100644 --- a/live/src/main/java/com/yunbao/live/adapter/AnchorUserMicInfoAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/AnchorUserMicInfoAdapter.java @@ -221,9 +221,15 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter { } if (bean.getType() == TYPE_MIC_REQUEST) { mBtn.setText("同意"); + if(!WordUtil.isNewZh()){ + mBtn.setText("agree"); + } mBtn.setBackgroundResource(R.drawable.bg_anchor_mic_info_btn_ok); } else if (bean.getType() == TYPE_MIC_INVITE) { mBtn.setText("邀请"); + if (!WordUtil.isNewZh()) { + mBtn.setText("invite"); + } mBtn.setBackgroundResource(R.drawable.bg_anchor_mic_info_btn_invite); } ImgLoader.display(mContext, bean.getAvatar(), mAvatar); diff --git a/live/src/main/java/com/yunbao/live/dialog/FreePkDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/FreePkDialogFragment.java index b1395ffc9..ef52c9a21 100644 --- a/live/src/main/java/com/yunbao/live/dialog/FreePkDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/FreePkDialogFragment.java @@ -130,13 +130,13 @@ public class FreePkDialogFragment extends AbsDialogFragment implements View.OnCl } }); if(!WordUtil.isNewZh()){ - mPkNumText.setText("Free PK remaining number"); + mPkNumText.setText("Free PK number"); ((TextView)findViewById(R.id.tmp_text2)).setText("Updated daily at 6am"); } if (mDrPkNum != -1) { mPkNumText.setText("多人PK剩余次數"); if(!WordUtil.isNewZh()){ - mPkNumText.setText("multi-user PK remaining number"); + mPkNumText.setText("multi-user PK number"); } } initRecycler(); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewWishListDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewWishListDialogFragment.java index f30c46085..b1a7905d0 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewWishListDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewWishListDialogFragment.java @@ -22,6 +22,7 @@ import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.live.R; import com.yunbao.live.activity.LiveAnchorActivity; import com.yunbao.live.activity.LiveRyAnchorActivity; @@ -118,7 +119,7 @@ public class LiveNewWishListDialogFragment extends AbsDialogFragment implements @Override public void onSuccess(int code, String msg, String[] info) { if (code == 0 && info.length > 0) { - ToastUtil.show("修改成功"); + ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success"); dismiss(); } else { ToastUtil.show("修改失败" + (msg.isEmpty() ? "" : msg)); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveWishListDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveWishListDialogFragment.java index ca7bd3ae8..12eb62dd7 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveWishListDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveWishListDialogFragment.java @@ -18,6 +18,7 @@ import com.yunbao.common.http.HttpCallback; import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.live.R; import com.yunbao.live.activity.LiveAnchorActivity; import com.yunbao.live.activity.LiveRyAnchorActivity; @@ -117,7 +118,7 @@ public class LiveWishListDialogFragment extends AbsDialogFragment implements OnI @Override public void onSuccess(int code, String msg, String[] info) { if (code == 0 && info.length > 0) { - ToastUtil.show("修改成功"); + ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success"); dismiss(); } else { ToastUtil.show("修改失败" + (msg.isEmpty() ? "" : msg)); diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java index 071ac25ba..223419aa9 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java @@ -57,6 +57,7 @@ import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.ScreenDimenUtil; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.live.R; import com.yunbao.live.activity.LiveAudienceActivity; import com.yunbao.live.activity.LiveRyAnchorActivity; @@ -857,7 +858,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onSuccess(RCRTCOtherRoom rcrtcOtherRoom) { rcrtcOtherRoom.registerOtherRoomEventsListener(otherRoomEventsListener); - ToastUtil.show("接受成功"); + ToastUtil.show(WordUtil.isNewZh()?"接受成功":"Success"); new Handler(Looper.getMainLooper()).post(new Runnable() { public void run() { for (int i = 0; i < rcrtcOtherRoom.getRemoteUsers().size(); i++) { @@ -976,7 +977,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onSuccess(RCRTCOtherRoom rcrtcOtherRoom) { rcrtcOtherRoom.registerOtherRoomEventsListener(otherRoomEventsListener); - ToastUtil.show("接受成功"); + ToastUtil.show(WordUtil.isNewZh()?"接受成功":"Success"); new Handler(Looper.getMainLooper()).post(new Runnable() { public void run() { Log.e("ry", liveid + "来了!!!!" + rcrtcOtherRoom.getRemoteUsers().size()); @@ -1659,7 +1660,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { } Log.e("ry", "多人接受成功" + mApplyUid); - ToastUtil.show("接受成功"); + ToastUtil.show(WordUtil.isNewZh()?"接受成功":"Success"); //遍历远端用户列表 for (int i = 0; i < rcrtcOtherRoom.getRemoteUsers().size(); i++) { Log.e("ry", rcrtcOtherRoom.getRemoteUsers().get(i).getUserId() + "收到rcrtcOtherRoom" + rcrtcOtherRoom.getRemoteUsers().size()); diff --git a/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java b/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java index b497b30d3..e3236c88a 100644 --- a/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java +++ b/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java @@ -1,10 +1,12 @@ package com.yunbao.live.utils; import android.content.Context; +import android.graphics.Color; import android.os.Handler; import android.os.Looper; import android.util.Log; import android.widget.RelativeLayout; +import android.widget.TextView; import androidx.annotation.NonNull; @@ -18,9 +20,13 @@ import com.google.android.exoplayer2.analytics.AnalyticsListener; import com.google.android.exoplayer2.ui.AspectRatioFrameLayout; import com.google.android.exoplayer2.ui.StyledPlayerView; import com.google.android.exoplayer2.video.VideoSize; +import com.lzf.easyfloat.EasyFloat; import com.yunbao.common.utils.ToastUtil; import com.yunbao.live.R; +import java.util.Timer; +import java.util.TimerTask; + /** * 直播间播放器管理器 * 通过预加载子播放器来实现无缝切换分辨率功能 @@ -40,6 +46,9 @@ public class LiveExoPlayerManager { private static double log_buffer_time = 0, log_buffer_max_time; private String url = ""; private Context mContext; + private TimerTask task; + + TextView debugText; public LiveExoPlayerManager(Context mContext) { this.mContext = mContext; @@ -59,6 +68,109 @@ public class LiveExoPlayerManager { handler = new Handler(Looper.getMainLooper()); setListener(); setAnalyticsListener(); + //createDeBugDialog(); + + } + + int index = 0; + + private void createTask() { + if (task != null) { + return; + } + task = new TimerTask() { + + + @Override + public void run() { + handler.post(new Runnable() { + @Override + public void run() { + try { + if (index > 5 && !player1.isPlaying() && !player2.isPlaying()) { + index = 0; + Log.i(TAG, "5秒内播放器没有播放,重新播放"); + ToastUtil.showDebug("强制重播"); + handler.removeCallbacks(buffRunnable); + replay(); + cancel(); + } else if (player1.isPlaying() || player2.isPlaying()) { + index = 0; + } else { + index++; + } + } catch (Exception e) { + e.printStackTrace(); + cancel(); + task = null; + } + + } + }); + + } + }; + new Timer().schedule(task, 0, 1000); + } + + private TimerTask debugTask; + + private void createDeBugDialog() { + debugText = new TextView(mContext); + debugText.setText(getDebugText()); + debugText.setBackgroundColor(Color.WHITE); + debugText.setTextColor(Color.BLACK); + EasyFloat.with(mContext) + .setTag("debug") + .setLayout(debugText) + .show(); + debugTask = new TimerTask() { + @Override + public void run() { + updateDebug(); + } + }; + new Timer().schedule(debugTask, 0, 500); + } + + private String getDebugText() { + StringBuilder sb = new StringBuilder(); + try { + sb.append("player1: ").append(getPlayStateText(player1)).append("|").append(player1.isPlaying()).append("\n"); + sb.append("player2: ").append(getPlayStateText(player2)).append("|").append(player2.isPlaying()).append("\n"); + sb.append("卡顿计数器:").append(playBufferIndex).append("\n"); + sb.append("强制播放计时器:").append(index).append("\n"); + } catch (Exception e) { + e.printStackTrace(); + EasyFloat.dismiss("debug"); + debugTask.cancel(); + } + + return sb.toString(); + } + + private void updateDebug() { + handler.post(new Runnable() { + @Override + public void run() { + debugText.setText(getDebugText()); + } + }); + } + + private String getPlayStateText(ExoPlayer player) { + switch (player.getPlaybackState()) { + case Player.STATE_READY: + return "STATE_READY"; + case Player.STATE_BUFFERING: + return "STATE_BUFFERING"; + case Player.STATE_ENDED: + return "STATE_ENDED"; + case Player.STATE_IDLE: + return "STATE_IDLE"; + default: + return player.getPlaybackState() + ""; + } } @@ -171,6 +283,7 @@ public class LiveExoPlayerManager { if (listener != null) { listener.onIsPlayingChanged(true); } + createTask(); } } @@ -245,6 +358,7 @@ public class LiveExoPlayerManager { if (listener != null) { listener.onIsPlayingChanged(true); } + createTask(); } } @@ -280,6 +394,11 @@ public class LiveExoPlayerManager { */ public void startUrl(String url) { if (url != null && url.equals(this.url)) return; + if (task != null) { + task.cancel(); + task = null; + } + Log.i(TAG, "startUrl: " + url + " > " + mainView.getResizeMode()); handler.removeCallbacks(buffRunnable); this.url = url; @@ -303,6 +422,10 @@ public class LiveExoPlayerManager { */ public void switchUrl(String url) { if (url != null && url.equals(this.url)) return; + if (task != null) { + task.cancel(); + task = null; + } Log.i(TAG, "switchUrl: " + url + " src : " + this.url); this.url = url; playBufferIndex = 0; @@ -369,6 +492,14 @@ public class LiveExoPlayerManager { if (getNextPlayer() != null) { getNextPlayer().stop(); } + if (listener != null) { + listener.onPlaybackStateChanged(Player.STATE_IDLE); + } + handler.removeCallbacks(buffRunnable); + if (task != null) { + task.cancel(); + task = null; + } String tmp = url; url = null; startUrl(tmp); @@ -394,6 +525,13 @@ public class LiveExoPlayerManager { player2.clearVideoSurface(); player2.release(); } + if (task != null) { + task.cancel(); + task = null; + } + if (debugTask != null) { + debugTask.cancel(); + } player1 = null; player2 = null; mainView.setKeepContentOnPlayerReset(false); diff --git a/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java index 94487fe74..4be20f372 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java @@ -218,7 +218,7 @@ public class LiveLinkMicPkViewHolder extends AbsViewHolder { if (mTime != null) { Log.i("vvvs", content); if (content.trim().equals("00:00")) { - mTime.setText("結算中"); + mTime.setText(WordUtil.isNewZh()?"結算中":"waiting"); } else { mTime.setText(content); } diff --git a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java index dd25ac6dd..0fab5e098 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java @@ -1287,6 +1287,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder { Player.Listener.super.onIsPlayingChanged(isPlaying); if (isPlaying) { hideCover(); + mLoading.setVisibility(View.INVISIBLE); Log.i(TAG, "onIsPlayingChanged: 开始播放 | waitNextUrl = " + waitNextUrl); OkDownload.getInstance().startAll(); if (loadingListener != null) { diff --git a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java index d8eb63a61..0551f721f 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java @@ -495,7 +495,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX btn_close.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - DialogUitl.showSimpleDialog(mContext, "是否要斷開連麥?", new DialogUitl.SimpleCallback() { + DialogUitl.showSimpleDialog(mContext,WordUtil.isNewZh()? "是否要斷開連麥?":"Do you want to disconnect Link?", new DialogUitl.SimpleCallback() { @Override public void onConfirmClick(Dialog dialog, String content) { aheadOfScheduleEndPK(mPkUid, CommonAppConfig.getInstance().getUserBean().getUserNiceName(), (String) tv_avatarOther_name.getTag()); diff --git a/live/src/main/java/com/yunbao/live/views/LivePushTxViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePushTxViewHolder.java index 8cd662aef..e4213577c 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePushTxViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePushTxViewHolder.java @@ -36,6 +36,7 @@ import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.L; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.live.R; import com.yunbao.live.activity.LiveActivity; import com.yunbao.common.http.LiveHttpConsts; @@ -103,7 +104,7 @@ public class LivePushTxViewHolder extends AbsLivePushViewHolder implements ITXLi btn_close.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - DialogUitl.showSimpleDialog(mContext, "是否要斷開連麥?", new DialogUitl.SimpleCallback() { + DialogUitl.showSimpleDialog(mContext, WordUtil.isNewZh()?"是否要斷開連麥?":"Do you want to disconnect Link?", new DialogUitl.SimpleCallback() { @Override public void onConfirmClick(Dialog dialog, String content) { //断开连麦 diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 0df33d47d..46b3479d5 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -681,7 +681,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } } AppManager.runDebugCode(() -> { - liveHandler.postDelayed(loadTimeoutRunnableGone, 1_000); + // liveHandler.postDelayed(loadTimeoutRunnableGone, 1_000); }); liveHandler.postDelayed(loadTimeoutRunnableGone, 15_000); if (TextUtils.equals(data.getEnterRoomInfo().getIsconnection(), "1")) { diff --git a/live/src/main/res/layout/dialog_fans_group_buy.xml b/live/src/main/res/layout/dialog_fans_group_buy.xml index 88dde5508..6c933439d 100644 --- a/live/src/main/res/layout/dialog_fans_group_buy.xml +++ b/live/src/main/res/layout/dialog_fans_group_buy.xml @@ -48,15 +48,17 @@ + app:layout_constraintTop_toBottomOf="@+id/giftName" /> diff --git a/live/src/main/res/layout/view_live_push_tx.xml b/live/src/main/res/layout/view_live_push_tx.xml index 7d844dd5b..c4cf37ed2 100644 --- a/live/src/main/res/layout/view_live_push_tx.xml +++ b/live/src/main/res/layout/view_live_push_tx.xml @@ -135,7 +135,7 @@ android:paddingTop="5dp" android:paddingRight="8dp" android:paddingBottom="5dp" - android:text="結束連麥" + android:text="@string/live_link_mic_3" android:textColor="@color/color_white" android:textSize="13sp" android:visibility="gone" /> diff --git a/live/src/main/res/layout/view_live_search_list_empty.xml b/live/src/main/res/layout/view_live_search_list_empty.xml index 6c4319be8..f0119cbb7 100644 --- a/live/src/main/res/layout/view_live_search_list_empty.xml +++ b/live/src/main/res/layout/view_live_search_list_empty.xml @@ -19,7 +19,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="25dp" - android:text="沒有找到匹配結果~" + android:text="@string/live_free_pk_empty_tips" android:textColor="#C4C4C4" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java b/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java index a1d00bb64..be982713c 100644 --- a/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java +++ b/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java @@ -244,7 +244,7 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O LiveHttpUtil.getLiveSdk(mGetLiveSdkCallback); }); } else { - String tips="需要下载开播插件,是否下载"; + String tips="需要下載開播插件,是否下載"; if(!WordUtil.isNewZh()){ tips="You need to download the plug-in, whether to download"; } From 4e4b5f90bbc0630f9f9998677494e9eab05bc88b Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 21 Sep 2023 11:14:01 +0800 Subject: [PATCH 12/19] =?UTF-8?q?fix=20=E9=87=8D=E5=A4=8D=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E5=BC=B9=E7=AA=97=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/common/manager/OpenAdManager.java | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java index d5a24c3a7..4003b6a17 100644 --- a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java +++ b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java @@ -49,13 +49,21 @@ public class OpenAdManager { } private void init(boolean isShow) { + if (list != null && list.isEmpty()) { + return; + } LiveNetManager.get(CommonAppContext.getTopActivity()) .activityPopup(new HttpCallback>() { @Override public void onSuccess(List data) { + if (data == null || data.isEmpty()) { + Log.i(TAG, "onSuccess: 没有数据"); + list = new ArrayList<>(); + return; + } list = data; if (isShow) { - show(TYPE_HOME,false); + show(TYPE_HOME, false); } } @@ -67,31 +75,31 @@ public class OpenAdManager { } - public synchronized void show(int type,boolean isGuard) { - if (list==null) { + public synchronized void show(int type, boolean isGuard) { + if (list == null) { init(true); return; } - showType=type; + showType = type; for (OpenAdModel model : list) { if (model.getType() == type) { - if(type==OpenAdModel.TYPE_LIVE && !model.userIsPermission(isGuard)){ + if (type == OpenAdModel.TYPE_LIVE && !model.userIsPermission(isGuard)) { continue; } if (runnableMap.containsKey(model.getId())) { AdRunnable runnable = runnableMap.get(model.getId()); if (runnable != null) { - Log.d(TAG, "reset: "+model); + Log.d(TAG, "reset: " + model); handler.removeCallbacks(runnable); runnableMap.remove(model.getId()); } } if (!isShow(model)) { - Log.i(TAG, "show: "+model); + Log.i(TAG, "show: " + model); handler.postDelayed(new AdRunnable(model), model.getDelayShowTime()); - }else{ - Log.i(TAG, "notshow: "+model); + } else { + Log.i(TAG, "notshow: " + model); } } @@ -101,10 +109,10 @@ public class OpenAdManager { } public synchronized void dismiss() { - Log.d(TAG, "准备dismiss:"+runnableMap.size() ); + Log.d(TAG, "准备dismiss:" + runnableMap.size()); for (Integer model : runnableMap.keySet()) { AdRunnable runnable = runnableMap.get(model); - Log.d(TAG, "dismiss:"+runnable); + Log.d(TAG, "dismiss:" + runnable); if (runnable != null) { runnable.dismiss(); handler.removeCallbacks(runnable); @@ -127,13 +135,14 @@ public class OpenAdManager { this.model = model; runnableMap.put(model.getId(), this); } - public void dismiss(){ - Log.e(TAG, "dismiss: "+model ); + + public void dismiss() { + Log.e(TAG, "dismiss: " + model); } @Override public synchronized void run() { - Log.i(TAG, "run: "+model); + Log.i(TAG, "run: " + model); if (model == null) { ToastUtil.showDebug("model为空"); return; @@ -146,7 +155,7 @@ public class OpenAdManager { ToastUtil.showDebug(model.getId() + "|model展示过了"); return; } - if(model.getType()!=showType){ + if (model.getType() != showType) { return; } showMap.put(model.getId(), true); From 00db8a00c77ecff6b3f8328616efa69353f9dbf7 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 22 Sep 2023 11:05:02 +0800 Subject: [PATCH 13/19] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E5=8F=8D=E9=A6=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yunbao/common/manager/OpenAdManager.java | 3 +++ .../main/java/com/yunbao/common/utils/PluginManager.java | 1 + config.gradle | 3 ++- .../java/com/yunbao/live/utils/LiveExoPlayerManager.java | 6 +++++- .../java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java | 2 +- .../java/com/yunbao/live/views/LivePushRyViewHolder.java | 2 ++ 6 files changed, 14 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java index 4003b6a17..b9e967df9 100644 --- a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java +++ b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java @@ -52,6 +52,9 @@ public class OpenAdManager { if (list != null && list.isEmpty()) { return; } + if(CommonAppContext.getTopActivity()==null){ + return; + } LiveNetManager.get(CommonAppContext.getTopActivity()) .activityPopup(new HttpCallback>() { @Override diff --git a/common/src/main/java/com/yunbao/common/utils/PluginManager.java b/common/src/main/java/com/yunbao/common/utils/PluginManager.java index 395dbee7c..fc0ef13cf 100644 --- a/common/src/main/java/com/yunbao/common/utils/PluginManager.java +++ b/common/src/main/java/com/yunbao/common/utils/PluginManager.java @@ -143,6 +143,7 @@ public class PluginManager { private void loadSo(File dir, String file) { file += ".so"; if (new File(dir.getAbsolutePath() + File.separator + file).exists()) { + Log.d(TAG, "加载 " + dir.getAbsolutePath() + File.separator + file); System.load(dir + File.separator + file); Log.d(TAG, "加载成功 " + dir + File.separator + file); } else { diff --git a/config.gradle b/config.gradle index 3e1349d45..3de4f1582 100644 --- a/config.gradle +++ b/config.gradle @@ -26,5 +26,6 @@ ext { //是否上报异常日志 isUploadLog : true, //是否打包成插件包模式 - isPluginModel : true, ] + isPluginModel : false, + ] } diff --git a/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java b/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java index e3236c88a..e68e8434b 100644 --- a/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java +++ b/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java @@ -68,7 +68,7 @@ public class LiveExoPlayerManager { handler = new Handler(Looper.getMainLooper()); setListener(); setAnalyticsListener(); - //createDeBugDialog(); + // createDeBugDialog(); } @@ -474,6 +474,10 @@ public class LiveExoPlayerManager { if (getNextPlayer() != null && getNextPlayer().isPlaying()) { getNextPlayer().stop(); } + if (task != null) { + task.cancel(); + task = null; + } clearUrl(); } diff --git a/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java index 4be20f372..2d523138a 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java @@ -157,7 +157,7 @@ public class LiveLinkMicPkViewHolder extends AbsViewHolder { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { Log.i("女神说", "倒计时状态:" + s); - if (mTime.getVisibility() == View.VISIBLE) { + if (mTime.getVisibility() == View.VISIBLE && !s.toString().contains(mContext.getString(R.string.live_pk_time_2))) { EventBus.getDefault().post(new LiveAudienceEvent() .setType(LiveAudienceEvent.LiveAudienceType.LIVE_PK_ING)); } diff --git a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java index 0551f721f..37aca3580 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java @@ -498,6 +498,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX DialogUitl.showSimpleDialog(mContext,WordUtil.isNewZh()? "是否要斷開連麥?":"Do you want to disconnect Link?", new DialogUitl.SimpleCallback() { @Override public void onConfirmClick(Dialog dialog, String content) { + Log.i("PK----->", "updateSub: "+isPk+"|"); aheadOfScheduleEndPK(mPkUid, CommonAppConfig.getInstance().getUserBean().getUserNiceName(), (String) tv_avatarOther_name.getTag()); //断开连麦 LiveRyAnchorActivity.isDRPK = 0; @@ -1056,5 +1057,6 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX } else if (event.getType() == LIVE_PK_ING) { isPk = true; } + Log.i("PK----->", "updateSub: "+isPk+"|"+event.getType()); } } From 18970c22cf76e444f71acd550f8364addc4d2c9d Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 22 Sep 2023 13:38:34 +0800 Subject: [PATCH 14/19] =?UTF-8?q?update=20=E9=A4=98=E9=A1=8D=E4=B8=8D?= =?UTF-8?q?=E8=B6=B3=E6=99=82=E5=BD=88=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../utils/JavascriptInterfaceUtils.java | 16 ++++++++++ .../yunbao/live/activity/LiveActivity.java | 31 ++++++++++++++----- .../dialog/LiveNewGuardBuyDialogFragment.java | 20 +++++++++++- 3 files changed, 59 insertions(+), 8 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java b/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java index fe911bd3b..ddb52f8c9 100644 --- a/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java +++ b/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java @@ -4,6 +4,7 @@ import static com.yunbao.common.CommonAppConfig.isGetNewWrap; import static com.yunbao.common.utils.RouteUtil.PATH_COIN; import android.app.Activity; +import android.app.Dialog; import android.os.Handler; import android.os.Looper; import android.view.View; @@ -643,4 +644,19 @@ public class JavascriptInterfaceUtils { Bus.get().post(new JavascriptInterfaceEvent() .setMethod("androidCancelAnchorAttention")); } + @JavascriptInterface + public void androidLnsufficientBalanceClick(String msg){ + DialogUitl.showSimpleDialog(mContext, msg, new DialogUitl.SimpleCallback2() { + @Override + public void onCancelClick() { + + } + + @Override + public void onConfirmClick(Dialog dialog, String content) { + dialog.dismiss(); + ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation(); + } + }); + } } diff --git a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java index 64ece985f..2fd05cf34 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java @@ -1,5 +1,7 @@ package com.yunbao.live.activity; +import static com.yunbao.common.utils.RouteUtil.PATH_COIN; + import android.app.Dialog; import android.content.ClipData; import android.content.ClipboardManager; @@ -15,6 +17,7 @@ import android.widget.TextView; import androidx.fragment.app.DialogFragment; +import com.alibaba.android.arouter.launcher.ARouter; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.blankj.utilcode.util.GsonUtils; @@ -36,6 +39,7 @@ import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.interfaces.KeyBoardHeightChangeListener; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.KeyBoardHeightUtil2; import com.yunbao.common.utils.L; import com.yunbao.common.utils.ProcessImageUtil; @@ -898,7 +902,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL @Override public void onClick(View v) { String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1"; - WebViewActivity.forward(mContext, url,true); + WebViewActivity.forward(mContext, url, true); dialog.dismiss(); } }); @@ -924,7 +928,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL if (!mIsAnchor) { UserBean u = CommonAppConfig.getInstance().getUserBean(); if (u != null && u.getLevel() < mDanMuLevel) { - ToastUtil.show(String.format(mContext.getString(R.string.live_level_danmu_limit), mDanMuLevel+"")); + ToastUtil.show(String.format(mContext.getString(R.string.live_level_danmu_limit), mDanMuLevel + "")); return; } } @@ -945,7 +949,20 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL onCoinChanged(coin); } String[] data = new String[]{obj.getString("barragetoken")}; - SocketRyChatUtil.sendDanmuMessage(mLiveUid, contents,obj.getIntValue("level_fans")); + SocketRyChatUtil.sendDanmuMessage(mLiveUid, contents, obj.getIntValue("level_fans")); + } else if (code==1001) { + DialogUitl.showSimpleDialog(mContext, msg, new DialogUitl.SimpleCallback2() { + @Override + public void onCancelClick() { + + } + + @Override + public void onConfirmClick(Dialog dialog, String content) { + dialog.dismiss(); + ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation(); + } + }); } else { ToastUtil.show(msg); } @@ -961,7 +978,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL if (!mIsAnchor) { UserBean u = CommonAppConfig.getInstance().getUserBean(); if (u != null && u.getLevel() < mChatLevel) { - ToastUtil.show(String.format(mContext.getString(R.string.live_level_chat_limit), mChatLevel+"")); + ToastUtil.show(String.format(mContext.getString(R.string.live_level_chat_limit), mChatLevel + "")); return; } } @@ -1275,9 +1292,9 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL } else { bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/fansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid); } - bundle.putString("liveUid",mLiveUid); - bundle.putString("anchorName",mAncherName); - bundle.putString("mStream",mStream); + bundle.putString("liveUid", mLiveUid); + bundle.putString("anchorName", mAncherName); + bundle.putString("mStream", mStream); fragment.setArguments(bundle); fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment"); } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java index 33da1cc69..6c9e9a5aa 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java @@ -1,5 +1,7 @@ package com.yunbao.live.dialog; +import static com.yunbao.common.utils.RouteUtil.PATH_COIN; + import android.app.Dialog; import android.os.Bundle; import android.text.Html; @@ -19,6 +21,7 @@ import androidx.annotation.Nullable; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; +import com.alibaba.android.arouter.launcher.ARouter; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.makeramen.roundedimageview.RoundedImageView; @@ -34,6 +37,7 @@ import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.live.R; import com.yunbao.live.activity.LiveActivity; import com.yunbao.live.activity.LiveRyAnchorActivity; @@ -462,7 +466,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements private void buy() { DialogUitl.showSimpleDialog(mContext, - String.format(mContext.getString(R.string.guard_buy_tip_3), mTargetBuyBean.getCoin(), mCoinName, mTargetBuyBean.getShopName(getContext())), + String.format(mContext.getString(R.string.guard_buy_tip_3), mTargetBuyBean.getCoin()+"", mCoinName, mTargetBuyBean.getShopName(getContext())), new DialogUitl.SimpleCallback() { @Override @@ -499,6 +503,20 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements } ((LiveActivity) mContext).sendBuyGuardMessage2(votes, guardNum, guardType, ancherName, liveuid); dismiss(); + }else if(code==1002){ + DialogUitl.showSimpleDialog(mContext, msg, new DialogUitl.SimpleCallback2() { + @Override + public void onCancelClick() { + + } + + @Override + public void onConfirmClick(Dialog dialog, String content) { + dialog.dismiss(); + ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation(); + } + }); + return; } ToastUtil.show(msg); } From 326ced4646178c9fe4f402f70a5744c64fafffdd Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 22 Sep 2023 14:25:54 +0800 Subject: [PATCH 15/19] =?UTF-8?q?update=20=E9=A4=98=E9=A1=8D=E4=B8=8D?= =?UTF-8?q?=E8=B6=B3=E6=99=82=E5=BD=88=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/main/dialog/EncourageDialog.java | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/com/yunbao/main/dialog/EncourageDialog.java b/main/src/main/java/com/yunbao/main/dialog/EncourageDialog.java index f4d5a6cd7..3ba19ec60 100644 --- a/main/src/main/java/com/yunbao/main/dialog/EncourageDialog.java +++ b/main/src/main/java/com/yunbao/main/dialog/EncourageDialog.java @@ -1,11 +1,16 @@ package com.yunbao.main.dialog; +import static com.yunbao.common.utils.RouteUtil.PATH_COIN; + import android.annotation.SuppressLint; +import android.app.Dialog; import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Bundle; + import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; + import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -16,12 +21,14 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import com.alibaba.android.arouter.launcher.ARouter; import com.alibaba.fastjson.JSON; import com.makeramen.roundedimageview.RoundedImageView; import com.yunbao.common.Constants; import com.yunbao.common.dialog.AbsDialogFragment; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.main.R; @@ -265,8 +272,23 @@ public class EncourageDialog extends AbsDialogFragment implements View.OnClickLi public void onSuccess(int code, String msg, String[] info) { if (code == 0) { dismiss(); + } else if (code == 1001) { + DialogUitl.showSimpleDialog(mContext, msg, new DialogUitl.SimpleCallback2() { + @Override + public void onCancelClick() { + + } + + @Override + public void onConfirmClick(Dialog dialog, String content) { + dialog.dismiss(); + ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation(); + } + }); + } else { + ToastUtil.show(msg); } - ToastUtil.show(msg); + } }); From c015459cf1c94a6622b27172136833e93e1003ee Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 22 Sep 2023 14:27:23 +0800 Subject: [PATCH 16/19] =?UTF-8?q?fix=20=E6=92=AD=E6=94=BE=E5=99=A8url?= =?UTF-8?q?=E7=82=BA=E7=A9=BA=E6=99=82=E4=B8=8D=E6=92=AD=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/live/utils/LiveExoPlayerManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java b/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java index e68e8434b..839be869d 100644 --- a/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java +++ b/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java @@ -21,6 +21,7 @@ import com.google.android.exoplayer2.ui.AspectRatioFrameLayout; import com.google.android.exoplayer2.ui.StyledPlayerView; import com.google.android.exoplayer2.video.VideoSize; import com.lzf.easyfloat.EasyFloat; +import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.live.R; @@ -393,7 +394,7 @@ public class LiveExoPlayerManager { * @param url 地址 */ public void startUrl(String url) { - if (url != null && url.equals(this.url)) return; + if (!StringUtil.isEmpty(url) && url.equals(this.url)) return; if (task != null) { task.cancel(); task = null; @@ -421,7 +422,7 @@ public class LiveExoPlayerManager { * @param url 地址 */ public void switchUrl(String url) { - if (url != null && url.equals(this.url)) return; + if (!StringUtil.isEmpty(url) && url.equals(this.url)) return; if (task != null) { task.cancel(); task = null; From 4b3b47b65fd182056d72c47f2020a7d007d3827f Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Sat, 23 Sep 2023 10:31:06 +0800 Subject: [PATCH 17/19] =?UTF-8?q?update=20=E5=B8=83=E5=B1=80&=E4=B8=AD?= =?UTF-8?q?=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/utils/ToastUtil.java | 1 + common/src/main/res/values-en-rUS/string.xml | 4 ++-- common/src/main/res/values/strings.xml | 2 +- .../layout/view_funs_live_anchor_start_notify.xml | 13 +++++++++---- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/utils/ToastUtil.java b/common/src/main/java/com/yunbao/common/utils/ToastUtil.java index d2240037d..35ada5438 100644 --- a/common/src/main/java/com/yunbao/common/utils/ToastUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/ToastUtil.java @@ -92,6 +92,7 @@ public class ToastUtil { if (TextUtils.isEmpty(s)) { return; } + Log.i("Toast", "Toast show: "+s); Log.i("ts","ll"); Toast.makeText(CommonAppContext.sInstance,s,Toast.LENGTH_SHORT).show(); Log.i("ts","22"); diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index a0b0d26c1..d5b40f03a 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -683,7 +683,7 @@ Banned users List of forbidden users Live room of - Lifting of the ban + Remove Blacklist of users No banned users No blacklisted users @@ -956,7 +956,7 @@ Limited ride And limited avatar frame Chat Congratulations %s have won %s in the Lucky Angel! The next lucky angel will be you! Congratulations on %s winning %s in Luck 100 %%! Go pass on the good luck! - Guardian %s + guard %s receive To finish Already collected diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 480f62744..8719d9e54 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -683,7 +683,7 @@ Banned users List of forbidden users Live room of - Lifting of the ban + Remove Blacklist of users No banned users No blacklisted users diff --git a/live/src/main/res/layout/view_funs_live_anchor_start_notify.xml b/live/src/main/res/layout/view_funs_live_anchor_start_notify.xml index 43c6443be..fd24fc00a 100644 --- a/live/src/main/res/layout/view_funs_live_anchor_start_notify.xml +++ b/live/src/main/res/layout/view_funs_live_anchor_start_notify.xml @@ -1,7 +1,8 @@ @@ -9,7 +10,7 @@ From b40abb9bc098e02b5243c460770822cb8b43c289 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Mon, 25 Sep 2023 09:54:39 +0800 Subject: [PATCH 18/19] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8DPK=E8=BF=87?= =?UTF-8?q?=E7=A8=8B=E4=B8=AD=E6=8C=82=E5=90=8E=E5=8F=B0=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=91=84=E5=83=8F=E5=A4=B4=E5=85=B3=E9=97=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/utils/LogUtil.java | 4 +- .../yunbao/common/utils/PluginManager.java | 39 ++++++++----- .../res/mipmap-mdpi/icon_rank_top_box.png | Bin 7155 -> 22091 bytes .../live/views/LivePushRyViewHolder.java | 53 ++++++++++++++++-- .../yunbao/live/views/LiveRoomViewHolder.java | 4 +- 5 files changed, 79 insertions(+), 21 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/utils/LogUtil.java b/common/src/main/java/com/yunbao/common/utils/LogUtil.java index b5deb1c93..d3503a34d 100644 --- a/common/src/main/java/com/yunbao/common/utils/LogUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/LogUtil.java @@ -158,7 +158,7 @@ public class LogUtil { public static void shareFile(Context context) { - try { + /* try { IMLoginModel bean = IMLoginManager.get(context).getUserInfo(); boolean isAnchor=false; if(bean!=null){ @@ -170,7 +170,7 @@ public class LogUtil { } } catch (Exception e) { return; - } + }*/ /* if (PermissionChecker.checkCallingOrSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PERMISSION_GRANTED) { ActivityCompat.requestPermissions((Activity) context, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 100); return; diff --git a/common/src/main/java/com/yunbao/common/utils/PluginManager.java b/common/src/main/java/com/yunbao/common/utils/PluginManager.java index fc0ef13cf..17e723687 100644 --- a/common/src/main/java/com/yunbao/common/utils/PluginManager.java +++ b/common/src/main/java/com/yunbao/common/utils/PluginManager.java @@ -49,17 +49,17 @@ public class PluginManager { } public boolean isDownloadApk() { - if(!CommonAppConfig.IS_PLUGIN_MODEL){ + if (!CommonAppConfig.IS_PLUGIN_MODEL) { return true; } - return new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download" + File.separator + "anchorPlugin.apk").exists(); + return new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download" + File.separator + "anchorPlugin.apk.lock").exists(); } /** * 加载主播插件 */ public void loadAnchorPlugin(DialogInterface.OnDismissListener dismissListener) { - if(!CommonAppConfig.IS_PLUGIN_MODEL){ + if (!CommonAppConfig.IS_PLUGIN_MODEL) { dismissListener.onDismiss(null); return; } @@ -73,7 +73,8 @@ public class PluginManager { e.printStackTrace(); } File sdk = new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download" + File.separator + "anchorPlugin.apk"); - if (!sdk.exists()) { + if (!new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download" + File.separator + "anchorPlugin.apk.lock").exists() || !sdk.exists()) { + Log.i(TAG, "loadAnchorPlugin: 插件未下载"); if (StringUtil.isEmpty(anchorPluginDownloadUrl)) { Log.e(TAG, "主播下载地址为空"); return; @@ -97,8 +98,12 @@ public class PluginManager { * @param outDir 解压路径 */ private void loadFaceSo(File plugin, String outDir) { - if(!new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin"+File.separator+"lib").exists()) { - unzip(plugin.getAbsolutePath(), outDir, ".so"); + if (!new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin" + File.separator + "lib.lock").exists()) { + Log.i(TAG, "loadFaceSo: lib插件未解压"); + if (unzip(plugin.getAbsolutePath(), outDir, ".so")) { + new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin" + File.separator + "lib.lock").mkdirs(); + Log.i(TAG, "loadFaceSo: lib插件解压"); + } } String[] abis = Build.SUPPORTED_ABIS; String abi = Arrays.asList(abis).contains("arm64-v8a") ? "arm64-v8a" : "armeabi-v7a"; @@ -108,8 +113,8 @@ public class PluginManager { try { Field field = Class.forName("com.faceunity.wrapper.faceunity$LoadConfig").getDeclaredField("sLoadedLibrary"); field.setAccessible(true); - field.set(null,true); - }catch (Exception e){ + field.set(null, true); + } catch (Exception e) { e.printStackTrace(); } } @@ -121,8 +126,12 @@ public class PluginManager { * @param outDir 解压路径 */ private void loadFaceBundle(File plugin, String outDir) { - if(!new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin"+File.separator+"assets").exists()) { - unzip(plugin.getAbsolutePath(), outDir, ".bundle"); + if (!new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin" + File.separator + "assets.lock").exists()) { + Log.i(TAG, "loadFaceBundle: bundle未解压"); + if (unzip(plugin.getAbsolutePath(), outDir, ".bundle")) { + Log.i(TAG, "loadFaceBundle: bundle解压"); + new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin" + File.separator + "assets.lock").mkdirs(); + } } try { Object BUNDLE_AI_FACE = Class.forName("com.yunbao.faceunity.utils.FURenderer").getField("BUNDLE_AI_FACE").get(null); @@ -131,6 +140,7 @@ public class PluginManager { Class.forName("com.yunbao.faceunity.utils.FaceUnityConfig").getField("BUNDLE_FACE_BEAUTIFICATION").set(null, outDir + File.separator + "assets" + File.separator + BUNDLE_FACE_BEAUTIFICATION); } catch (Exception e) { e.printStackTrace(); + new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin" + File.separator + "assets.lock").delete(); } } @@ -148,6 +158,7 @@ public class PluginManager { Log.d(TAG, "加载成功 " + dir + File.separator + file); } else { Log.e(TAG, "不存在 " + dir + File.separator + file); + new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin" + File.separator + "lib.lock").delete(); } } @@ -160,6 +171,7 @@ public class PluginManager { @Override public void onSuccess(File file) { Log.d(TAG, "下载成功 " + file); + new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download" + File.separator + "anchorPlugin.apk.lock").mkdirs(); loadAnchorPlugin(dismissListener); } @@ -170,7 +182,7 @@ public class PluginManager { @Override public void onError(Throwable e) { - + downloadAnchorSdk(dismissListener); } }); } @@ -187,13 +199,14 @@ public class PluginManager { FileOutputStream out; byte buffer[] = new byte[1024]; try { + Log.i(TAG, "unzip: " + outDir); ZipInputStream zis = new ZipInputStream(new FileInputStream(zip)); ZipEntry entry = zis.getNextEntry(); while (entry != null) { String name = entry.getName(); if (entry.isDirectory()) { File newDir = new File(outDir + entry.getName()); - newDir.mkdir(); + newDir.mkdirs(); } else if (name.endsWith(suffix)) { File outputFile = new File(outDir + File.separator + name); String outputPath = outputFile.getCanonicalPath(); @@ -206,7 +219,7 @@ public class PluginManager { outputFile = new File(outputPath, name); outputFile.createNewFile(); out = new FileOutputStream(outputFile); - + Log.i(TAG, "unzip: >>" + outputFile.getAbsolutePath()); int tmp = 0; while ((tmp = zis.read(buffer)) > 0) { out.write(buffer, 0, tmp); diff --git a/common/src/main/res/mipmap-mdpi/icon_rank_top_box.png b/common/src/main/res/mipmap-mdpi/icon_rank_top_box.png index 572bdb1b2b0299be4ab1462e5f03a6c9028d7b43..6241af8859d3aa1484bb9a8905eb14b8a9b7c0ce 100644 GIT binary patch literal 22091 zcmaI6Wn3IVw(8`NQ6jGP*A9HvXbghP|$#XZD9nsf9IYcT+qJ@ft!?$n}(x> zn39;7Hann&!Ieh32bU>?nZ86ZfWfxM0wfXO-XKTCPb;trNpM>Bw=o4E$icAuHmDsY3gHZ%4bF? zB1|sm#s5!$y}28h+{@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YQCqRCZ-_66CrjM6qaT|iS7iH?p~5~SFcm|hH-+w|337u74h;NWKl2IZKe3T zN#dc4iw`Nl3n^gd)PBG{&6I-eKb-}U6yy(;gUse3ns;zf00@9a3<5hD#WcG~YC|o& zo>k_ZlzoOU5dgy$ucdTSra%B}Z)O(oF!UVcW3sRz{5pQuv_ADuYbnKIwhgtwo?>K0 zjn{IxTG?d$j8BAAe;24(fCesB-zx$TSj_QuGE(j-uGv=g5xhygmGbwtRdFYUBd~#O p)ql3Op#JYg>#e~1ece~4`VBA0ieDgn>Bs;8002ovPDHLkV1iZJbF=^e diff --git a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java index 37aca3580..36b819374 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java @@ -76,6 +76,7 @@ import cn.rongcloud.rtc.api.RCRTCMixConfig; import cn.rongcloud.rtc.api.RCRTCRemoteUser; import cn.rongcloud.rtc.api.RCRTCRoom; import cn.rongcloud.rtc.api.RCRTCRoomConfig; +import cn.rongcloud.rtc.api.callback.IRCRTCEngineEventListener; import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback; import cn.rongcloud.rtc.api.callback.IRCRTCResultDataCallback; import cn.rongcloud.rtc.api.callback.IRCRTCRoomEventsListener; @@ -85,6 +86,7 @@ import cn.rongcloud.rtc.api.stream.RCRTCVideoStreamConfig; import cn.rongcloud.rtc.api.stream.RCRTCVideoView; import cn.rongcloud.rtc.base.RCRTCParamsType; import cn.rongcloud.rtc.base.RCRTCRoomType; +import cn.rongcloud.rtc.base.RCRTCVideoEventCode; import cn.rongcloud.rtc.base.RTCErrorCode; import cn.rongcloud.rtc.core.CameraVideoCapturer; import cn.rongcloud.rtc.core.RendererCommon; @@ -123,6 +125,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX private ImageView avatarOther; private LinearLayout goto_room_view; private boolean isPk = false; + private boolean isNeedOpenCamera = false; //修改上面主播的头像 @Subscribe(threadMode = ThreadMode.MAIN) @@ -175,7 +178,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX @Override public void onFailed(RTCErrorCode rtcErrorCode) { - Log.e("ry", "远端失败" + list.size()); + Log.e("ry", "远端失败" + list.size() + "|errorCode:" + rtcErrorCode.toString()); ToastUtil.show(mContext.getString(R.string.live_pk_link_error)); } }); @@ -495,10 +498,10 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX btn_close.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - DialogUitl.showSimpleDialog(mContext,WordUtil.isNewZh()? "是否要斷開連麥?":"Do you want to disconnect Link?", new DialogUitl.SimpleCallback() { + DialogUitl.showSimpleDialog(mContext, WordUtil.isNewZh() ? "是否要斷開連麥?" : "Do you want to disconnect Link?", new DialogUitl.SimpleCallback() { @Override public void onConfirmClick(Dialog dialog, String content) { - Log.i("PK----->", "updateSub: "+isPk+"|"); + Log.i("PK----->", "updateSub: " + isPk + "|"); aheadOfScheduleEndPK(mPkUid, CommonAppConfig.getInstance().getUserBean().getUserNiceName(), (String) tv_avatarOther_name.getTag()); //断开连麦 LiveRyAnchorActivity.isDRPK = 0; @@ -695,10 +698,34 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX //设置摄像头最大缩放比例 boolean zoom = RCRTCEngine.getInstance().getDefaultVideoStream().setCameraZoomFactor(1.0f); // ToastUtil.show("设置比例="+zoom); + Log.i("摄像头", "onSuccess: 打开摄像头"); + isNeedOpenCamera = false; } @Override public void onFailed(RTCErrorCode errorCode) { + Log.i("摄像头", "onFailed: 打开摄像头失败 " + errorCode); + } + }); + RCRTCEngine.getInstance().registerEventListener(new IRCRTCEngineEventListener() { + @Override + public void onKicked(String roomId, RCRTCParamsType.RCRTCKickedReason kickedReason) { + + } + + @Override + public void onError(RTCErrorCode errorCode) { + super.onError(errorCode); + Log.i("摄像头", "onError: 错误码" + errorCode); + } + + @Override + public void onLocalVideoEventNotify(RCRTCVideoEventCode event) { + super.onLocalVideoEventNotify(event); + Log.i("摄像头", "onLocalVideoEventNotify: 本地视频事件" + event.code); + if (event == RCRTCVideoEventCode.END_CAMERA_ERROR_UNKNOWN) { + isNeedOpenCamera = true; + } } }); //设置摄像头最大缩放比例 @@ -918,6 +945,24 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX @Override public void onResume() { mPaused = false; + Log.i("摄像头", "onResume: " + isNeedOpenCamera); + if(isNeedOpenCamera){ + RCRTCEngine.getInstance().getDefaultVideoStream().startCamera(new IRCRTCResultDataCallback() { + @Override + public void onSuccess(Boolean data) { + //设置摄像头最大缩放比例 + boolean zoom = RCRTCEngine.getInstance().getDefaultVideoStream().setCameraZoomFactor(1.0f); + // ToastUtil.show("设置比例="+zoom); + Log.i("摄像头", "onSuccess: 打开摄像头"); + isNeedOpenCamera = false; + } + + @Override + public void onFailed(RTCErrorCode errorCode) { + Log.i("摄像头", "onFailed: 打开摄像头失败 " + errorCode); + } + }); + } } @Override @@ -1057,6 +1102,6 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX } else if (event.getType() == LIVE_PK_ING) { isPk = true; } - Log.i("PK----->", "updateSub: "+isPk+"|"+event.getType()); + Log.i("PK----->", "updateSub: " + isPk + "|" + event.getType()); } } diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index eb35482d8..e1320c7e6 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -2341,11 +2341,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } if (Integer.parseInt(bean.getRedVal()) > 2) { mRedVal.setVisibility(View.VISIBLE); - mRedVal.setText(bean.getRedVal() + "連勝"); + mRedVal.setText(bean.getRedVal() + (WordUtil.isNewZh()?"連勝":"Win")); } if (Integer.parseInt(bean.getBlueVal()) > 2) { mBlueVal.setVisibility(View.VISIBLE); - mBlueVal.setText(bean.getBlueVal() + "連勝"); + mBlueVal.setText(bean.getBlueVal() + (WordUtil.isNewZh()?"連勝":"Win")); } mPkRankTopIcon.setVisibility(View.VISIBLE); ImgLoader.display(mContext, bean.getPkTopImgUrl(), mPkRankTopIcon); From 20ccb37ccfadc25e519ffe0a3b1a496d3500a020 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Wed, 27 Sep 2023 09:34:07 +0800 Subject: [PATCH 19/19] udpate --- common/src/main/java/com/yunbao/common/utils/LogUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/utils/LogUtil.java b/common/src/main/java/com/yunbao/common/utils/LogUtil.java index d3503a34d..b5deb1c93 100644 --- a/common/src/main/java/com/yunbao/common/utils/LogUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/LogUtil.java @@ -158,7 +158,7 @@ public class LogUtil { public static void shareFile(Context context) { - /* try { + try { IMLoginModel bean = IMLoginManager.get(context).getUserInfo(); boolean isAnchor=false; if(bean!=null){ @@ -170,7 +170,7 @@ public class LogUtil { } } catch (Exception e) { return; - }*/ + } /* if (PermissionChecker.checkCallingOrSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PERMISSION_GRANTED) { ActivityCompat.requestPermissions((Activity) context, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 100); return;