From a307e6f8644e0ccd55c47185122e3addc5a397b3 Mon Sep 17 00:00:00 2001 From: hch <16607480311@163.com> Date: Mon, 15 Jan 2024 17:24:07 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=8E=BB=E6=94=AF=E4=BB=98=E6=97=A0=E5=8F=8D=E5=BA=94=20?= =?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/pay/samsung/SamsungUtil.java | 10 ++++++++-- config.gradle | 6 +++--- .../com/yunbao/live/views/SystemMessageViewHolder.java | 4 ++-- .../java/com/yunbao/main/activity/SamsungFragment.java | 1 + 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/pay/samsung/SamsungUtil.java b/common/src/main/java/com/yunbao/common/pay/samsung/SamsungUtil.java index ccd9c308b..d77d30acc 100644 --- a/common/src/main/java/com/yunbao/common/pay/samsung/SamsungUtil.java +++ b/common/src/main/java/com/yunbao/common/pay/samsung/SamsungUtil.java @@ -11,7 +11,6 @@ import com.samsung.android.sdk.iap.lib.listener.OnPaymentListener; import com.samsung.android.sdk.iap.lib.vo.ConsumeVo; import com.samsung.android.sdk.iap.lib.vo.ErrorVo; import com.samsung.android.sdk.iap.lib.vo.OwnedProductVo; -import com.samsung.android.sdk.iap.lib.vo.PurchaseVo; import com.yunbao.common.utils.L; import java.util.ArrayList; @@ -41,9 +40,16 @@ public class SamsungUtil { public void init() { iapHelper = IapHelper.getInstance(mContext); //设置支付模式 OPERATION_MODE_PRODUCTION 正式模式 OPERATION_MODE_TEST 测试模式 - iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_TEST); + iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_PRODUCTION); } + public void dispose() { + if (iapHelper != null) { + iapHelper.dispose(); + } + } + + /** * 购买 * diff --git a/config.gradle b/config.gradle index f7586a40c..b3e4d8629 100644 --- a/config.gradle +++ b/config.gradle @@ -4,14 +4,14 @@ ext { buildToolsVersion: "29.0.2", minSdkVersion : 21, targetSdkVersion : 33, - versionCode : 460, + versionCode : 461, 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", //百度语音识别 diff --git a/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java b/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java index 4a0f83171..3ea142f29 100644 --- a/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java @@ -357,11 +357,11 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli mRefreshView.setDataHelper(new CommonRefreshView.DataHelper() { @Override public RefreshAdapter getAdapter() { - if (mAdapter == null && (SystemMessageActivity.type.equals("1"))) { + if (mAdapter == null && (SystemMessageActivity.type.equals("1"))) { //官方通知 mAdapter = new SystemMessageAdapter(mContext); } else if (mAdapter == null && SystemMessageActivity.type.equals("2")) { mAdapter = new InteractionMessageAdapter(mContext, SystemMessageViewHolder.this); - } else if (mAdapter == null && SystemMessageActivity.type.equals("4")) { + } else if (mAdapter == null && SystemMessageActivity.type.equals("4")) { //系统消息 mAdapter = new SystemMessageNewAdapter(mContext); } return mAdapter; diff --git a/main/src/main/java/com/yunbao/main/activity/SamsungFragment.java b/main/src/main/java/com/yunbao/main/activity/SamsungFragment.java index d7ac7e665..6ec25fd5b 100644 --- a/main/src/main/java/com/yunbao/main/activity/SamsungFragment.java +++ b/main/src/main/java/com/yunbao/main/activity/SamsungFragment.java @@ -88,6 +88,7 @@ public class SamsungFragment extends Fragment { private void initSamsung() { samsungUtil = new SamsungUtil(getActivity()); + samsungUtil.dispose(); samsungUtil.init(); } From 65d38de73cf318f03d6e065fb70dd80df77428ec Mon Sep 17 00:00:00 2001 From: hch <16607480311@163.com> Date: Thu, 18 Jan 2024 14:48:49 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=8E=BB=E6=94=AF=E4=BB=98=E6=97=A0=E5=8F=8D=E5=BA=94=20?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 1 + app/src/main/java/com/shayu/phonelive/AppContext.java | 2 +- common/build.gradle | 2 +- .../src/main/java/com/yunbao/common/CommonAppContext.java | 2 +- .../main/java/com/yunbao/common/http/CommonHttpUtil.java | 2 ++ .../java/com/yunbao/common/views/APKUpdateCustomPopup.java | 4 ++++ config.gradle | 2 +- .../com/shayu/lib_google/utils/GoogleBillingManage.java | 5 ----- .../main/java/com/yunbao/main/activity/EntryActivity.java | 7 ++++--- .../main/java/com/yunbao/main/activity/MainActivity.java | 2 +- .../java/com/yunbao/main/activity/MyWalletActivity.java | 3 +++ .../java/com/yunbao/main/activity/RegisterActivity.java | 2 +- settings.gradle | 2 +- 13 files changed, 21 insertions(+), 15 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 6fde1835f..ded4c2c0f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -83,6 +83,7 @@ tools:ignore="ProtectedPermissions" /> + diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java index 499fa2607..9e926bd0a 100644 --- a/app/src/main/java/com/shayu/phonelive/AppContext.java +++ b/app/src/main/java/com/shayu/phonelive/AppContext.java @@ -331,7 +331,7 @@ public class AppContext extends CommonAppContext { if (!CommonAppConfig.IS_UPLOAD_ERROR_LOG) { return; } - if (CommonAppConfig.IS_GOOGLE_PLAY == 1) { + if (CommonAppConfig.IS_GOOGLE_PLAY != 2) { GoogleUtils.newInstance(this).initializeApp(this); } } diff --git a/common/build.gradle b/common/build.gradle index d436ac07d..6a33267a5 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -214,7 +214,7 @@ dependencies { //api project(':lib_huawei') //google插件包 - //api project(':lib_google') + api project(':lib_google') //samsung插件包 api project(':IAP6Helper') diff --git a/common/src/main/java/com/yunbao/common/CommonAppContext.java b/common/src/main/java/com/yunbao/common/CommonAppContext.java index 9fec97fe8..d3beaf810 100644 --- a/common/src/main/java/com/yunbao/common/CommonAppContext.java +++ b/common/src/main/java/com/yunbao/common/CommonAppContext.java @@ -55,7 +55,7 @@ public class CommonAppContext extends MultiDexApplication { // RongPushClient.setPushConfig(config); //将推送相关配置设置到 SDK //设置新加坡融云服务器 有时候国内收不到推送是因为这个 RongIMClient.setServerInfo("navsg01.cn.ronghub.com", null); - if (CommonAppConfig.IS_GOOGLE_PLAY == 1) { + if (CommonAppConfig.IS_GOOGLE_PLAY != 2) { //谷歌推送 PushConfig gconfig = new PushConfig.Builder().enableFCM(true).build(); RongPushClient.setPushConfig(gconfig); 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 db17a7499..386c0e47d 100644 --- a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java +++ b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java @@ -331,6 +331,8 @@ public class CommonHttpUtil { isGoogle = "1"; } else if (CommonAppConfig.IS_GOOGLE_PLAY == 2) { isGoogle = "2"; + }else if (CommonAppConfig.IS_GOOGLE_PLAY == 3) { + isGoogle = "3"; } else { isGoogle = "-1"; } 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 eff92f029..f860e2203 100644 --- a/common/src/main/java/com/yunbao/common/views/APKUpdateCustomPopup.java +++ b/common/src/main/java/com/yunbao/common/views/APKUpdateCustomPopup.java @@ -97,9 +97,13 @@ public class APKUpdateCustomPopup extends CenterPopupView { if (CommonAppConfig.IS_GOOGLE_PLAY == 2 && APKManager.get().getAPKGoogleIsUp() != 1) { dismiss(); } + if (CommonAppConfig.IS_GOOGLE_PLAY == 3 && APKManager.get().getAPKGoogleIsUp() != 1) { + dismiss(); + } if (CommonAppConfig.IS_GOOGLE_PLAY == 0 && APKManager.get().getApkIsUp() != 1) { dismiss(); } + } } diff --git a/config.gradle b/config.gradle index b3e4d8629..b36cf64f4 100644 --- a/config.gradle +++ b/config.gradle @@ -4,7 +4,7 @@ ext { buildToolsVersion: "29.0.2", minSdkVersion : 21, targetSdkVersion : 33, - versionCode : 461, + versionCode : 462, versionName : "6.6.3" ] manifestPlaceholders = [ 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 492603269..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 @@ -117,11 +117,6 @@ public class GoogleBillingManage implements PurchasesUpdatedListener { } } - public boolean getGoogleService() { - int code = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mContext); - return code == 0; - } - int querySize = -1; JSONArray tokenList = new JSONArray(); JSONArray orderList = new JSONArray(); diff --git a/main/src/main/java/com/yunbao/main/activity/EntryActivity.java b/main/src/main/java/com/yunbao/main/activity/EntryActivity.java index 50b86d0b1..8f17d1c5a 100644 --- a/main/src/main/java/com/yunbao/main/activity/EntryActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EntryActivity.java @@ -185,6 +185,7 @@ public class EntryActivity extends AppCompatActivity { activity = this; Contexts = this; setStatusBar(); + googleLayout = findViewById(R.id.googleLayout); if (CommonAppConfig.IS_GOOGLE_PLAY == 2) { @@ -539,7 +540,7 @@ public class EntryActivity extends AppCompatActivity { Log.d("OpenInstall", "appData.getData()= " + appData.getData()); //获取自定义数据 if (appData.getData() != null && !appData.getData().equals("")) { - if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2) { + if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2|| CommonAppConfig.IS_GOOGLE_PLAY == 3) { } else { JSONObject data = JSON.parseObject(appData.getData()); @@ -575,7 +576,7 @@ public class EntryActivity extends AppCompatActivity { */ private void loginBuyThird(LoginData data) { mLoginType = data.getType(); - if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2) { + if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2||CommonAppConfig.IS_GOOGLE_PLAY == 3) { mPromoCode = ""; } MainHttpUtil.loginByThird(UserID, data.getOpenID(), mPromoCode, mUuidDevice, data.getNickName(), data.getAvatar(), data.getType(), new HttpCallback() { @@ -623,7 +624,7 @@ public class EntryActivity extends AppCompatActivity { public void callback(UserBean bean) { if (mFirstLogin) { - if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2) { + if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2|| CommonAppConfig.IS_GOOGLE_PLAY == 3) { EntryActivity.this.startActivity(new Intent(EntryActivity.this, OneLoginActivity.class)); } else { HttpClient.getInstance().post("Home.getRandJoinAnchor", "Home.getRandJoinAnchor").execute(new HttpCallback() { 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 dc787e261..9b27ee50d 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -288,7 +288,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene WebViewActivity.forward(mContext, getIntent().getStringExtra("activityUrl"), true, false); } - if (CommonAppConfig.IS_GOOGLE_PLAY == 1) { + if (CommonAppConfig.IS_GOOGLE_PLAY != 2) { /* GoogleUtils.newInstance(MainActivity.this).setFirebaseTokenListener(MainActivity.this, new GoogleUtils.FirebaseTokenListener() { @Override public void onResultToken(String token) { diff --git a/main/src/main/java/com/yunbao/main/activity/MyWalletActivity.java b/main/src/main/java/com/yunbao/main/activity/MyWalletActivity.java index 2bf2b8eba..defcce9c1 100644 --- a/main/src/main/java/com/yunbao/main/activity/MyWalletActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MyWalletActivity.java @@ -86,6 +86,9 @@ public class MyWalletActivity extends AbsActivity { } else if (CommonAppConfig.IS_GOOGLE_PLAY == 3) { samsungUtil = SamsungUtil.newInstance(mContext); samsungUtil.init(); + }else{ + googleUtils = new GoogleUtils(mContext); + googleUtils.initGooglePay(); } diff --git a/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java b/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java index 3794d8206..11491f72a 100644 --- a/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java @@ -404,7 +404,7 @@ public class RegisterActivity extends AbsActivity { //获取自定义数据 if (appData.getData() != null && !appData.getData().equals("")) { JSONObject data = JSON.parseObject(appData.getData()); - if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2) { + if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2|| CommonAppConfig.IS_GOOGLE_PLAY == 3) { yqm_view.setVisibility(View.VISIBLE); MainHttpUtil.getDeviceLoginType(new HttpCallback() { @Override diff --git a/settings.gradle b/settings.gradle index e8b3311ed..b391e1573 100644 --- a/settings.gradle +++ b/settings.gradle @@ -5,5 +5,5 @@ include ':FaceUnity' include ':Share' include ':pluginsForAnchor' //include ':lib_huawei' -//include ':lib_google' +include ':lib_google' include ':IAP6Helper' From 00b89aab695a7953ddd53f12de8a7b0c2e5575b4 Mon Sep 17 00:00:00 2001 From: hch <16607480311@163.com> Date: Thu, 18 Jan 2024 15:15:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/live/views/SystemMessageViewHolder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java b/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java index 445c5fb2e..380099102 100644 --- a/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java @@ -5,6 +5,7 @@ import static io.rong.imlib.RongIMClient.BlacklistStatus.NOT_IN_BLACK_LIST; import android.Manifest; import android.annotation.SuppressLint; import android.app.Activity; +import android.app.Dialog; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; @@ -65,6 +66,7 @@ import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.AbsViewHolder; import com.yunbao.common.views.MsgSysDelPopupView; import com.yunbao.common.views.PlaySettingPopupView; +import com.yunbao.common.views.TopGradual; import com.yunbao.live.R; import com.yunbao.live.activity.EditNameRemarksActivity; import com.yunbao.live.activity.SystemMessageActivity; @@ -75,7 +77,6 @@ import com.yunbao.live.adapter.YouLikeMessageAdapter; import com.yunbao.live.bean.SearchUserBean; import com.yunbao.live.bean.SystemMessageBean; import com.yunbao.live.bean.YouLikeBean; -import com.yunbao.live.custom.TopGradual; import com.yunbao.live.http.ImHttpConsts; import com.yunbao.live.http.ImHttpUtil;