diff --git a/CHANGELOG.md b/CHANGELOG.md index 59903b3..274aa49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # ChangeLog +## v1.6.0 + +Feature + +[Android] +- 升级 Google 结算库版本至 5.2.0 +- 适配 Android 13 (ApiLeve 33) + ## v1.5.1 Feature diff --git a/Documentation/README.md b/Documentation/README.md index 36938ad..2fde1b5 100644 --- a/Documentation/README.md +++ b/Documentation/README.md @@ -33,7 +33,7 @@ NSMicrophoneUsageDescription 麦克风,用于内嵌动态 { "dependencies": { "com.tds.sdk": "https://github.com/xindong/TAPSDK_UPM.git#1.2.3", - "com.tds.global": "https://github.com/xindong/TDS_GLOBAL_UPM.git#1.5.1" + "com.tds.global": "https://github.com/xindong/TDS_GLOBAL_UPM.git#1.6.0" } } ``` @@ -94,8 +94,6 @@ TDSGlobal Unity SDK会自动配置 iOS 相关依赖,但需要开发者确认 添加SDK权限 ```xml - - ``` @@ -509,7 +507,7 @@ writerHelper.WriteBelow(@"implementation fileTree(dir: 'libs', include: ['*.jar' implementation 'com.appsflyer:af-android-sdk:6.5.2' implementation 'com.adjust.sdk:adjust-android:4.24.1' implementation 'com.android.installreferrer:installreferrer:2.2' - implementation 'com.android.billingclient:billing:4.1.0' + implementation 'com.android.billingclient:billing:5.2.0' implementation 'androidx.annotation:annotation:1.2.0' implementation 'androidx.appcompat:appcompat:1.2.0' diff --git a/Plugins/Android/libs/TDSGlobalAccount_1.5.0.aar b/Plugins/Android/libs/TDSGlobalAccount_1.5.0.aar deleted file mode 100644 index 50db507..0000000 Binary files a/Plugins/Android/libs/TDSGlobalAccount_1.5.0.aar and /dev/null differ diff --git a/Plugins/Android/libs/TDSGlobalAccount_1.6.0.aar b/Plugins/Android/libs/TDSGlobalAccount_1.6.0.aar new file mode 100644 index 0000000..2db3184 Binary files /dev/null and b/Plugins/Android/libs/TDSGlobalAccount_1.6.0.aar differ diff --git a/Plugins/Android/libs/TDSGlobalAuthorization_1.5.0.aar.meta b/Plugins/Android/libs/TDSGlobalAccount_1.6.0.aar.meta similarity index 93% rename from Plugins/Android/libs/TDSGlobalAuthorization_1.5.0.aar.meta rename to Plugins/Android/libs/TDSGlobalAccount_1.6.0.aar.meta index 0f43d88..0947004 100644 --- a/Plugins/Android/libs/TDSGlobalAuthorization_1.5.0.aar.meta +++ b/Plugins/Android/libs/TDSGlobalAccount_1.6.0.aar.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9450a6ca30ca34d3f9e3c1028af9816e +guid: fe25be5a0f83e4998b0b99f21464e612 PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/Plugins/Android/libs/TDSGlobalArchitecture_1.5.0.aar b/Plugins/Android/libs/TDSGlobalArchitecture_1.5.0.aar deleted file mode 100644 index 978a720..0000000 Binary files a/Plugins/Android/libs/TDSGlobalArchitecture_1.5.0.aar and /dev/null differ diff --git a/Plugins/Android/libs/TDSGlobalArchitecture_1.6.0.aar b/Plugins/Android/libs/TDSGlobalArchitecture_1.6.0.aar new file mode 100644 index 0000000..c6cb14c Binary files /dev/null and b/Plugins/Android/libs/TDSGlobalArchitecture_1.6.0.aar differ diff --git a/Plugins/Android/libs/TDSGlobalAccount_1.5.0.aar.meta b/Plugins/Android/libs/TDSGlobalArchitecture_1.6.0.aar.meta similarity index 93% rename from Plugins/Android/libs/TDSGlobalAccount_1.5.0.aar.meta rename to Plugins/Android/libs/TDSGlobalArchitecture_1.6.0.aar.meta index 27d4861..9deb6b3 100644 --- a/Plugins/Android/libs/TDSGlobalAccount_1.5.0.aar.meta +++ b/Plugins/Android/libs/TDSGlobalArchitecture_1.6.0.aar.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1d94911c346d3476cb963f7b3fec096c +guid: 34588da93aa1a4baeb8519b9a2b224f6 PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/Plugins/Android/libs/TDSGlobalAuthorization_1.5.0.aar b/Plugins/Android/libs/TDSGlobalAuthorization_1.5.0.aar deleted file mode 100644 index 60c62a6..0000000 Binary files a/Plugins/Android/libs/TDSGlobalAuthorization_1.5.0.aar and /dev/null differ diff --git a/Plugins/Android/libs/TDSGlobalAuthorization_1.6.0.aar b/Plugins/Android/libs/TDSGlobalAuthorization_1.6.0.aar new file mode 100644 index 0000000..d079a77 Binary files /dev/null and b/Plugins/Android/libs/TDSGlobalAuthorization_1.6.0.aar differ diff --git a/Plugins/Android/libs/TDSGlobalCore_1.5.0.aar.meta b/Plugins/Android/libs/TDSGlobalAuthorization_1.6.0.aar.meta similarity index 93% rename from Plugins/Android/libs/TDSGlobalCore_1.5.0.aar.meta rename to Plugins/Android/libs/TDSGlobalAuthorization_1.6.0.aar.meta index 631e1ae..681b8ef 100644 --- a/Plugins/Android/libs/TDSGlobalCore_1.5.0.aar.meta +++ b/Plugins/Android/libs/TDSGlobalAuthorization_1.6.0.aar.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e2402674a4ec340fd814e41f5c0a4349 +guid: 04ff11663b2334727844217bb034a524 PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/Plugins/Android/libs/TDSGlobalCore_1.5.0.aar b/Plugins/Android/libs/TDSGlobalCore_1.5.0.aar deleted file mode 100644 index 0c76c47..0000000 Binary files a/Plugins/Android/libs/TDSGlobalCore_1.5.0.aar and /dev/null differ diff --git a/Plugins/Android/libs/TDSGlobalCore_1.6.0.aar b/Plugins/Android/libs/TDSGlobalCore_1.6.0.aar new file mode 100644 index 0000000..5a5a88f Binary files /dev/null and b/Plugins/Android/libs/TDSGlobalCore_1.6.0.aar differ diff --git a/Plugins/Android/libs/TDSGlobalArchitecture_1.5.0.aar.meta b/Plugins/Android/libs/TDSGlobalCore_1.6.0.aar.meta similarity index 93% rename from Plugins/Android/libs/TDSGlobalArchitecture_1.5.0.aar.meta rename to Plugins/Android/libs/TDSGlobalCore_1.6.0.aar.meta index 28e694f..da3f0a7 100644 --- a/Plugins/Android/libs/TDSGlobalArchitecture_1.5.0.aar.meta +++ b/Plugins/Android/libs/TDSGlobalCore_1.6.0.aar.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ca3ff8169517448b9bdc12166a38e8c4 +guid: fe3f5f9b847a04aa9a089e124c542732 PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/Plugins/Android/libs/TDSGlobalPay_1.5.0.aar b/Plugins/Android/libs/TDSGlobalPay_1.5.0.aar deleted file mode 100644 index 4bf9a60..0000000 Binary files a/Plugins/Android/libs/TDSGlobalPay_1.5.0.aar and /dev/null differ diff --git a/Plugins/Android/libs/TDSGlobalPay_1.5.0.aar.meta b/Plugins/Android/libs/TDSGlobalPay_1.5.0.aar.meta deleted file mode 100644 index 15d5e9f..0000000 --- a/Plugins/Android/libs/TDSGlobalPay_1.5.0.aar.meta +++ /dev/null @@ -1,32 +0,0 @@ -fileFormatVersion: 2 -guid: 2b80b3bf456d848bea03ee3b2f35764a -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 1 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/Android/libs/TDSGlobalPay_1.6.0.aar b/Plugins/Android/libs/TDSGlobalPay_1.6.0.aar new file mode 100644 index 0000000..d961f09 Binary files /dev/null and b/Plugins/Android/libs/TDSGlobalPay_1.6.0.aar differ diff --git a/Plugins/Android/libs/TDSGlobalPay_1.6.0.aar.meta b/Plugins/Android/libs/TDSGlobalPay_1.6.0.aar.meta new file mode 100644 index 0000000..12ab1c2 --- /dev/null +++ b/Plugins/Android/libs/TDSGlobalPay_1.6.0.aar.meta @@ -0,0 +1,32 @@ +fileFormatVersion: 2 +guid: 928a49b8732664eb5977e0d7fbd936f5 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Android: Android + second: + enabled: 1 + settings: {} + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Android/libs/TDSGlobalShare_1.5.0.aar b/Plugins/Android/libs/TDSGlobalShare_1.5.0.aar deleted file mode 100644 index 07e2ad1..0000000 Binary files a/Plugins/Android/libs/TDSGlobalShare_1.5.0.aar and /dev/null differ diff --git a/Plugins/Android/libs/TDSGlobalShare_1.5.0.aar.meta b/Plugins/Android/libs/TDSGlobalShare_1.5.0.aar.meta deleted file mode 100644 index c318149..0000000 --- a/Plugins/Android/libs/TDSGlobalShare_1.5.0.aar.meta +++ /dev/null @@ -1,32 +0,0 @@ -fileFormatVersion: 2 -guid: dd7febd80ce2c4fe7baa943a5fe7ef4d -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 1 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/Android/libs/TDSGlobalShare_1.6.0.aar b/Plugins/Android/libs/TDSGlobalShare_1.6.0.aar new file mode 100644 index 0000000..78a1c24 Binary files /dev/null and b/Plugins/Android/libs/TDSGlobalShare_1.6.0.aar differ diff --git a/Plugins/Android/libs/TDSGlobalShare_1.6.0.aar.meta b/Plugins/Android/libs/TDSGlobalShare_1.6.0.aar.meta new file mode 100644 index 0000000..b6c25b9 --- /dev/null +++ b/Plugins/Android/libs/TDSGlobalShare_1.6.0.aar.meta @@ -0,0 +1,32 @@ +fileFormatVersion: 2 +guid: 6b34b71d5f7c74c84976c4f40d985f0a +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Android: Android + second: + enabled: 1 + settings: {} + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Script/Editor/TDSAndroidPostBuildProcessor.cs b/Script/Editor/TDSAndroidPostBuildProcessor.cs index 4a615bd..bcbb101 100644 --- a/Script/Editor/TDSAndroidPostBuildProcessor.cs +++ b/Script/Editor/TDSAndroidPostBuildProcessor.cs @@ -81,7 +81,7 @@ public static bool GeneratedAndroidGradle(string projectPath) implementation 'com.appsflyer:af-android-sdk:6.5.2' implementation 'com.adjust.sdk:adjust-android:4.24.1' implementation 'com.android.installreferrer:installreferrer:2.2' - implementation 'com.android.billingclient:billing:4.1.0' + implementation 'com.android.billingclient:billing:5.2.0' implementation 'androidx.annotation:annotation:1.2.0' implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.recyclerview:recyclerview:1.2.1' @@ -193,7 +193,7 @@ delete rootProject.buildDir implementation 'com.appsflyer:af-android-sdk:6.5.2' implementation 'com.adjust.sdk:adjust-android:4.24.1' implementation 'com.android.installreferrer:installreferrer:2.2' - implementation 'com.android.billingclient:billing:4.1.0' + implementation 'com.android.billingclient:billing:5.2.0' implementation 'androidx.annotation:annotation:1.2.0' implementation 'androidx.appcompat:appcompat:1.2.0' diff --git a/Script/Runtime/TDSGlobalSkuDetail.cs b/Script/Runtime/TDSGlobalSkuDetail.cs index cacf1e2..ba418e0 100644 --- a/Script/Runtime/TDSGlobalSkuDetail.cs +++ b/Script/Runtime/TDSGlobalSkuDetail.cs @@ -88,56 +88,29 @@ public PriceLocale(Dictionary dic) [Serializable] public class TDSGlobalSkuDetail { + private string _originString; public string description; - - public string freeTrialPeriod; - - public string iconUrl; - - public string introductoryPrice; - - public long introductoryPriceAmountMicros; - - public int introductoryPriceCycles; - - public string originJson; - - public string originPrice; - - public long originPriceAmountMicors; - - public string price; - - public long priceAmountMicros; - - public string priceCurrencyCode; - + public string name; public string productId; - - public string subscriptionPeroid; - + public string productType; public string title; + public GoogleOneTimePurchaseOfferDetails googleOneTimePurchaseOfferDetails; - public string type; + public override string ToString() + { + return _originString; + } public TDSGlobalSkuDetail(Dictionary dic) { - this.description = SafeDictionary.GetValue(dic,"description"); - this.freeTrialPeriod = SafeDictionary.GetValue(dic,"freeTrialPeriod"); - this.iconUrl = SafeDictionary.GetValue(dic,"iconUrl"); - this.introductoryPrice = SafeDictionary.GetValue(dic,"introductoryPrice"); - this.introductoryPriceAmountMicros =SafeDictionary.GetValue(dic,"introductoryPriceAmountMicros"); - this.introductoryPriceCycles = SafeDictionary.GetValue(dic,"introductoryPriceCycles"); - this.originJson = SafeDictionary.GetValue(dic,"originJson"); - this.originPrice = SafeDictionary.GetValue(dic,"originPrice"); - this.originPriceAmountMicors = SafeDictionary.GetValue(dic,"originPriceAmountMicors"); - this.price = SafeDictionary.GetValue(dic,"price"); - this.priceAmountMicros = SafeDictionary.GetValue(dic,"priceAmountMicros"); - this.priceCurrencyCode = SafeDictionary.GetValue(dic,"priceCurrencyCode"); - this.productId = SafeDictionary.GetValue(dic,"productId"); - this.subscriptionPeroid = SafeDictionary.GetValue(dic,"subscriptionPeroid"); - this.title = SafeDictionary.GetValue(dic,"title"); - this.type = SafeDictionary.GetValue(dic,"type"); + if (dic == null) return; + _originString = SafeDictionary.GetValue(dic, "originString"); + description = SafeDictionary.GetValue(dic, "description"); + name = SafeDictionary.GetValue(dic, "name"); + productId = SafeDictionary.GetValue(dic, "productId"); + productType = SafeDictionary.GetValue(dic, "productType"); + title = SafeDictionary.GetValue(dic, "title"); + googleOneTimePurchaseOfferDetails = new GoogleOneTimePurchaseOfferDetails(SafeDictionary.GetValue>(dic, "googleOneTimePurchaseOfferDetails")); } @@ -146,6 +119,21 @@ public string ToJSON(){ } } + + [Serializable] + public class GoogleOneTimePurchaseOfferDetails + { + public string formattedPrice; + public long priceAmountMicros; + public string priceCurrencyCode; + + public GoogleOneTimePurchaseOfferDetails(Dictionary dic) + { + formattedPrice = SafeDictionary.GetValue(dic, "formattedPrice"); + priceAmountMicros = SafeDictionary.GetValue(dic, "priceAmountMicros"); + priceCurrencyCode = SafeDictionary.GetValue(dic, "priceCurrencyCode"); + } + } #elif UNITY_EDITOR public class TDSGlobalSkuDetail { diff --git a/package.json b/package.json index e745b99..9a06340 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,11 @@ "name": "com.tds.global", "displayName": "TDSGlobal", "description": "TapTap develop Service Global", - "version": "1.5.1", + "version": "1.6.0", "unity": "2018.3", "author": "tds-develop", "license": "MIT", "dependencies": { - "com.tds.sdk": "https://github.com/xindong/TAPSDK_UPM.git#1.1.9" + "com.tds.sdk": "https://github.com/xindong/TAPSDK_UPM.git#1.2.3" } } \ No newline at end of file