-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
59 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
billinghelper/src/main/kotlin/com/vojtkovszky/billinghelper/BillingBuilderConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.vojtkovszky.billinghelper | ||
|
||
import com.android.billingclient.api.BillingClient | ||
import com.android.billingclient.api.UserChoiceBillingListener | ||
|
||
/** | ||
* Configuration used when building [BillingClient]. | ||
* | ||
* @param enableAlternativeBillingOnly build client with [BillingClient.Builder.enableAlternativeBillingOnly] | ||
* For more info see [https://developer.android.com/reference/com/android/billingclient/api/BillingClient.Builder#enableAlternativeBillingOnly()] | ||
* @param enableExternalOffer build client with [BillingClient.Builder.enableExternalOffer] | ||
* For more info see [https://developer.android.com/reference/com/android/billingclient/api/BillingClient.Builder#enableExternalOffer()] | ||
* @param enablePendingPurchasesOneTimeProducts build client [BillingClient.Builder.enablePendingPurchases] with pending purchase for one-time products enabled | ||
* For more info see [https://developer.android.com/reference/com/android/billingclient/api/PendingPurchasesParams.Builder#enableOneTimeProducts()] | ||
* @param enablePendingPurchasesPrepaidPlans build client [BillingClient.Builder.enablePendingPurchases] with pending purchase for prepaid plans enabled | ||
* For more info see [https://developer.android.com/reference/com/android/billingclient/api/PendingPurchasesParams.Builder#enablePrepaidPlans()] | ||
* @param userChoiceBillingListener build client with [BillingClient.Builder.enableUserChoiceBilling] and provide given listener. | ||
* For more info see [https://developer.android.com/reference/com/android/billingclient/api/UserChoiceBillingListener] | ||
* and [https://support.google.com/googleplay/android-developer/answer/13821247] | ||
*/ | ||
class BillingBuilderConfig( | ||
val enableAlternativeBillingOnly: Boolean = false, | ||
val enableExternalOffer: Boolean = false, | ||
val enablePendingPurchasesOneTimeProducts: Boolean = true, | ||
val enablePendingPurchasesPrepaidPlans: Boolean = true, | ||
val userChoiceBillingListener: UserChoiceBillingListener? = null | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters