Play Billing 6.0.0

This commit is contained in:
Björn Ritzl 2024-07-02 22:33:09 +02:00
parent 68ef7f4615
commit 195ef400b5
4 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,7 @@
dependencies {
implementation 'com.android.billingclient:billing:5.0.0'
repositories {
mavenCentral()
}
dependencies {
implementation 'com.android.billingclient:billing:6.0.0'
}

View File

@ -31,6 +31,7 @@ enum BillingResponse
BILLING_RESPONSE_RESULT_ERROR = 6,
BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED = 7,
BILLING_RESPONSE_RESULT_ITEM_NOT_OWNED = 8,
BILLING_RESPONSE_RESULT_NETWORK_ERROR = 9,
};
enum ProviderId

View File

@ -221,7 +221,6 @@ public class IapGooglePlay implements PurchasesUpdatedListener {
case BillingResponseCode.OK:
defoldResponse = IapJNI.BILLING_RESPONSE_RESULT_OK;
break;
case BillingResponseCode.SERVICE_TIMEOUT:
case BillingResponseCode.SERVICE_UNAVAILABLE:
case BillingResponseCode.SERVICE_DISCONNECTED:
defoldResponse = IapJNI.BILLING_RESPONSE_RESULT_SERVICE_UNAVAILABLE;
@ -229,6 +228,9 @@ public class IapGooglePlay implements PurchasesUpdatedListener {
case BillingResponseCode.USER_CANCELED:
defoldResponse = IapJNI.BILLING_RESPONSE_RESULT_USER_CANCELED;
break;
case BillingResponseCode.NETWORK_ERROR: // new in Play Billing Library 6.0.0
defoldResponse = IapJNI.BILLING_RESPONSE_RESULT_NETWORK_ERROR;
break;
case BillingResponseCode.FEATURE_NOT_SUPPORTED:
case BillingResponseCode.ERROR:
default:

View File

@ -18,6 +18,7 @@ public class IapJNI implements IListProductsListener, IPurchaseListener {
public static final int BILLING_RESPONSE_RESULT_ERROR = 6;
public static final int BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED = 7;
public static final int BILLING_RESPONSE_RESULT_ITEM_NOT_OWNED = 8;
public static final int BILLING_RESPONSE_RESULT_NETWORK_ERROR = 9;
public IapJNI() {
}