commit
4887201120
6 changed files with 22 additions and 10 deletions
|
@ -12,8 +12,8 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
// versionCode and versionName must be hardcoded to support F-droid
|
||||
versionCode 800081
|
||||
versionName '8.0.8'
|
||||
versionCode 800091
|
||||
versionName '8.0.9'
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
multiDexEnabled true
|
||||
|
|
|
@ -8,8 +8,8 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
// versionCode and versionName must be hardcoded to support F-droid
|
||||
versionCode 800081
|
||||
versionName '8.0.8'
|
||||
versionCode 800091
|
||||
versionName '8.0.9'
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
|
|
|
@ -6,8 +6,8 @@ android {
|
|||
compileSdkVersion 30
|
||||
|
||||
defaultConfig {
|
||||
versionCode 800081
|
||||
versionName '8.0.8'
|
||||
versionCode 800091
|
||||
versionName '8.0.9'
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ android {
|
|||
compileSdkVersion 30
|
||||
|
||||
defaultConfig {
|
||||
versionCode 800081
|
||||
versionName '8.0.8'
|
||||
versionCode 800091
|
||||
versionName '8.0.9'
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package dev.lucasnlm.external
|
|||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import com.android.billingclient.api.AcknowledgePurchaseParams
|
||||
import com.android.billingclient.api.BillingClient
|
||||
import com.android.billingclient.api.BillingClientStateListener
|
||||
import com.android.billingclient.api.BillingFlowParams
|
||||
|
@ -30,6 +31,17 @@ class BillingManager(
|
|||
when (it?.purchaseState) {
|
||||
Purchase.PurchaseState.PURCHASED, Purchase.PurchaseState.PENDING -> true
|
||||
else -> false
|
||||
}.also { purchased ->
|
||||
if (purchased && it?.isAcknowledged == false) {
|
||||
val acknowledgePurchaseParams =
|
||||
AcknowledgePurchaseParams.newBuilder()
|
||||
.setPurchaseToken(it.purchaseToken)
|
||||
.build()
|
||||
|
||||
billingClient.acknowledgePurchase(acknowledgePurchaseParams) {
|
||||
// Purchase acknowledged
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
// versionCode and versionName must be hardcoded to support F-droid
|
||||
versionCode 800081
|
||||
versionName '8.0.8'
|
||||
versionCode 800091
|
||||
versionName '8.0.9'
|
||||
applicationId 'dev.lucasnlm.antimine'
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 30
|
||||
|
|
Loading…
Reference in a new issue