Skip to content

Commit b4f5a1a

Browse files
renovate[bot]renovate-botNinjaman494
authored
Update dependency com.android.billingclient:billing to v4 (#75)
* Update dependency com.android.billingclient:billing to v4 * Update dependency com.android.billingclient:billing to v4 * Updated getSku to getSkus Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Akash Eldo <akasheldo@hotmail.com>
1 parent 400a7a0 commit b4f5a1a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ dependencies {
145145
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
146146

147147
// Google Play Billing
148-
implementation 'com.android.billingclient:billing:3.0.1'
148+
implementation 'com.android.billingclient:billing:4.0.0'
149149

150150
// Testing dependencies
151151
implementation 'androidx.test.espresso:espresso-contrib:3.4.0' // Needed for idler

app/src/main/java/com/a494studios/koreanconjugator/CustomApplication.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void onBillingSetupFinished(@NotNull BillingResult billingResult) {
7474
billingClient.queryPurchaseHistoryAsync(BillingClient.SkuType.INAPP, (result, list) -> {
7575
if (result.getResponseCode() == BillingClient.BillingResponseCode.OK) {
7676
System.out.println("Got Ad Free from purchases");
77-
isAdFree = list.size() > 0 && list.get(0).getSku().equals(Utils.SKU_AD_FREE);
77+
isAdFree = list.size() > 0 && list.get(0).getSkus().get(0).equals(Utils.SKU_AD_FREE);
7878
Utils.setAdFree(getApplicationContext(), isAdFree);
7979
} else {
8080
System.out.println("Error occurred when fetching purchase history:" + result.getDebugMessage());
@@ -140,7 +140,7 @@ public boolean isAdFree() {
140140
@Override
141141
public void onPurchasesUpdated(@NotNull BillingResult billingResult, @Nullable List<Purchase> list) {
142142
if(billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK
143-
&& !list.isEmpty() && list.get(0).getSku().equals(Utils.SKU_AD_FREE)) {
143+
&& !list.isEmpty() && list.get(0).getSkus().get(0).equals(Utils.SKU_AD_FREE)) {
144144

145145
if(list.get(0).getPurchaseState() == Purchase.PurchaseState.PURCHASED) {
146146
AcknowledgePurchaseParams consumeParams = AcknowledgePurchaseParams

0 commit comments

Comments
 (0)