From 5895fa8d717d4705b1f9c16eebe174d657d12589 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 7 Dec 2023 17:38:38 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/config.gradle b/config.gradle index 9b4d6997d..cfcab1fdf 100644 --- a/config.gradle +++ b/config.gradle @@ -19,13 +19,12 @@ ext { baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB", baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S", -// true表示谷歌支付 false - isGooglePlay : false, + // true表示谷歌支付 false 0 链接包 1 谷歌包 2华为包 - isGooglePlay : 1, + isGooglePlay : 0, //是否上报异常日志 - isUploadLog : true, + isUploadLog : true, //是否打包成插件包模式 - isPluginModel : true, + isPluginModel : true, ] } From 53e6cb5a7017fe78ee1267c60bbee45dcac11964 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 7 Dec 2023 18:01:48 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=9B=B4=E5=A4=9A=E6=9D=A1=E4=BB=B6=E6=8E=A7?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yunbao/common/manager/OpenAdManager.java | 1 + .../main/java/com/yunbao/main/activity/MainActivity.java | 2 +- .../java/com/yunbao/main/views/MainHomeLiveViewHolder.java | 2 ++ .../main/java/com/yunbao/main/views/MainHomeViewHolder.java | 6 ++++++ 4 files changed, 10 insertions(+), 1 deletion(-) 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 19e366823..6856890dd 100644 --- a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java +++ b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java @@ -183,6 +183,7 @@ public class OpenAdManager { if (model.getShowModel() == OpenAdModel.SHOW_DIY) { String nextTime= String.valueOf(System.currentTimeMillis() + (Long.parseLong(model.getSection()) * 60 * 1000)); SpUtil.setStringValue("open_ad_popup_time_" + model.getId(), nextTime); + showMap.remove(model.getId()); } if (model.getModel() == OpenAdModel.MODEL_BOTTOM) { new OpenAdBottomDialogPopup(CommonAppContext.getTopActivity(), model).setListener((bean, position) -> { 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 e5f1dd1c1..e9c2814d8 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -511,6 +511,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene findViewById(R.id.banner_click).setVisibility(View.GONE); isfloatBannernet = false; } + mViewHolders[index].onResume(); }); //获取指导员账号 ConversationIMListManager.get(this).getUserInstructor(this); @@ -860,7 +861,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene NoviceInstructorManager.get(mContext).getNoviceInstructor(); NoviceInstructorManager.get(mContext).checktHomeZdyPop(); initAnchorRecommendBanner(); - OpenAdManager.getInstance().show(OpenAdManager.TYPE_HOME, false); } /** diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java index 65e2d8cf4..14fa4c79d 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java @@ -46,6 +46,7 @@ import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.manager.LiveClassManager; +import com.yunbao.common.manager.OpenAdManager; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.LiveRoomCheckLivePresenter; import com.yunbao.common.utils.MicStatusManager; @@ -557,6 +558,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement @Override public void onResume() { super.onResume(); + OpenAdManager.getInstance().show(OpenAdManager.TYPE_HOME, false); } @Override diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java index fc440dcad..9302f4762 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java @@ -104,6 +104,12 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder { } } + @Override + public void onResume() { + super.onResume(); + mViewHolders[mViewPager.getCurrentItem()].onResume(); + } + @Override protected int getPageCount() { return 4; From d0b7b065b245d0da71c77d27023cc2431ac040f3 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 7 Dec 2023 18:18:27 +0800 Subject: [PATCH 03/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 6 +++--- live/src/main/res/layout/item_live_parcel.xml | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config.gradle b/config.gradle index cfcab1fdf..9cee3cf51 100644 --- a/config.gradle +++ b/config.gradle @@ -4,7 +4,7 @@ ext { buildToolsVersion: "29.0.2", minSdkVersion : 21, targetSdkVersion : 33, - versionCode : 458, + versionCode : 459, versionName : "6.6.3" ] manifestPlaceholders = [ @@ -21,10 +21,10 @@ ext { baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S", // true表示谷歌支付 false 0 链接包 1 谷歌包 2华为包 - isGooglePlay : 0, + isGooglePlay : 1, //是否上报异常日志 isUploadLog : true, //是否打包成插件包模式 - isPluginModel : true, + isPluginModel : false, ] } diff --git a/live/src/main/res/layout/item_live_parcel.xml b/live/src/main/res/layout/item_live_parcel.xml index 9caae1385..84f13341f 100644 --- a/live/src/main/res/layout/item_live_parcel.xml +++ b/live/src/main/res/layout/item_live_parcel.xml @@ -63,8 +63,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="1dp" + android:singleLine="true" android:textColor="@color/white" - android:textSize="11sp" /> + android:textSize="9sp" /> Date: Fri, 8 Dec 2023 14:17:36 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=A4=E6=96=AD=20?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E6=9C=89google=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/utils/GoogleUtils.java | 13 +++++++++++++ .../shayu/lib_google/utils/GoogleBillingManage.java | 9 ++++++--- .../com/yunbao/main/activity/GoogleFragment.java | 8 +++----- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/utils/GoogleUtils.java b/common/src/main/java/com/yunbao/common/utils/GoogleUtils.java index d1e89d8a7..f47191f74 100644 --- a/common/src/main/java/com/yunbao/common/utils/GoogleUtils.java +++ b/common/src/main/java/com/yunbao/common/utils/GoogleUtils.java @@ -174,6 +174,19 @@ public class GoogleUtils { } } + public boolean getGoogleService() { + boolean flag; + try { + Class clz = mActivity.getClassLoader().loadClass("com.shayu.lib_google.utils.GoogleBillingManage"); + googlePay = clz.getConstructor(Activity.class).newInstance(mActivity); + flag = (boolean) googlePay.getClass().getMethod("getGoogleService").invoke(googlePay); + } catch (Exception e) { + throw new RuntimeException(e); + } + return flag; + } + + public void setFirebaseTokenListener(Activity activity, FirebaseTokenListener firebaseTokenListener) { Timer timer = new Timer(); TimerTask task = new TimerTask() { diff --git a/lib_google/src/main/java/com/shayu/lib_google/utils/GoogleBillingManage.java b/lib_google/src/main/java/com/shayu/lib_google/utils/GoogleBillingManage.java index dfd43d032..ed6c73a2b 100644 --- a/lib_google/src/main/java/com/shayu/lib_google/utils/GoogleBillingManage.java +++ b/lib_google/src/main/java/com/shayu/lib_google/utils/GoogleBillingManage.java @@ -20,6 +20,7 @@ import com.android.billingclient.api.SkuDetails; import com.android.billingclient.api.SkuDetailsParams; import com.android.billingclient.api.SkuDetailsResponseListener; import com.google.android.gms.ads.identifier.AdvertisingIdClient; +import com.google.android.gms.common.GoogleApiAvailability; import com.google.android.gms.common.GooglePlayServicesNotAvailableException; import com.google.android.gms.common.GooglePlayServicesRepairableException; @@ -28,11 +29,8 @@ import org.json.JSONException; import org.json.JSONObject; import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; -import java.util.Map; /** * 新写Google内付工具类做简单的封装 @@ -201,6 +199,11 @@ public class GoogleBillingManage implements PurchasesUpdatedListener { } } + public boolean getGoogleService() { + int code = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mContext); + return code == 0; + } + int resultCode = -1; String resultToken = ""; String resultOrderId = ""; diff --git a/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java b/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java index 9b03293ea..877896605 100644 --- a/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java +++ b/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java @@ -17,8 +17,6 @@ import android.webkit.WebView; import androidx.fragment.app.Fragment; import com.facebook.appevents.AppEventsConstants; -import com.google.android.gms.common.ConnectionResult; -import com.google.android.gms.common.GoogleApiAvailability; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.utils.GoogleUtils; @@ -47,7 +45,6 @@ public class GoogleFragment extends Fragment { public GoogleFragment() { } - @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { //通过参数中的布局填充获取对应布局 @@ -64,9 +61,10 @@ public class GoogleFragment extends Fragment { Log.e("ttt", url); rlWebview.loadUrl(url); + googleUtils = new GoogleUtils(getActivity()); + // 验证是否已在此设备上安装并启用Google Play服务,以及此设备上安装的旧版本是否为此客户端所需的版本 - int code = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(getActivity()); - if (code == ConnectionResult.SUCCESS) { + if (googleUtils.getGoogleService()) { isGoogleService = true; // 支持Google服务 initGooglePay(); From 331b55a5ab7873f5ddb4d82ebf48a32fd9a39523 Mon Sep 17 00:00:00 2001 From: hch <16607480311@163.com> Date: Fri, 8 Dec 2023 15:32:18 +0800 Subject: [PATCH 05/16] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=88=B0=E5=8D=8E=E4=B8=BA=E5=95=86=E5=BA=97=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/views/APKUpdateCustomPopup.java | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/views/APKUpdateCustomPopup.java b/common/src/main/java/com/yunbao/common/views/APKUpdateCustomPopup.java index 35d8a444c..b433c3957 100644 --- a/common/src/main/java/com/yunbao/common/views/APKUpdateCustomPopup.java +++ b/common/src/main/java/com/yunbao/common/views/APKUpdateCustomPopup.java @@ -3,6 +3,7 @@ package com.yunbao.common.views; import android.app.Activity; import android.content.Context; import android.content.Intent; +import android.content.pm.PackageManager; import android.net.Uri; import android.os.Build; import android.os.Handler; @@ -114,7 +115,7 @@ public class APKUpdateCustomPopup extends CenterPopupView { } else if (CommonAppConfig.IS_GOOGLE_PLAY == 2) { //华为 //todo - launchAppDetail(mContext, "com.pdlive.shayu", "com.pdlive.shayu"); + launchAppDetail(mContext, "com.pdlive.shayu", "com.huawei.appmarket"); } else { versionImmediateUse.setVisibility(GONE); updateLine.setVisibility(VISIBLE); @@ -129,19 +130,31 @@ public class APKUpdateCustomPopup extends CenterPopupView { }); } + public static boolean isAppStoreExist(Context context) { + try { + PackageManager packageManager = context.getPackageManager(); + packageManager.getPackageInfo("com.huawei.appmarket", PackageManager.GET_ACTIVITIES); + return true; + } catch (PackageManager.NameNotFoundException e) { + return false; + } + } + + public static void launchAppDetail(Context mContext, String appPkg, String marketPkg) { try { if (TextUtils.isEmpty(appPkg)) { return; } - - Uri uri = Uri.parse("market://details?id=" + appPkg); - Intent intent = new Intent(Intent.ACTION_VIEW, uri); - if (!TextUtils.isEmpty(marketPkg)) { - intent.setPackage(marketPkg); + if (isAppStoreExist(mContext)) { + Uri uri = Uri.parse("appmarket://details?id=" + appPkg); + Intent intent = new Intent(Intent.ACTION_VIEW, uri); + if (!TextUtils.isEmpty(marketPkg)) { + intent.setPackage(marketPkg); + } + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + mContext.startActivity(intent); } - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - mContext.startActivity(intent); } catch (Exception e) { e.printStackTrace(); } From ecca9b7b8b21deb6ada060e2d3937fca3a193498 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 12 Dec 2023 10:51:30 +0800 Subject: [PATCH 06/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/common/bean/CoolConfig.java | 14 +++- .../dialog/CinemaTicketPopupWindow.java | 77 +++++++++++++----- .../main/res/layout/cinema_ticket_popup.xml | 24 +++++- common/src/main/res/values-en-rUS/string.xml | 2 +- common/src/main/res/values-zh-rHK/strings.xml | 8 +- common/src/main/res/values-zh-rTW/strings.xml | 10 +-- common/src/main/res/values-zh/strings.xml | 8 +- common/src/main/res/values/strings.xml | 2 +- config.gradle | 8 +- .../views/MainHomeCommunityViewHolder.java | 1 + .../main/views/MainMessageViewHolder.java | 79 ++++++++++++++++--- .../src/main/res/layout/view_main_message.xml | 16 ++-- 12 files changed, 186 insertions(+), 63 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/bean/CoolConfig.java b/common/src/main/java/com/yunbao/common/bean/CoolConfig.java index 689e6972a..175e49804 100644 --- a/common/src/main/java/com/yunbao/common/bean/CoolConfig.java +++ b/common/src/main/java/com/yunbao/common/bean/CoolConfig.java @@ -1,8 +1,18 @@ package com.yunbao.common.bean; public class CoolConfig extends BaseModel { - private int rate=1; - private String ticketCount="0" ; + private int rate = 1; + private String ticketCount = "0"; + private String yuanbao = "0"; + + public String getYuanbao() { + return yuanbao; + } + + public CoolConfig setYuanbao(String yuanbao) { + this.yuanbao = yuanbao; + return this; + } public String getTicketCount() { return ticketCount; diff --git a/common/src/main/java/com/yunbao/common/dialog/CinemaTicketPopupWindow.java b/common/src/main/java/com/yunbao/common/dialog/CinemaTicketPopupWindow.java index 010bf189a..9f00807f9 100644 --- a/common/src/main/java/com/yunbao/common/dialog/CinemaTicketPopupWindow.java +++ b/common/src/main/java/com/yunbao/common/dialog/CinemaTicketPopupWindow.java @@ -1,7 +1,14 @@ package com.yunbao.common.dialog; +import static android.content.Context.INPUT_METHOD_SERVICE; + import android.content.Context; +import android.text.Editable; +import android.text.TextUtils; +import android.text.TextWatcher; import android.view.View; +import android.view.inputmethod.InputMethodManager; +import android.widget.EditText; import android.widget.TextView; import androidx.annotation.NonNull; @@ -12,13 +19,15 @@ import com.yunbao.common.bean.CoolConfig; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; import java.math.BigDecimal; public class CinemaTicketPopupWindow extends CenterPopupView { private CoolConfig mCoolConfig; - private TextView cinemaTicket, ticketsPlusMinus, quantityNeed; + private TextView cinemaTicket, quantityNeed, quantityNeed2; + private EditText ticketsPlusMinus; private int ticket = 1; private CinemaTicketPopupWindowCallBack mCinemaTicketPopupWindowCallBack; @@ -41,9 +50,30 @@ public class CinemaTicketPopupWindow extends CenterPopupView { cinemaTicket = findViewById(R.id.cinema_ticket); ticketsPlusMinus = findViewById(R.id.tickets_plus_minus); quantityNeed = findViewById(R.id.quantity_need); - cinemaTicket.setText(new BigDecimal(ticket).add(new BigDecimal(mCoolConfig.getTicketCount())).toString()); + quantityNeed2 = findViewById(R.id.quantity_need2); + cinemaTicket.setText(mCoolConfig.getTicketCount()); ticketsPlusMinus.setText(String.valueOf(ticket)); - quantityNeed.setText(new BigDecimal(ticket).multiply(new BigDecimal(mCoolConfig.getRate())).toString()); + quantityNeed2.setText(new BigDecimal(ticket).multiply(new BigDecimal(mCoolConfig.getRate())).floatValue()+""); + quantityNeed.setText(mCoolConfig.getYuanbao()); + ticketsPlusMinus.addTextChangedListener(new TextWatcher() { + @Override + public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { + + } + + @Override + public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { + if (!TextUtils.isEmpty(charSequence.toString())) { + ticket = new BigDecimal(charSequence.toString()).intValue(); + quantityNeed2.setText(new BigDecimal(ticket).multiply(new BigDecimal(mCoolConfig.getRate())).floatValue()+""); + } + } + + @Override + public void afterTextChanged(Editable editable) { + + } + }); ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.cinema_ticket_close), new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { @@ -56,9 +86,8 @@ public class CinemaTicketPopupWindow extends CenterPopupView { if (ticket > 1) { ticket = ticket - 1; - cinemaTicket.setText(new BigDecimal(ticket).add(new BigDecimal(mCoolConfig.getTicketCount())).toString()); ticketsPlusMinus.setText(String.valueOf(ticket)); - quantityNeed.setText(new BigDecimal(ticket).multiply(new BigDecimal(mCoolConfig.getRate())).toString()); + quantityNeed2.setText(new BigDecimal(ticket).multiply(new BigDecimal(mCoolConfig.getRate())).floatValue()+""); } } }); @@ -66,33 +95,41 @@ public class CinemaTicketPopupWindow extends CenterPopupView { @Override public void onClick(View view) { ticket = ticket + 1; - cinemaTicket.setText(new BigDecimal(ticket).add(new BigDecimal(mCoolConfig.getTicketCount())).toString()); ticketsPlusMinus.setText(String.valueOf(ticket)); - quantityNeed.setText(new BigDecimal(ticket).multiply(new BigDecimal(mCoolConfig.getRate())).toString()); + quantityNeed2.setText(new BigDecimal(ticket).multiply(new BigDecimal(mCoolConfig.getRate())).floatValue()+""); } }); ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.cinema_ticket_exchange), new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - LiveNetManager.get(getContext()) - .buyTicket(String.valueOf(ticket), new HttpCallback() { - @Override - public void onSuccess(String data) { + if (ticket>=1&&ticket<=9999){ + LiveNetManager.get(getContext()) + .buyTicket(String.valueOf(ticket), new HttpCallback() { + @Override + public void onSuccess(String data) { + ToastUtil.show(WordUtil.isNewZh() ? "兑换成功" : "Successful exchange"); + if (mCinemaTicketPopupWindowCallBack != null) { + mCinemaTicketPopupWindowCallBack.onCallBack(data); + } + dialog.dismiss(); - if (mCinemaTicketPopupWindowCallBack != null) { - mCinemaTicketPopupWindowCallBack.onCallBack(data); } - dialog.dismiss(); - } - @Override - public void onError(String error) { - ToastUtil.show(error); - } - }); + @Override + public void onError(String error) { + ToastUtil.show(error); + } + }); + }else { + ToastUtil.show(WordUtil.isNewZh() ? "兌換數量區間為[1 - 9999]" : "The exchange quantity range is [1-9999]"); + } + InputMethodManager inputMethodManager = (InputMethodManager)ticketsPlusMinus.getContext().getSystemService(INPUT_METHOD_SERVICE); + inputMethodManager.hideSoftInputFromWindow(ticketsPlusMinus.getWindowToken(), 0); } }); + InputMethodManager inputMethodManager = (InputMethodManager)ticketsPlusMinus.getContext().getSystemService(INPUT_METHOD_SERVICE); + inputMethodManager.hideSoftInputFromWindow(ticketsPlusMinus.getWindowToken(), 0); } public interface CinemaTicketPopupWindowCallBack { diff --git a/common/src/main/res/layout/cinema_ticket_popup.xml b/common/src/main/res/layout/cinema_ticket_popup.xml index 58778fa45..f6fc7096e 100644 --- a/common/src/main/res/layout/cinema_ticket_popup.xml +++ b/common/src/main/res/layout/cinema_ticket_popup.xml @@ -32,6 +32,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="0" + android:inputType="number" android:textColor="#DFEAFF" android:textSize="15sp" /> @@ -68,12 +69,14 @@ android:layout_height="match_parent" android:layout_weight="1" /> - + + + + + - + Above 500 coins combo X Exchange quantity: - Need %s + Balance %s Exchange&Usage Rules: 1.One star coin can be exchanged for one ticket. You can customize the exchange quantity according to your needs. Once the ticket is exchanged, it cannot be revoked. Please confirm in advance; 2.One ticket can be used to watch one episode of a short drama. After successful redemption, you can return to the viewing page and use the ticket to continue watching the movie; diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index 20f17754b..3e8b1cfdd 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1385,9 +1385,9 @@ 500以上星幣 連擊× 兌換數量: - 需要 %s + 余额 %s 兌換&使用規則: - 1.1星幣兌換1張觀影券,您可以根據需求自定義兌換數量,觀影券一經兌換不可撤銷,請提前確認; - 2.1張觀影券可觀看一集短劇,兌換成功後即可返回觀影頁面,使用觀影券繼續觀看影片; - 3.觀影券禁止線下交易、收購等不正當行為,PDLIVE將對各類以盈利為目的的交易行為進行嚴厲打擊。 + 一、星幣兌換1張觀影券,您可以根據需求自定義兌換數量,觀影券一經兌換不可撤銷,請提前確認; + 二、1張觀影券可觀看一集短劇,兌換成功後即可返回觀影頁面,使用觀影券繼續觀看影片; + 三、觀影券禁止線下交易、收購等不正當行為,PDLIVE將對各類以盈利為目的的交易行為進行嚴厲打擊。 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index f14c42b6d..f7b12dd83 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1159,7 +1159,7 @@ 投票中 - %s
問答框%s秒后消失
+ %s
問答框%s秒后消失
請完整填寫 填寫“*”的選項可完成 真愛粉\n頭像框(7天) @@ -1384,9 +1384,9 @@ 500以上星幣 連擊× 兌換數量: - 需要 %s + 余额 %s 兌換&使用規則: - 1.1星幣兌換1張觀影券,您可以根據需求自定義兌換數量,觀影券一經兌換不可撤銷,請提前確認; - 2.1張觀影券可觀看一集短劇,兌換成功後即可返回觀影頁面,使用觀影券繼續觀看影片; - 3.觀影券禁止線下交易、收購等不正當行為,PDLIVE將對各類以盈利為目的的交易行為進行嚴厲打擊。 + 一、星幣兌換1張觀影券,您可以根據需求自定義兌換數量,觀影券一經兌換不可撤銷,請提前確認; + 二、1張觀影券可觀看一集短劇,兌換成功後即可返回觀影頁面,使用觀影券繼續觀看影片; + 三、觀影券禁止線下交易、收購等不正當行為,PDLIVE將對各類以盈利為目的的交易行為進行嚴厲打擊。 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 68ced0bf7..a08bf972b 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1384,10 +1384,10 @@ 500以上星幣 連擊× 兌換數量: - 需要 %s + 余额 %s 兌換&使用規則: - 1.1星幣兌換1張觀影券,您可以根據需求自定義兌換數量,觀影券一經兌換不可撤銷,請提前確認; - 2.1張觀影券可觀看一集短劇,兌換成功後即可返回觀影頁面,使用觀影券繼續觀看影片; - 3.觀影券禁止線下交易、收購等不正當行為,PDLIVE將對各類以盈利為目的的交易行為進行嚴厲打擊。 + 一、星幣兌換1張觀影券,您可以根據需求自定義兌換數量,觀影券一經兌換不可撤銷,請提前確認; + 二、1張觀影券可觀看一集短劇,兌換成功後即可返回觀影頁面,使用觀影券繼續觀看影片; + 三、觀影券禁止線下交易、收購等不正當行為,PDLIVE將對各類以盈利為目的的交易行為進行嚴厲打擊。 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index b8c3434d1..21579cb64 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1391,7 +1391,7 @@ Limited ride And limited avatar frame Above 500 coins combo X Exchange quantity: - Need %s + Balance %s Exchange&Usage Rules: 1.One star coin can be exchanged for one ticket. You can customize the exchange quantity according to your needs. Once the ticket is exchanged, it cannot be revoked. Please confirm in advance; 2.One ticket can be used to watch one episode of a short drama. After successful redemption, you can return to the viewing page and use the ticket to continue watching the movie; diff --git a/config.gradle b/config.gradle index 9cee3cf51..c9e395940 100644 --- a/config.gradle +++ b/config.gradle @@ -9,9 +9,9 @@ ext { ] manifestPlaceholders = [ //正式、 - serverHost : "https://napi.yaoulive.com", +// serverHost : "https://napi.yaoulive.com", // 测试 - //serverHost : " https://ceshi.yaoulive.com", + serverHost : " https://ceshi.yaoulive.com", //百度语音识别 @@ -21,10 +21,10 @@ ext { baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S", // true表示谷歌支付 false 0 链接包 1 谷歌包 2华为包 - isGooglePlay : 1, + isGooglePlay : 0, //是否上报异常日志 isUploadLog : true, //是否打包成插件包模式 - isPluginModel : false, + isPluginModel : true, ] } diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java index d9c58e538..ba277a886 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java @@ -399,6 +399,7 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl public void onSuccess(CoolConfig data) { new XPopup.Builder(mContext) .enableDrag(false) + .autoOpenSoftInput(false) .maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34)) .asCustom(new CinemaTicketPopupWindow(mContext, data.setTicketCount(event.getCoolConfig().getTicketCount()), new CinemaTicketPopupWindow.CinemaTicketPopupWindowCallBack() { @Override diff --git a/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java index 2dbebab5f..f71385345 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java @@ -5,6 +5,7 @@ import android.content.Intent; import android.os.Handler; import android.text.TextUtils; import android.util.Log; +import android.util.TypedValue; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; @@ -29,10 +30,12 @@ import com.yunbao.common.bean.ImUserInfoModel; import com.yunbao.common.bean.LiveBean; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.NoviceInstructorManager; import com.yunbao.common.manager.imrongcloud.MessageIMManager; import com.yunbao.common.utils.DeviceUtils; +import com.yunbao.common.utils.LiveRoomCheckLivePresenter; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.SVGAViewUtils; import com.yunbao.common.views.AbsMainViewHolder; @@ -41,8 +44,6 @@ import com.yunbao.live.activity.SystemMessageActivity; import com.yunbao.live.bean.ImUserBean; import com.yunbao.live.event.RecommendLiveRoomEvent; import com.yunbao.live.http.ImHttpUtil; -import com.yunbao.common.http.LiveHttpUtil; -import com.yunbao.common.utils.LiveRoomCheckLivePresenter; import com.yunbao.main.R; import com.yunbao.main.activity.MainActivity; import com.yunbao.main.adapter.SystemMessageAdapter; @@ -229,7 +230,15 @@ public class MainMessageViewHolder extends AbsMainViewHolder { textNewsNotice.setVisibility(View.GONE); } else { textNewsNotice.setVisibility(View.VISIBLE); - textNewsNotice.setText(userBean.getNum()); + int numberInt = Integer.parseInt(userBean.getNum()); + if (numberInt > 99) { + textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9); + textNewsNotice.setText("99+"); + } else { + textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); + textNewsNotice.setText(String.valueOf(numberInt)); + } + } ImgLoader.display(mContext, userBean.getNewImage(), imgNewsNotice); ViewClicksAntiShake.clicksAntiShake(imgNewsNotice, () -> { @@ -249,7 +258,14 @@ public class MainMessageViewHolder extends AbsMainViewHolder { textNewsInteraction.setVisibility(View.GONE); } else { textNewsInteraction.setVisibility(View.VISIBLE); - textNewsInteraction.setText(userBean.getNum()); + int numberInt = Integer.parseInt(userBean.getNum()); + if (numberInt > 99) { + textNewsInteraction.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9); + textNewsInteraction.setText("99+"); + } else { + textNewsInteraction.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); + textNewsInteraction.setText(String.valueOf(numberInt)); + } } ImgLoader.display(mContext, userBean.getNewImage(), imgNewsInteraction); ViewClicksAntiShake.clicksAntiShake(imgNewsInteraction, () -> { @@ -269,7 +285,14 @@ public class MainMessageViewHolder extends AbsMainViewHolder { textNewsOnline.setVisibility(View.GONE); } else { textNewsOnline.setVisibility(View.VISIBLE); - textNewsOnline.setText(userBean.getNum()); + int numberInt = Integer.parseInt(userBean.getNum()); + if (numberInt > 99) { + textNewsOnline.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9); + textNewsOnline.setText("99+"); + } else { + textNewsOnline.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); + textNewsOnline.setText(String.valueOf(numberInt)); + } } ImgLoader.display(mContext, userBean.getNewImage(), imgNewsOnline); ViewClicksAntiShake.clicksAntiShake(imgNewsOnline, () -> { @@ -278,7 +301,7 @@ public class MainMessageViewHolder extends AbsMainViewHolder { netHandler.post(systemNumberRunnable); AppEventsLogger.newLogger(mContext).logEvent("FB_customer_service"); if (userBean.getLink() != null && !"".equals(userBean.getLink())) { - // WebViewActivity.forward(mContext, userBean.getLink()); + // WebViewActivity.forward(mContext, userBean.getLink()); RouteUtil.forwardCustomerService(userBean.getLink()); } else { mContext.startActivity(new Intent(mContext, SystemMessageActivity.class) @@ -295,7 +318,14 @@ public class MainMessageViewHolder extends AbsMainViewHolder { textSystemMessages.setVisibility(View.GONE); } else { textSystemMessages.setVisibility(View.VISIBLE); - textSystemMessages.setText(userBean.getNum()); + int numberInt = Integer.parseInt(userBean.getNum()); + if (numberInt > 99) { + textSystemMessages.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9); + textSystemMessages.setText("99+"); + } else { + textSystemMessages.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); + textSystemMessages.setText(String.valueOf(numberInt)); + } } ImgLoader.display(mContext, userBean.getNewImage(), imgSystemMessages); ViewClicksAntiShake.clicksAntiShake(imgSystemMessages, () -> { @@ -402,9 +432,16 @@ public class MainMessageViewHolder extends AbsMainViewHolder { textNewsNotice.setText(""); } else { String number = textNewsNotice.getText().toString().trim(); - int numberInt = Integer.parseInt(number) + 1; textNewsNotice.setVisibility(View.VISIBLE); - textNewsNotice.setText(String.valueOf(numberInt)); + int numberInt = Integer.parseInt(number) + 1; + if (numberInt > 99) { + textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9); + textNewsNotice.setText("99+"); + } else { + textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); + textNewsNotice.setText(String.valueOf(numberInt)); + } + } break; @@ -417,7 +454,13 @@ public class MainMessageViewHolder extends AbsMainViewHolder { String number = textNewsInteraction.getText().toString().trim(); int numberInt = Integer.parseInt(number) + 1; textNewsInteraction.setVisibility(View.VISIBLE); - textNewsInteraction.setText(String.valueOf(numberInt)); + if (numberInt > 99) { + textNewsInteraction.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9); + textNewsInteraction.setText("99+"); + } else { + textNewsInteraction.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); + textNewsInteraction.setText(String.valueOf(numberInt)); + } } @@ -431,7 +474,13 @@ public class MainMessageViewHolder extends AbsMainViewHolder { String number = textNewsOnline.getText().toString().trim(); int numberInt = Integer.parseInt(number) + 1; textNewsOnline.setVisibility(View.VISIBLE); - textNewsOnline.setText(String.valueOf(numberInt)); + if (numberInt > 99) { + textNewsOnline.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9); + textNewsOnline.setText("99+"); + } else { + textNewsOnline.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); + textNewsOnline.setText(String.valueOf(numberInt)); + } } break; //在線客服 case "4": @@ -442,7 +491,13 @@ public class MainMessageViewHolder extends AbsMainViewHolder { String number = textSystemMessages.getText().toString().trim(); int numberInt = Integer.parseInt(number) + 1; textSystemMessages.setVisibility(View.VISIBLE); - textSystemMessages.setText(String.valueOf(numberInt)); + if (numberInt > 99) { + textSystemMessages.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9); + textSystemMessages.setText("99+"); + } else { + textSystemMessages.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); + textSystemMessages.setText(String.valueOf(numberInt)); + } } break; } diff --git a/main/src/main/res/layout/view_main_message.xml b/main/src/main/res/layout/view_main_message.xml index c7650df8c..a783924f1 100644 --- a/main/src/main/res/layout/view_main_message.xml +++ b/main/src/main/res/layout/view_main_message.xml @@ -52,8 +52,8 @@ Date: Tue, 12 Dec 2023 14:39:07 +0800 Subject: [PATCH 07/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=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/dialog/CinemaTicketPopupWindow.java | 2 +- .../java/com/yunbao/main/views/MainHomeCommunityViewHolder.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/yunbao/common/dialog/CinemaTicketPopupWindow.java b/common/src/main/java/com/yunbao/common/dialog/CinemaTicketPopupWindow.java index 9f00807f9..6054d8f4b 100644 --- a/common/src/main/java/com/yunbao/common/dialog/CinemaTicketPopupWindow.java +++ b/common/src/main/java/com/yunbao/common/dialog/CinemaTicketPopupWindow.java @@ -107,7 +107,7 @@ public class CinemaTicketPopupWindow extends CenterPopupView { .buyTicket(String.valueOf(ticket), new HttpCallback() { @Override public void onSuccess(String data) { - ToastUtil.show(WordUtil.isNewZh() ? "兑换成功" : "Successful exchange"); + if (mCinemaTicketPopupWindowCallBack != null) { mCinemaTicketPopupWindowCallBack.onCallBack(data); diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java index ba277a886..f7875f41a 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java @@ -55,6 +55,7 @@ import com.yunbao.common.utils.L; import com.yunbao.common.utils.LiveRoomCheckLivePresenter; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.live.views.LoadingView; import com.yunbao.main.R; import com.yunbao.main.activity.MainActivity; @@ -418,6 +419,7 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl } }); } else if (TextUtils.equals(data, "1")) { + ToastUtil.show(WordUtil.isNewZh() ? "兑换成功" : "Successful exchange"); mWebView.post(new Runnable() { @Override public void run() { From ddb4e98afd7360e2296e8875ed477107e20af272 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 12 Dec 2023 14:40:48 +0800 Subject: [PATCH 08/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/src/main/res/layout/view_main_encourage.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/res/layout/view_main_encourage.xml b/main/src/main/res/layout/view_main_encourage.xml index d796f713a..5fb57b97e 100644 --- a/main/src/main/res/layout/view_main_encourage.xml +++ b/main/src/main/res/layout/view_main_encourage.xml @@ -8,7 +8,7 @@ android:id="@+id/rootView" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_marginBottom="45dp" + android:layout_marginBottom="71dp" android:orientation="vertical" /> Date: Tue, 12 Dec 2023 15:17:09 +0800 Subject: [PATCH 09/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/src/main/res/layout/view_main_encourage.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/res/layout/view_main_encourage.xml b/main/src/main/res/layout/view_main_encourage.xml index 5fb57b97e..bc84516d9 100644 --- a/main/src/main/res/layout/view_main_encourage.xml +++ b/main/src/main/res/layout/view_main_encourage.xml @@ -8,7 +8,7 @@ android:id="@+id/rootView" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_marginBottom="71dp" + android:layout_marginBottom="68dp" android:orientation="vertical" /> Date: Thu, 14 Dec 2023 15:10:25 +0800 Subject: [PATCH 10/16] =?UTF-8?q?=E9=96=8B=E9=80=9A=E7=B2=BE=E8=8B=B1?= =?UTF-8?q?=E6=88=B0=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/dialog/CinemaTicketPopupWindow.java | 2 ++ 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 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/dialog/CinemaTicketPopupWindow.java b/common/src/main/java/com/yunbao/common/dialog/CinemaTicketPopupWindow.java index 6054d8f4b..d6f2906ab 100644 --- a/common/src/main/java/com/yunbao/common/dialog/CinemaTicketPopupWindow.java +++ b/common/src/main/java/com/yunbao/common/dialog/CinemaTicketPopupWindow.java @@ -14,6 +14,7 @@ import android.widget.TextView; import androidx.annotation.NonNull; import com.lxj.xpopup.core.CenterPopupView; +import com.umeng.analytics.MobclickAgent; import com.yunbao.common.R; import com.yunbao.common.bean.CoolConfig; import com.yunbao.common.http.base.HttpCallback; @@ -126,6 +127,7 @@ public class CinemaTicketPopupWindow extends CenterPopupView { } InputMethodManager inputMethodManager = (InputMethodManager)ticketsPlusMinus.getContext().getSystemService(INPUT_METHOD_SERVICE); inputMethodManager.hideSoftInputFromWindow(ticketsPlusMinus.getWindowToken(), 0); + MobclickAgent.onEvent(getContext(), "dj_exchange", "兑换按钮点"); } }); InputMethodManager inputMethodManager = (InputMethodManager)ticketsPlusMinus.getContext().getSystemService(INPUT_METHOD_SERVICE); diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index 3e8b1cfdd..ed0ab01a7 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1387,7 +1387,7 @@ 兌換數量: 余额 %s 兌換&使用規則: - 一、星幣兌換1張觀影券,您可以根據需求自定義兌換數量,觀影券一經兌換不可撤銷,請提前確認; + 一、1星幣兌換1張觀影券,您可以根據需求自定義兌換數量,觀影券一經兌換不可撤銷,請提前確認; 二、1張觀影券可觀看一集短劇,兌換成功後即可返回觀影頁面,使用觀影券繼續觀看影片; 三、觀影券禁止線下交易、收購等不正當行為,PDLIVE將對各類以盈利為目的的交易行為進行嚴厲打擊。 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index f7b12dd83..852429a24 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1386,7 +1386,7 @@ 兌換數量: 余额 %s 兌換&使用規則: - 一、星幣兌換1張觀影券,您可以根據需求自定義兌換數量,觀影券一經兌換不可撤銷,請提前確認; + 一、1星幣兌換1張觀影券,您可以根據需求自定義兌換數量,觀影券一經兌換不可撤銷,請提前確認; 二、1張觀影券可觀看一集短劇,兌換成功後即可返回觀影頁面,使用觀影券繼續觀看影片; 三、觀影券禁止線下交易、收購等不正當行為,PDLIVE將對各類以盈利為目的的交易行為進行嚴厲打擊。 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index a08bf972b..215f7ae42 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1386,7 +1386,7 @@ 兌換數量: 余额 %s 兌換&使用規則: - 一、星幣兌換1張觀影券,您可以根據需求自定義兌換數量,觀影券一經兌換不可撤銷,請提前確認; + 一、1星幣兌換1張觀影券,您可以根據需求自定義兌換數量,觀影券一經兌換不可撤銷,請提前確認; 二、1張觀影券可觀看一集短劇,兌換成功後即可返回觀影頁面,使用觀影券繼續觀看影片; 三、觀影券禁止線下交易、收購等不正當行為,PDLIVE將對各類以盈利為目的的交易行為進行嚴厲打擊。 From bd9c8c2265eeb206e56527007ef467891c4189f8 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 15 Dec 2023 10:17:47 +0800 Subject: [PATCH 11/16] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E9=97=B4=E9=80=80?= =?UTF-8?q?=E5=87=BA=E6=8E=A5=E5=8F=A3=E6=97=B6=E6=9C=BA=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C=E5=85=8D=E8=B4=B9=E7=A4=BC=E7=89=A9=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/views/LiveRoomViewHolder.java | 11 ++-- .../live/views/PortraitLiveManager.java | 55 ++++++++++--------- 2 files changed, 35 insertions(+), 31 deletions(-) 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 61f54a739..f8f72c04a 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -387,7 +387,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis private FrameLayout pa_pao_layout; private LinearLayout combo_layout; private TextView combo_number; - private View quick_gift_reminder ; + private View quick_gift_reminder; @Subscribe(threadMode = ThreadMode.MAIN) public void onUpdata(String str) { @@ -720,6 +720,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } } } + public void onQuickGifting3() { IMLoginManager.get(mContext).setQuickGiftIfFirst(); quick_gift_reminder.setVisibility(View.GONE); @@ -1565,7 +1566,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis pa_pao_layout = (FrameLayout) findViewById(R.id.pa_pao_layout); combo_layout = (LinearLayout) findViewById(R.id.combo_layout); combo_number = (TextView) findViewById(R.id.combo_number); - quick_gift_reminder = findViewById(R.id.quick_gift_reminder); + quick_gift_reminder = findViewById(R.id.quick_gift_reminder); pa_pao_layout.setVisibility(View.GONE); combo_layout.setVisibility(View.GONE); @@ -2545,7 +2546,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis * @param rank 小时榜 */ public void setHourRankData(long rank) { - if (mHotText != null) { + if (mHotText != null) { if (rank == 0) { mHotText.setText(R.string.no_rank_data); } else { @@ -2574,9 +2575,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } } + public void setHotNum(String hotNum) { setHotData(formatBigNum.formatBigNum(hotNum)); } + /** * 更新心愿单进度 * @@ -4283,7 +4286,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis bean1.setId(Integer.parseInt(giftModel.getId())); bean1.setName(giftModel.getGiftname()); bean1.setTag("1"); - + bean1.setPrice(WordUtil.isNewZh() ? "免费" : "free"); if (!IMLoginManager.get(mContext).isisNewUserOne()) { if (TextUtils.equals(taskModel.getSendgift(), "0")) { IMLoginManager.get(mContext).setNewUserGif(true); 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 703824e77..030057c83 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -56,7 +56,6 @@ import com.yunbao.common.event.LiveFloatEvent; import com.yunbao.common.event.LiveGiftDialogEvent; import com.yunbao.common.event.LiveRoomChangeEvent; import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent; -import com.yunbao.common.event.QuickGiftingEvent; import com.yunbao.common.event.SendBlindGiftEvent; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.CommonHttpConsts; @@ -809,6 +808,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe @Override public void onRemove(boolean isQuit) { + Log.e("直播间接口调用排查","onRemove---------------"); LiveNetManager.get(mContext).cancelLive(); liveHandler.removeCallbacks(sendFIm); linkMicPkStartHandler.removeCallbacks(linkMicPkStartRunnable); @@ -978,7 +978,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe Conversation.ConversationType conversationType = Conversation.ConversationType.PRIVATE; TextMessage messageContent = TextMessage.obtain(msg.mResult.toString()); - io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(liveID, conversationType, messageContent); + io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(liveID, conversationType, messageContent); RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() { @Override @@ -1846,6 +1846,19 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe if (!isEnterRoom) { return; } + LiveNetManager.get(mContext) + .leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback() { + @Override + public void onSuccess(String data) { + Log.e("直播间接口调用排查","leaveRoomNew---------------"); + } + + @Override + public void onError(String error) { + } + }); + leaveStream = ""; + leaveGroupId = ""; if (mLiveBean != null) { isEnterRoom = false; @@ -1854,19 +1867,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe public void onSuccess() { try { Log.i("tx", "退出成功" + mLiveBean.getUid()); - LiveNetManager.get(mContext) - .leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback() { - @Override - public void onSuccess(String data) { - } - - @Override - public void onError(String error) { - } - }); - leaveStream = ""; - leaveGroupId = ""; } catch (Exception e) { e.printStackTrace(); @@ -1878,19 +1879,19 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe public void onError(IRongCoreEnum.CoreErrorCode coreErrorCode) { try { - Log.i("tx", "退出成功" + mLiveBean.getUid()); - LiveNetManager.get(mContext) - .leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback() { - @Override - public void onSuccess(String data) { - } - - @Override - public void onError(String error) { - } - }); - leaveStream = ""; - leaveGroupId = ""; +// Log.i("tx", "退出成功" + mLiveBean.getUid()); +// LiveNetManager.get(mContext) +// .leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback() { +// @Override +// public void onSuccess(String data) { +// } +// +// @Override +// public void onError(String error) { +// } +// }); +// leaveStream = ""; +// leaveGroupId = ""; } catch (Exception e) { e.printStackTrace(); } From 302b7899701171a0d6812b095d8c524b58f2d6cb Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 15 Dec 2023 14:03:42 +0800 Subject: [PATCH 12/16] =?UTF-8?q?=E5=A4=9A=E4=BA=BAPk=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presenter/LiveRyLinkMicPkPresenter.java | 21 +++++++++++-------- .../yunbao/live/views/LiveRoomViewHolder.java | 14 +++++++------ .../yunbao/main/activity/MainActivity.java | 8 +++++-- 3 files changed, 26 insertions(+), 17 deletions(-) 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 95406d0a0..60325da49 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java @@ -1,6 +1,5 @@ package com.yunbao.live.presenter; -import static com.blankj.utilcode.util.SnackbarUtils.dismiss; import static com.lzy.okgo.utils.HttpUtils.runOnUiThread; import static com.yunbao.common.Constants.SOCKET_LINK_MIC_PK; import static com.yunbao.common.Constants.SOCKET_LIVE_DRPK; @@ -38,7 +37,6 @@ import android.widget.TextView; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import com.blankj.utilcode.util.ViewUtils; import com.tencent.trtc.TRTCCloud; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.bean.LiveInfoModel; @@ -858,7 +856,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onSuccess(RCRTCOtherRoom rcrtcOtherRoom) { rcrtcOtherRoom.registerOtherRoomEventsListener(otherRoomEventsListener); - ToastUtil.show(WordUtil.isNewZh()?"接受成功":"Success"); + ToastUtil.show(WordUtil.isNewZh() ? "接受成功" : "Success"); new Handler(Looper.getMainLooper()).post(new Runnable() { public void run() { for (int i = 0; i < rcrtcOtherRoom.getRemoteUsers().size(); i++) { @@ -977,7 +975,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onSuccess(RCRTCOtherRoom rcrtcOtherRoom) { rcrtcOtherRoom.registerOtherRoomEventsListener(otherRoomEventsListener); - ToastUtil.show(WordUtil.isNewZh()?"接受成功":"Success"); + ToastUtil.show(WordUtil.isNewZh() ? "接受成功" : "Success"); new Handler(Looper.getMainLooper()).post(new Runnable() { public void run() { Log.e("ry", liveid + "来了!!!!" + rcrtcOtherRoom.getRemoteUsers().size()); @@ -1660,7 +1658,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { } Log.e("ry", "多人接受成功" + mApplyUid); - ToastUtil.show(WordUtil.isNewZh()?"接受成功":"Success"); + 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()); @@ -1697,7 +1695,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onError(String error) { - ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred"); + ToastUtil.show(WordUtil.isNewZh() ? "抱歉!出錯了!" : "i \\'m sorry! An error occurred"); } }); @@ -2332,7 +2330,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { * 主播与主播PK 断开连麦PK的回调 */ public void onLinkMicPkClose(int i) { - Log.e("ry",mPkUid+"aaaaqwqw"+i); + Log.e("ry", mPkUid + "aaaaqwqw" + i); PKing = false; LiveRyAnchorActivity.isDRPK = 0; @@ -2500,11 +2498,11 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { * 更新Pk分数 */ public void upDataPkScore(JSONArray pkScores, String uid, int time) { - String userID1 = (String) imageGrade1.getTag(); String userID2 = (String) imageGrade2.getTag(); String userID4 = (String) imageGrade4.getTag(); if (livePushRyViewHolder.timeTitle.getVisibility() == View.GONE) { + mHandler.removeMessages(WHAT_PK_TIME2); RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) livePushRyViewHolder.timeTitle.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(123); livePushRyViewHolder.timeTitle.setLayoutParams(layoutParams); @@ -2512,7 +2510,12 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { String pkTime = StringUtil.getDurationText(time * 1000); livePushRyViewHolder.textTime.setText(String.format(mContext.getString(R.string.pk_time), pkTime)); mPkTimeCount = time; - pkCountdownTimer(); + if (time>0){ + String s1 = StringUtil.getDurationText(mPkTimeCount * 1000); + livePushRyViewHolder.textTime.setText(String.format(mContext.getString(R.string.pk_time), s1)); + mHandler.sendEmptyMessage(WHAT_PK_TIME2); + } + } int pkScoreSize = pkScores.size(); if (pkScoreSize == 3) { 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 f8f72c04a..b6da2cd0a 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -5013,6 +5013,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } public void upDataPkScore(JSONArray pkScores, int time) { + isShowGif = true; if (detailsView == null) { detailsView = LayoutInflater.from(mContext).inflate(R.layout.view_live_pk_details, null); @@ -5053,7 +5054,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } }); - + countdownHandler.removeCallbacks(countdownRunnable); + if (time > 0) { + mPkTimeCount = time; + timeTitle.setVisibility(View.VISIBLE); + countdownHandler.post(countdownRunnable); + } } for (int i = 0; i < pkScores.size(); i++) { @@ -5119,11 +5125,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } } - if (time > 0) { - mPkTimeCount = time; - timeTitle.setVisibility(View.VISIBLE); - countdownHandler.postAtTime(countdownRunnable, getNextSecondTime()); - } + textPkName2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { 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 e9c2814d8..dc787e261 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -91,7 +91,6 @@ import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.GiftCacheUtil; import com.yunbao.common.utils.GoogleUtils; -import com.yunbao.common.utils.L; import com.yunbao.common.utils.LiveRoomCheckLivePresenter; import com.yunbao.common.utils.LocationUtil; import com.yunbao.common.utils.ProcessResultUtil; @@ -1302,7 +1301,12 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene messageNumber = event.getNumber(); if (event.getNumber() > 0) { v_table_redpoint.setVisibility(View.VISIBLE); - v_table_redpoint.setText(event.getNumber() + ""); + if (event.getNumber() > 99) { + v_table_redpoint.setText("99+"); + } else { + v_table_redpoint.setText(event.getNumber() + ""); + } + } else { v_table_redpoint.setVisibility(View.GONE); v_table_redpoint.setText(""); From 0dc1009661c7d466754576d320bd3fc82b9b68b1 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 15 Dec 2023 15:16:09 +0800 Subject: [PATCH 13/16] =?UTF-8?q?=E8=A7=82=E7=9C=8B=E6=97=B6=E9=95=BF?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/http/live/LiveNetManager.java | 1 + .../live/dialog/LiveUserDialogFragment.java | 6 +----- .../yunbao/live/views/LiveRoomViewHolder.java | 5 ++++- .../live/views/PortraitLiveManager.java | 19 ++++++++++++------- 4 files changed, 18 insertions(+), 13 deletions(-) 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 5716e4c33..b562973be 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 @@ -481,6 +481,7 @@ public class LiveNetManager { * @param liveUid */ public void leaveRoomNew(String stream, String liveUid, HttpCallback callback) { + Log.e("观看时长","leaveRoomNew-----------------------"+liveUid); API.get().pdLiveApi(mContext) .leaveRoomNew("g" + liveUid, stream) .subscribeOn(Schedulers.io()) diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java index 7ed21d2d1..2b11f8911 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java @@ -22,8 +22,6 @@ import com.opensource.svgaplayer.SVGADrawable; import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAParser; import com.opensource.svgaplayer.SVGAVideoEntity; -import com.tencent.imsdk.v2.V2TIMCallback; -import com.tencent.imsdk.v2.V2TIMManager; import com.umeng.analytics.MobclickAgent; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; @@ -65,9 +63,6 @@ import java.net.URL; import java.util.ArrayList; import java.util.List; -import io.rong.imlib.IRongCoreCallback; -import io.rong.imlib.IRongCoreEnum; -import io.rong.imlib.chatroom.base.RongChatRoomClient; import pl.droidsonroids.gif.GifImageView; /** @@ -637,6 +632,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On private void gotoLive(String live_id) { + dismiss(); DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.party_studio), new DialogUitl.SimpleCallback() { @Override public void onConfirmClick(Dialog dialog, String content) { 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 b6da2cd0a..59fb289d2 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -1826,6 +1826,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis * 重置数据 */ public void resetView() { + countdownHandler.removeCallbacks(countdownRunnable); svgaImageViewHashMap.clear(); pa_pao_layout.removeAllViews(); timeHandler.removeCallbacks(timeRunnable); @@ -5061,7 +5062,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis countdownHandler.post(countdownRunnable); } } - + Log.e("多人Pk", "upDataPkScore mPkTimeCount:" +mPkTimeCount); for (int i = 0; i < pkScores.size(); i++) { JSONObject score = pkScores.getJSONObject(i); String userNiceName = score.getString("user_nicename"); @@ -5152,8 +5153,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void run() { mPkTimeCount--; if (mPkTimeCount > 0) {// + Log.e("多人Pk", "countdownRunnable mPkTimeCount:" +mPkTimeCount); String s1 = StringUtil.getDurationText(mPkTimeCount * 1000); textTime.setText(String.format(mContext.getString(R.string.pk_time), s1)); + Log.e("多人Pk", "countdownRunnable s1:" +s1); countdownHandler.postAtTime(countdownRunnable, getNextSecondTime()); } else { mPkTimeCount = 0; 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 030057c83..dff06b39b 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -242,15 +242,17 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } public void setGiftRemainingQuantity(String giftRemainingQuantity) { - if (mLiveAudienceViewHolder!=null){ + if (mLiveAudienceViewHolder != null) { mLiveAudienceViewHolder.setGiftRemainingQuantity(giftRemainingQuantity); } } + public void setHotNum(String hotNum) { - if (mLiveRoomViewHolder!=null){ - mLiveRoomViewHolder.setHotNum(hotNum); - } + if (mLiveRoomViewHolder != null) { + mLiveRoomViewHolder.setHotNum(hotNum); + } } + public PortraitLiveManager(Activity context, Intent intent) { this.mContext = context; this.mIntent = intent; @@ -447,6 +449,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe public void run() { //加入房间发送Im消息 LiveNetManager.get(mContext).userJoinRoomNew(mLiveBean.getStream(), mLiveBean.getUid()); + Log.e("观看时长","userJoinRoomNew-----------------------"+mLiveBean.getUid()); } }; @@ -459,6 +462,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe .enterRoomNew(mLiveBean.getStream(), mLiveBean.getUid(), mLiveBean.getCity(), new com.yunbao.common.http.base.HttpCallback() { @Override public void onSuccess(EnterRoomNewModel data) { + Log.e("观看时长","enterRoomNew-----------------------"+ mLiveBean.getUid()); isEnterRoom = true; if (TextUtils.isEmpty(leaveStream)) { leaveStream = mLiveBean.getStream(); @@ -686,6 +690,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } upDataPkScore(pkInfo.getJSONArray("userlist"), pkInfo.getIntValue("drpk_time")); + Log.e("多人Pk", "enterRoomNew drpk_time:" + pkInfo.getIntValue("drpk_time")); } // mLivePlayViewHolder.setLayoutInterface(new LivePlayRyViewHolder.PlayViewLayoutInterface() { // @Override @@ -808,7 +813,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe @Override public void onRemove(boolean isQuit) { - Log.e("直播间接口调用排查","onRemove---------------"); + Log.e("直播间接口调用排查", "onRemove---------------"); LiveNetManager.get(mContext).cancelLive(); liveHandler.removeCallbacks(sendFIm); linkMicPkStartHandler.removeCallbacks(linkMicPkStartRunnable); @@ -978,7 +983,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe Conversation.ConversationType conversationType = Conversation.ConversationType.PRIVATE; TextMessage messageContent = TextMessage.obtain(msg.mResult.toString()); - io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(liveID, conversationType, messageContent); + io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(liveID, conversationType, messageContent); RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() { @Override @@ -1850,7 +1855,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe .leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback() { @Override public void onSuccess(String data) { - Log.e("直播间接口调用排查","leaveRoomNew---------------"); + } @Override From f10657f89cbd777cdf2ab35ed0f1a78ad8b1138d Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 15 Dec 2023 17:01:35 +0800 Subject: [PATCH 14/16] =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=95=B4=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java index 6005799c0..4058ed2e0 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java @@ -318,7 +318,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter { int length2 = builder.length(); builder.append(bean.getAnchorName()); builder.setSpan(new ForegroundColorSpan(0xFF73FFFF), length2, length2 + bean.getAnchorName().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); - builder.append(WordUtil.isNewZh() ? "發出了 " : "Sent out " + bean.getContent()); + builder.append(WordUtil.isNewZh() ? "發出了 " + bean.getContent(): "Sent out " + bean.getContent()); mTextView.setText(builder); } else if (bean.getType() == -4) { String str1 = WordUtil.isNewZh() ? "成功拯救了 " : "Succeeded in saving"; From 0b3ebdfc30684074c6b95df649f00c70ebfe4370 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 15 Dec 2023 17:17:18 +0800 Subject: [PATCH 15/16] =?UTF-8?q?=E6=95=B4=E8=9B=8A=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 10 +++++----- .../java/com/yunbao/live/adapter/LiveChatAdapter.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config.gradle b/config.gradle index c9e395940..c3bf59333 100644 --- a/config.gradle +++ b/config.gradle @@ -4,14 +4,14 @@ ext { buildToolsVersion: "29.0.2", minSdkVersion : 21, targetSdkVersion : 33, - versionCode : 459, + versionCode : 460, versionName : "6.6.3" ] manifestPlaceholders = [ //正式、 -// serverHost : "https://napi.yaoulive.com", + serverHost : "https://napi.yaoulive.com", // 测试 - serverHost : " https://ceshi.yaoulive.com", +// serverHost : " https://ceshi.yaoulive.com", //百度语音识别 @@ -21,10 +21,10 @@ ext { baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S", // true表示谷歌支付 false 0 链接包 1 谷歌包 2华为包 - isGooglePlay : 0, + isGooglePlay : 1, //是否上报异常日志 isUploadLog : true, //是否打包成插件包模式 - isPluginModel : true, + isPluginModel : false, ] } diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java index 4058ed2e0..9d515497e 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java @@ -309,7 +309,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter { SpannableStringBuilder builder = new SpannableStringBuilder(); if (bean.getType() == -3) { String str1 = WordUtil.isNewZh() ? "整蠱來了! " : "Pranks are coming"; - String str2 = WordUtil.isNewZh() ? "向 " : "too"; + String str2 = WordUtil.isNewZh() ? "向 " : "to"; builder.append(str1); int length = builder.length(); builder.append(bean.getUserNiceName()); From f65c698602dcdad94d0a672172f532f386f5d156 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Mon, 18 Dec 2023 15:30:29 +0800 Subject: [PATCH 16/16] =?UTF-8?q?=E7=9F=AD=E5=89=A7=20=20=20=20CookieManag?= =?UTF-8?q?er=20cookieManager=20=3D=20CookieManager.getInstance();=20if(Bu?= =?UTF-8?q?ild.VERSION.SDK=5FINT=20>=3D=20Build.VERSION=5FCODES.LOLLIPOP)?= =?UTF-8?q?=20=20=20=20=20{=20=20=20=20=20cookieManager.setAcceptThirdPart?= =?UTF-8?q?yCookies(mainWv,=20true);=20=20=20=20=20}=20else{=20=20=20=20?= =?UTF-8?q?=20=C2=A0=20cookieManager.setAcceptCookie(true);=20=20=20=20=20?= =?UTF-8?q?}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 4 ++-- .../yunbao/main/views/MainHomeCommunityViewHolder.java | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/config.gradle b/config.gradle index c3bf59333..5442dbf23 100644 --- a/config.gradle +++ b/config.gradle @@ -9,9 +9,9 @@ ext { ] manifestPlaceholders = [ //正式、 - serverHost : "https://napi.yaoulive.com", +// serverHost : "https://napi.yaoulive.com", // 测试 -// serverHost : " https://ceshi.yaoulive.com", + serverHost : " https://ceshi.yaoulive.com", //百度语音识别 diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java index f7875f41a..83c66ccac 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java @@ -17,6 +17,7 @@ import android.text.TextUtils; import android.util.Log; import android.view.View; import android.view.ViewGroup; +import android.webkit.CookieManager; import android.webkit.ValueCallback; import android.webkit.WebChromeClient; import android.webkit.WebSettings; @@ -102,7 +103,7 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl Bus.getOn(this); String url = HtmlConfig.ENCOURAGE + "?t=" + Math.random() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"); -// String url = "https://coolshi.feioou.com/testAndroid.html"; +// String url = "https://api.coolydrama.com/?agentCode=186279"; final LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView); mProgressBar = (ProgressBar) findViewById(R.id.progressbar); mWebView = new WebView(mContext); @@ -119,6 +120,12 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setDomStorageEnabled(true); + CookieManager cookieManager = CookieManager.getInstance(); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + cookieManager.setAcceptThirdPartyCookies(mWebView, true); + } else { + cookieManager.setAcceptCookie(true); + } String appCachePath = mContext.getCacheDir().getAbsolutePath(); // mWebView.getSettings().setAppCachePath(appCachePath); mWebView.getSettings().setAllowFileAccess(true);