From 2015a22280f43612cf34baa09a374d9f42a99d73 Mon Sep 17 00:00:00 2001 From: Levin Li Date: Sun, 4 Aug 2024 22:37:44 -0700 Subject: [PATCH] Fix deprecation --- app/src/main/AndroidManifest.xml | 2 +- .../space/celestia/mobilecelestia/purchase/PurchaseModule.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b94e1841..c112ea1c 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -13,7 +13,7 @@ diff --git a/app/src/play/java/space/celestia/mobilecelestia/purchase/PurchaseModule.kt b/app/src/play/java/space/celestia/mobilecelestia/purchase/PurchaseModule.kt index 8e9bbc40..73d35a10 100644 --- a/app/src/play/java/space/celestia/mobilecelestia/purchase/PurchaseModule.kt +++ b/app/src/play/java/space/celestia/mobilecelestia/purchase/PurchaseModule.kt @@ -3,6 +3,7 @@ package space.celestia.mobilecelestia.purchase import android.content.Context import com.android.billingclient.api.BillingClient import com.android.billingclient.api.BillingResult +import com.android.billingclient.api.PendingPurchasesParams import com.android.billingclient.api.Purchase import com.android.billingclient.api.PurchasesUpdatedListener import dagger.Module @@ -34,7 +35,7 @@ class PurchaseModule { self.onPurchasesUpdated(p0, p1) } }) - .enablePendingPurchases() + .enablePendingPurchases(PendingPurchasesParams.newBuilder().enableOneTimeProducts().build()) .build() purchaseManager.billingClient = billingClient purchaseManager.connectToService()