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'