Compare commits
2 Commits
master
...
v6.8.1-上架版
Author | SHA1 | Date | |
---|---|---|---|
|
921f80dd7a | ||
|
37d213f031 |
@ -381,7 +381,7 @@ public class AppContext extends CommonAppContext {
|
||||
if (!CommonAppConfig.IS_UPLOAD_ERROR_LOG) {
|
||||
return;
|
||||
}
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2&&CommonAppConfig.IS_GOOGLE_PLAY!=4&&CommonAppConfig.IS_GOOGLE_PLAY!=5) {
|
||||
GoogleUtils.newInstance(this).initializeApp(this);
|
||||
}
|
||||
}
|
||||
@ -393,7 +393,7 @@ public class AppContext extends CommonAppContext {
|
||||
}
|
||||
String uid = CommonAppConfig.getInstance().getUid();
|
||||
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2&&CommonAppConfig.IS_GOOGLE_PLAY!=4&&CommonAppConfig.IS_GOOGLE_PLAY!=5) {
|
||||
GoogleUtils.newInstance(sInstance).setFirebaseCrashData(
|
||||
uid,
|
||||
SpUtil.getInstance().getStringValue(SpUtil.USER_INFO),
|
||||
|
70
app/src/vivo_online/google-services.json
Normal file
70
app/src/vivo_online/google-services.json
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "292494634914",
|
||||
"project_id": "pdlive-1631521064967",
|
||||
"storage_bucket": "pdlive-1631521064967.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:292494634914:android:d8db197d7e7a6c3a3a4cfb",
|
||||
"android_client_info": {
|
||||
"package_name": "com.pdlive.shayu"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "292494634914-8nuhhoeo061ki1jevbcsrl7dfdl6dlm0.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "38cc19306c9facee36a9224e9a4070bc0be15c7d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-ctr3fptp5mkv2qqr4gkgjo9uluq2joqb.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "15fc5e70cf238323bf7111c8c627803985478e87"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-ejtqvaj86a2lldv0di2pr3d5gngprahd.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "b66dc8d21cfcf6c729577ddcf0c312b2a31ed872"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDVnuGnQzjI_vDrxh20Hv_S1OMUD7Vp3zU"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-v9j4rei86q2pfh9as4seotb23vr2744a.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "com.live.pd"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
70
app/src/vivo_test/google-services.json
Normal file
70
app/src/vivo_test/google-services.json
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "292494634914",
|
||||
"project_id": "pdlive-1631521064967",
|
||||
"storage_bucket": "pdlive-1631521064967.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:292494634914:android:d8db197d7e7a6c3a3a4cfb",
|
||||
"android_client_info": {
|
||||
"package_name": "com.pdlive.shayu"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "292494634914-8nuhhoeo061ki1jevbcsrl7dfdl6dlm0.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "38cc19306c9facee36a9224e9a4070bc0be15c7d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-ctr3fptp5mkv2qqr4gkgjo9uluq2joqb.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "15fc5e70cf238323bf7111c8c627803985478e87"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-ejtqvaj86a2lldv0di2pr3d5gngprahd.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "b66dc8d21cfcf6c729577ddcf0c312b2a31ed872"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDVnuGnQzjI_vDrxh20Hv_S1OMUD7Vp3zU"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-v9j4rei86q2pfh9as4seotb23vr2744a.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "com.live.pd"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
70
app/src/xiaomi_online/google-services.json
Normal file
70
app/src/xiaomi_online/google-services.json
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "292494634914",
|
||||
"project_id": "pdlive-1631521064967",
|
||||
"storage_bucket": "pdlive-1631521064967.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:292494634914:android:d8db197d7e7a6c3a3a4cfb",
|
||||
"android_client_info": {
|
||||
"package_name": "com.pdlive.shayu"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "292494634914-8nuhhoeo061ki1jevbcsrl7dfdl6dlm0.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "38cc19306c9facee36a9224e9a4070bc0be15c7d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-ctr3fptp5mkv2qqr4gkgjo9uluq2joqb.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "15fc5e70cf238323bf7111c8c627803985478e87"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-ejtqvaj86a2lldv0di2pr3d5gngprahd.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "b66dc8d21cfcf6c729577ddcf0c312b2a31ed872"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDVnuGnQzjI_vDrxh20Hv_S1OMUD7Vp3zU"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-v9j4rei86q2pfh9as4seotb23vr2744a.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "com.live.pd"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
70
app/src/xiaomi_test/google-services.json
Normal file
70
app/src/xiaomi_test/google-services.json
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "292494634914",
|
||||
"project_id": "pdlive-1631521064967",
|
||||
"storage_bucket": "pdlive-1631521064967.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:292494634914:android:d8db197d7e7a6c3a3a4cfb",
|
||||
"android_client_info": {
|
||||
"package_name": "com.pdlive.shayu"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "292494634914-8nuhhoeo061ki1jevbcsrl7dfdl6dlm0.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "38cc19306c9facee36a9224e9a4070bc0be15c7d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-ctr3fptp5mkv2qqr4gkgjo9uluq2joqb.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "15fc5e70cf238323bf7111c8c627803985478e87"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-ejtqvaj86a2lldv0di2pr3d5gngprahd.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "b66dc8d21cfcf6c729577ddcf0c312b2a31ed872"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDVnuGnQzjI_vDrxh20Hv_S1OMUD7Vp3zU"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-v9j4rei86q2pfh9as4seotb23vr2744a.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "com.live.pd"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
@ -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 != 2) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2&&CommonAppConfig.IS_GOOGLE_PLAY!=4&&CommonAppConfig.IS_GOOGLE_PLAY!=5) {
|
||||
//谷歌推送
|
||||
PushConfig gconfig = new PushConfig.Builder().enableFCM(true).build();
|
||||
RongPushClient.setPushConfig(gconfig);
|
||||
|
@ -7,7 +7,7 @@ package com.yunbao.common;
|
||||
public class HtmlConfig {
|
||||
|
||||
//登录即代表同意服务和隐私条款
|
||||
public static final String LOGIN_PRIVCAY = CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=3";
|
||||
public static final String LOGIN_PRIVCAY = CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=713";
|
||||
public static final String LOGIN_PRIVCAY1 = CommonAppConfig.HOST + "/index.php?g=Portal&m=Page&a=index&id=59";
|
||||
|
||||
//注册用户协议
|
||||
|
@ -4,7 +4,7 @@ ext {
|
||||
buildToolsVersion: "29.0.2",
|
||||
minSdkVersion : 23,
|
||||
targetSdkVersion : 34,
|
||||
versionCode : 698,
|
||||
versionCode : 700,
|
||||
versionName : "6.8.1"
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
@ -24,7 +24,7 @@ ext {
|
||||
|
||||
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
||||
|
||||
// true表示谷歌支付 false 0 链接包(isPluginModel-> true) 1 谷歌包 2华为包 3 samsung包
|
||||
// true表示谷歌支付 false 0 链接包(isPluginModel-> true) 1 谷歌包 2华为包 3 samsung包 4 vivo 包
|
||||
isGooglePlay : 0,
|
||||
//是否上报异常日志
|
||||
isUploadLog : true,
|
||||
|
1
lib_xiaomi_pay/.gitignore
vendored
Normal file
1
lib_xiaomi_pay/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
39
lib_xiaomi_pay/build.gradle
Normal file
39
lib_xiaomi_pay/build.gradle
Normal file
@ -0,0 +1,39 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply from: "../package_config.gradle"
|
||||
|
||||
android {
|
||||
namespace "com.shayu.lib_xiaomi_pay"
|
||||
compileSdk rootProject.ext.android.compileSdkVersion
|
||||
defaultConfig {
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
versionCode rootProject.ext.android.versionCode
|
||||
versionName rootProject.ext.android.versionName
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_18
|
||||
targetCompatibility JavaVersion.VERSION_18
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation rootProject.ext.dependencies["appcompat-androidx"]
|
||||
|
||||
//谷歌内购
|
||||
api ' implementation "com.xiaomi.billingclient:billing:1.1.3"'
|
||||
implementation 'com.android.billingclient:billing:7.1.0'
|
||||
|
||||
//implementation platform('com.google.firebase:firebase-bom:30.5.0')
|
||||
//implementation 'com.google.firebase:firebase-crashlytics'
|
||||
|
||||
}
|
0
lib_xiaomi_pay/consumer-rules.pro
Normal file
0
lib_xiaomi_pay/consumer-rules.pro
Normal file
30
lib_xiaomi_pay/proguard-rules.pro
vendored
Normal file
30
lib_xiaomi_pay/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
-ignorewarnings
|
||||
-keepattributes *Annotation*
|
||||
-keepattributes Exceptions
|
||||
-keepattributes InnerClasses
|
||||
-keepattributes Signature
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
-keep class com.huawei.hianalytics.**{*;}
|
||||
-keep class com.huawei.updatesdk.**{*;}
|
||||
-keep class com.huawei.hms.**{*;}
|
4
lib_xiaomi_pay/src/main/AndroidManifest.xml
Normal file
4
lib_xiaomi_pay/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</manifest>
|
@ -0,0 +1,129 @@
|
||||
package com.shayu.lib_xiaomi.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.billingclient.api.BillingClient;
|
||||
import com.android.billingclient.api.BillingClientStateListener;
|
||||
import com.android.billingclient.api.BillingFlowParams;
|
||||
import com.android.billingclient.api.BillingResult;
|
||||
import com.android.billingclient.api.Purchase;
|
||||
import com.android.billingclient.api.PurchasesUpdatedListener;
|
||||
import com.android.billingclient.api.SkuDetails;
|
||||
import com.android.billingclient.api.SkuDetailsParams;
|
||||
import com.android.billingclient.api.SkuDetailsResponseListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小米支付
|
||||
*/
|
||||
public class XiaomiBillingManage {
|
||||
private Activity mContext;
|
||||
private String TAG = "XiaomiBillingManage";
|
||||
BillingClient billingClient;
|
||||
public XiaomiBillingManage(Activity activity) {
|
||||
this.mContext = activity;
|
||||
}
|
||||
/**
|
||||
* 此监听器可接收应用中所有购买交易的更新
|
||||
*/
|
||||
private PurchasesUpdatedListener purchasesUpdatedListener = new PurchasesUpdatedListener() {
|
||||
@Override
|
||||
public void onPurchasesUpdated(BillingResult billingResult, List<Purchase> purchases) {
|
||||
// To be implemented in a later section.
|
||||
if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) {
|
||||
if (purchases != null && purchases.size() > 0) {
|
||||
//处理购买
|
||||
|
||||
}
|
||||
} else if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.USER_CANCELED) {
|
||||
//支付取消
|
||||
} else {
|
||||
//处理其他响应码
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 连接到Google Play Billing服务
|
||||
*/
|
||||
private final BillingClientStateListener billingClientStateListener = new BillingClientStateListener() {
|
||||
@Override
|
||||
public void onBillingServiceDisconnected() {
|
||||
Log.d("TAG", "onBillingServiceDisconnected");
|
||||
}
|
||||
@Override
|
||||
public void onBillingSetupFinished(BillingResult billingResult) {
|
||||
Log.d("TAG", "Service.code : " + billingResult.getResponseCode() + " msg : " + billingResult.getDebugMessage());
|
||||
if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 初始化小米支付
|
||||
* @param mContext
|
||||
*/
|
||||
public void initXiaomiPay(Context mContext) {
|
||||
billingClient = BillingClient.newBuilder(mContext).setListener(purchasesUpdatedListener).build();
|
||||
}
|
||||
|
||||
/**
|
||||
*建立连接
|
||||
*/
|
||||
public void connectXiaomiPay(){
|
||||
billingClient.startConnection(billingClientStateListener);
|
||||
//billingClient.launchBillingFlow(mContext,)
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断服务是否可用
|
||||
*/
|
||||
public boolean isReady(){
|
||||
if (billingClient == null) {
|
||||
return false;
|
||||
}
|
||||
return billingClient.isReady();
|
||||
}
|
||||
|
||||
public void querySkuList(){
|
||||
List<String> skuList = new ArrayList<>();
|
||||
skuList.add("Game-10");//以实际业务为准
|
||||
SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder();
|
||||
params.setSkusList(skuList).setType(BillingClient.SkuType.INAPP);
|
||||
billingClient.querySkuDetailsAsync(params.build(),
|
||||
new SkuDetailsResponseListener() {
|
||||
@Override
|
||||
public void onSkuDetailsResponse(@NonNull BillingResult billingResult,
|
||||
@Nullable List<SkuDetails> list) {
|
||||
Log.d("TAG", "onSkuDetailsResponse");
|
||||
if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) {
|
||||
if (list != null && list.size() > 0) {
|
||||
// get list
|
||||
Log.e("xiaomi_pay",list.get(0).getSubscriptionPeriod());
|
||||
|
||||
//创建BillingFlowParams对象
|
||||
BillingFlowParams params = BillingFlowParams.newBuilder()
|
||||
.setSkuDetails(list.get(0))
|
||||
.setIsOfferPersonalized(true)
|
||||
.setObfuscatedAccountId("xxx")
|
||||
.setObfuscatedProfileId("yyy")
|
||||
.build();
|
||||
BillingResult result = billingClient.launchBillingFlow(mContext, params);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -318,7 +318,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
WebViewActivity.forward(mContext, getIntent().getStringExtra("activityUrl"), true, false);
|
||||
}
|
||||
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2&&CommonAppConfig.IS_GOOGLE_PLAY!=4&&CommonAppConfig.IS_GOOGLE_PLAY!=5) {
|
||||
/* GoogleUtils.newInstance(MainActivity.this).setFirebaseTokenListener(MainActivity.this, new GoogleUtils.FirebaseTokenListener() {
|
||||
@Override
|
||||
public void onResultToken(String token) {
|
||||
|
@ -341,6 +341,7 @@ public class MainHttpUtil {
|
||||
public static void getSettingList(HttpCallback callback) {
|
||||
HttpClient.getInstance().get("User.getPerSetting", MainHttpConsts.GET_SETTING_LIST)
|
||||
.params("version", VersionUtil.getVersion())
|
||||
.params("package_name", "pdxy")
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
|
@ -92,6 +92,54 @@ android {
|
||||
isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
|
||||
]
|
||||
}
|
||||
vivo_test {
|
||||
dimension 'packageApk'
|
||||
if (project.getPluginManager().hasPlugin("com.android.application")) {
|
||||
applicationId "com.pdlive.shayu"
|
||||
}
|
||||
manifestPlaceholders = [
|
||||
serverHost : rootProject.ext.manifestPlaceholders.testServerHost,
|
||||
isGooglePlay : 4,
|
||||
isUploadLog : true,
|
||||
isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
|
||||
]
|
||||
}
|
||||
vivo_online {
|
||||
dimension 'packageApk'
|
||||
if (project.getPluginManager().hasPlugin("com.android.application")) {
|
||||
applicationId "com.pdlive.shayu"
|
||||
}
|
||||
manifestPlaceholders = [
|
||||
serverHost : rootProject.ext.manifestPlaceholders.serverHost,
|
||||
isGooglePlay : 4,
|
||||
isUploadLog : true,
|
||||
isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
|
||||
]
|
||||
}
|
||||
xiaomi_test {
|
||||
dimension 'packageApk'
|
||||
if (project.getPluginManager().hasPlugin("com.android.application")) {
|
||||
applicationId "com.pdlive.shayu"
|
||||
}
|
||||
manifestPlaceholders = [
|
||||
serverHost : rootProject.ext.manifestPlaceholders.testServerHost,
|
||||
isGooglePlay : 5,
|
||||
isUploadLog : true,
|
||||
isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
|
||||
]
|
||||
}
|
||||
xiaomi_online {
|
||||
dimension 'packageApk'
|
||||
if (project.getPluginManager().hasPlugin("com.android.application")) {
|
||||
applicationId "com.pdlive.shayu"
|
||||
}
|
||||
manifestPlaceholders = [
|
||||
serverHost : rootProject.ext.manifestPlaceholders.serverHost,
|
||||
isGooglePlay : 5,
|
||||
isUploadLog : true,
|
||||
isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -10,3 +10,4 @@ include ':IAP6Helper'
|
||||
include ':lib_faceunity'
|
||||
//include ':SVGAlibrary'
|
||||
include ':TabLayout'
|
||||
//include ':lib_xiaomi_pay'
|
||||
|
Loading…
Reference in New Issue
Block a user