Skip to content

Commit

Permalink
feat: upgrade Google Billing Pay version to 5.2.0; adapt Android Api …
Browse files Browse the repository at this point in the history
…Level 33
  • Loading branch information
RoongfLee committed Aug 22, 2023
1 parent 612de6d commit 0036b4b
Show file tree
Hide file tree
Showing 25 changed files with 113 additions and 119 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# ChangeLog

## v1.6.0

Feature

[Android]
- 升级 Google 结算库版本至 5.2.0
- 适配 Android 13 (ApiLeve 33)

## v1.5.1

Feature
Expand Down
6 changes: 2 additions & 4 deletions Documentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
```
Expand Down Expand Up @@ -94,8 +94,6 @@ TDSGlobal Unity SDK会自动配置 iOS 相关依赖,但需要开发者确认
添加SDK权限

```xml
<!-- 添加权限 -->
<uses-permission android:name="com.android.vending.BILLING"/>
<!-- 获取用户设备信息用 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
```
Expand Down Expand Up @@ -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'
Expand Down
Binary file removed Plugins/Android/libs/TDSGlobalAccount_1.5.0.aar
Binary file not shown.
Binary file added Plugins/Android/libs/TDSGlobalAccount_1.6.0.aar
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed Plugins/Android/libs/TDSGlobalArchitecture_1.5.0.aar
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed Plugins/Android/libs/TDSGlobalCore_1.5.0.aar
Binary file not shown.
Binary file added Plugins/Android/libs/TDSGlobalCore_1.6.0.aar
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed Plugins/Android/libs/TDSGlobalPay_1.5.0.aar
Binary file not shown.
32 changes: 0 additions & 32 deletions Plugins/Android/libs/TDSGlobalPay_1.5.0.aar.meta

This file was deleted.

Binary file added Plugins/Android/libs/TDSGlobalPay_1.6.0.aar
Binary file not shown.
32 changes: 32 additions & 0 deletions Plugins/Android/libs/TDSGlobalPay_1.6.0.aar.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed Plugins/Android/libs/TDSGlobalShare_1.5.0.aar
Binary file not shown.
32 changes: 0 additions & 32 deletions Plugins/Android/libs/TDSGlobalShare_1.5.0.aar.meta

This file was deleted.

Binary file added Plugins/Android/libs/TDSGlobalShare_1.6.0.aar
Binary file not shown.
32 changes: 32 additions & 0 deletions Plugins/Android/libs/TDSGlobalShare_1.6.0.aar.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Script/Editor/TDSAndroidPostBuildProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down
74 changes: 31 additions & 43 deletions Script/Runtime/TDSGlobalSkuDetail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,56 +88,29 @@ public PriceLocale(Dictionary<string,object> 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<string,object> dic)
{
this.description = SafeDictionary.GetValue<string>(dic,"description");
this.freeTrialPeriod = SafeDictionary.GetValue<string>(dic,"freeTrialPeriod");
this.iconUrl = SafeDictionary.GetValue<string>(dic,"iconUrl");
this.introductoryPrice = SafeDictionary.GetValue<string>(dic,"introductoryPrice");
this.introductoryPriceAmountMicros =SafeDictionary.GetValue<long>(dic,"introductoryPriceAmountMicros");
this.introductoryPriceCycles = SafeDictionary.GetValue<int>(dic,"introductoryPriceCycles");
this.originJson = SafeDictionary.GetValue<string>(dic,"originJson");
this.originPrice = SafeDictionary.GetValue<string>(dic,"originPrice");
this.originPriceAmountMicors = SafeDictionary.GetValue<long>(dic,"originPriceAmountMicors");
this.price = SafeDictionary.GetValue<string>(dic,"price");
this.priceAmountMicros = SafeDictionary.GetValue<long>(dic,"priceAmountMicros");
this.priceCurrencyCode = SafeDictionary.GetValue<string>(dic,"priceCurrencyCode");
this.productId = SafeDictionary.GetValue<string>(dic,"productId");
this.subscriptionPeroid = SafeDictionary.GetValue<string>(dic,"subscriptionPeroid");
this.title = SafeDictionary.GetValue<string>(dic,"title");
this.type = SafeDictionary.GetValue<string>(dic,"type");
if (dic == null) return;
_originString = SafeDictionary.GetValue<string>(dic, "originString");
description = SafeDictionary.GetValue<string>(dic, "description");
name = SafeDictionary.GetValue<string>(dic, "name");
productId = SafeDictionary.GetValue<string>(dic, "productId");
productType = SafeDictionary.GetValue<string>(dic, "productType");
title = SafeDictionary.GetValue<string>(dic, "title");
googleOneTimePurchaseOfferDetails = new GoogleOneTimePurchaseOfferDetails(SafeDictionary.GetValue<Dictionary<string, object>>(dic, "googleOneTimePurchaseOfferDetails"));
}


Expand All @@ -146,6 +119,21 @@ public string ToJSON(){
}

}

[Serializable]
public class GoogleOneTimePurchaseOfferDetails
{
public string formattedPrice;
public long priceAmountMicros;
public string priceCurrencyCode;

public GoogleOneTimePurchaseOfferDetails(Dictionary<string, object> dic)
{
formattedPrice = SafeDictionary.GetValue<string>(dic, "formattedPrice");
priceAmountMicros = SafeDictionary.GetValue<long>(dic, "priceAmountMicros");
priceCurrencyCode = SafeDictionary.GetValue<string>(dic, "priceCurrencyCode");
}
}
#elif UNITY_EDITOR
public class TDSGlobalSkuDetail
{
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 0036b4b

Please sign in to comment.