File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/main/java/com/a494studios/koreanconjugator Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments