Skip to content

Commit

Permalink
- isOfferAvailable(basePlanId, offerId): Checks if a specific offer i…
Browse files Browse the repository at this point in the history
…s available for a given base plan ID and offer ID.

- wasPremiumUser(): Determines if the user has ever purchased a premium product or subscription.
- getPurchasedPlansHistory(): Fetches the user’s purchase history of premium products and subscriptions
- isPremiumUser: Checks the user’s current premium status based on active in-app purchases or subscriptions **(No need to maintain a separate SharedPreferences)**
- getInAppProductPriceById(inAppProductId): Retrieves price information for a specific in-app product.
- Improved error handling with clearer messages for unsupported products and missing purchase tokens.
- Refined logging to provide more informative output during billing operations.
  • Loading branch information
hannanshahid committed Nov 14, 2024
1 parent f1baa48 commit 316cae1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Add Funsol Billing Helper dependencies in App level build.gradle.
```kotlin

dependencies {
implementation 'com.github.Funsol-Projects:Funsol-Billing-Helper:v2.0.0'
implementation 'com.github.Funsol-Projects:Funsol-Billing-Helper:v2.0.1'
}

```
Expand Down
4 changes: 2 additions & 2 deletions funsol-billing-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ afterEvaluate {
from components.release
groupId = 'com.github.Funsol-Projects'
artifactId = 'Funsol-Billing-Helper'
version = 'v2.0.0'
version = 'v2.0.1'
}
debug(MavenPublication) {
from components.debug
groupId = 'com.github.Funsol-Projects'
artifactId = 'Funsol-Billing-Helper'
version = 'v2.0.0'
version = 'v2.0.1'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ class FunSolBillingHelper(private val context: Context) {
purchasesDeferred.await()
// Notify the listener on the Main thread
logFunsolBilling("Billing client is ready")
billingClientListener?.onClientReady()
updatePremiumStatus(context = context)
billingClientListener?.onClientReady()
}

} else if (billingResult.responseCode == BillingClient.BillingResponseCode.BILLING_UNAVAILABLE) {
Expand Down

0 comments on commit 316cae1

Please sign in to comment.