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 8d2e7884e..6d42c5495 100644
--- a/app/src/main/java/com/shayu/phonelive/AppContext.java
+++ b/app/src/main/java/com/shayu/phonelive/AppContext.java
@@ -339,7 +339,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 cc8b9746c..b9ff40117 100644
--- a/common/build.gradle
+++ b/common/build.gradle
@@ -216,7 +216,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 07f5b0021..444ce4b92 100644
--- a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java
+++ b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java
@@ -329,6 +329,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/pay/samsung/SamsungUtil.java b/common/src/main/java/com/yunbao/common/pay/samsung/SamsungUtil.java
index dcba2f4e4..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;
@@ -44,6 +43,13 @@ public class SamsungUtil {
iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_PRODUCTION);
}
+ public void dispose() {
+ if (iapHelper != null) {
+ iapHelper.dispose();
+ }
+ }
+
+
/**
* 购买
*
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 26fb307cc..b36cf64f4 100644
--- a/config.gradle
+++ b/config.gradle
@@ -4,8 +4,8 @@ ext {
buildToolsVersion: "29.0.2",
minSdkVersion : 21,
targetSdkVersion : 33,
- versionCode : 460,
- versionName : "6.6.4"
+ versionCode : 462,
+ versionName : "6.6.3"
]
manifestPlaceholders = [
//正式、
@@ -21,10 +21,10 @@ ext {
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
// true表示谷歌支付 false 0 链接包 1 谷歌包 2华为包 3 samsung包
- isGooglePlay : 0,
+ isGooglePlay : 3,
//是否上报异常日志
isUploadLog : true,
//是否打包成插件包模式
- isPluginModel : true,
+ isPluginModel : false,
]
}
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 0ba4267aa..bae5a3729 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/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java b/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java
index dfd9e55c9..380099102 100644
--- a/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java
+++ b/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java
@@ -66,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;
@@ -76,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.common.views.TopGradual;
import com.yunbao.live.http.ImHttpConsts;
import com.yunbao.live.http.ImHttpUtil;
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 9d4bf9001..eca8ddae0 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) {
@@ -540,7 +541,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());
@@ -576,7 +577,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() {
@@ -624,7 +625,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 db08e4bde..82ffbd9a0 100644
--- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java
+++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java
@@ -295,7 +295,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/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();
}
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'