Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Chargebee Android (Legacy)
=============

> [!NOTE]
> #### Updates for Billing Library 5
> - SDK Version 2.0: This version includes Google Billing Library 6.2.1 but still uses Google Billing Library 5.0 APIs to fetch product information from the Google Play Console and make purchases. If you’re integrating Chargebee’s SDK for the first time, then use this version, and if you’re migrating from the older version of SDK to this version, follow the migration steps in this [document](https://www.chargebee.com/docs/2.0/mobile-playstore-billing-library-5.html).
> - SDK Version 1.2.2: This [version](https://github.com/chargebee/chargebee-android/tree/1.x.x) includes Billing Library 6.2.1 but still uses Billing Library 4.0 APIs to fetch product information from the Google Play Console and make purchases. This will enable you to list or update your Android app on the store without any warnings from Google and give you enough time to migrate to version 2.0.
> #### Updates for Billing Library 5 and above
> - SDK Version 2.0: This version includes Google Billing Library 7.1.1 but still uses Google Billing Library 5.0 APIs to fetch product information from the Google Play Console and make purchases. If you’re integrating Chargebee’s SDK for the first time, then use this version, and if you’re migrating from the older version of SDK to this version, follow the migration steps in this [document](https://www.chargebee.com/docs/2.0/mobile-playstore-billing-library-5.html).
> - SDK Version 1.2.4: This [version](https://github.com/chargebee/chargebee-android/tree/1.x.x) includes Billing Library 7.1.1 but still uses Billing Library 4.0 APIs to fetch product information from the Google Play Console and make purchases. This will enable you to list or update your Android app on the store without any warnings from Google and give you enough time to migrate to version 2.0.
> - SDK Version 1.1.0: This and less than this version of SDKs use billing library 4.0 APIs that are deprecated by Google. Therefore, it is highly recommended that you upgrade your app and integrate it with SDK version 1.2.0 and above.


Expand Down Expand Up @@ -499,7 +499,7 @@ Chargebee is available under the [MIT license](https://opensource.org/licenses/M
To install Chargebee's Android SDK, add the following dependency to the build.gradle file.

```
implementation 'com.chargebee:chargebee-android:1.0.25'
implementation 'com.chargebee:chargebee-android:1.2.4'
```
Example project
---------------
Expand Down
4 changes: 2 additions & 2 deletions chargebee/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 21
targetSdkVersion 31
versionCode 1
versionName "2.0.0-beta-4"
versionName "2.0.0-beta-5"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down Expand Up @@ -41,7 +41,7 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

// Google play billing library
implementation 'com.android.billingclient:billing-ktx:6.2.1'
implementation 'com.android.billingclient:billing-ktx:7.1.1'

// AssertJ
testImplementation "org.assertj:assertj-core:$assertj_version"
Expand Down
2 changes: 1 addition & 1 deletion chargebee/src/main/java/com/chargebee/android/Chargebee.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ object Chargebee {
var appName: String = "Chargebee"
var environment: String = "cb_android_sdk"
const val platform: String = "Android"
const val sdkVersion: String = "2.0.0-beta-4"
const val sdkVersion: String = "2.0.0-beta-5"
const val limit: String = "100"
private const val PLAY_STORE_SUBSCRIPTION_URL =
"https://play.google.com/store/account/subscriptions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import com.chargebee.android.models.PricingPhase
import com.chargebee.android.models.PurchaseProductParams
import com.chargebee.android.models.PurchaseTransaction
import com.chargebee.android.models.SubscriptionOffer
import com.chargebee.android.models.PendingPurchasesParams
import com.chargebee.android.network.CBReceiptResponse
import com.chargebee.android.restore.CBRestorePurchaseManager
import java.util.concurrent.ConcurrentLinkedQueue
Expand Down Expand Up @@ -572,7 +573,7 @@ class BillingClientManager(context: Context) : PurchasesUpdatedListener {
private fun buildBillingClient(listener: PurchasesUpdatedListener): BillingClient? {
if (billingClient == null) {
billingClient = mContext?.let {
BillingClient.newBuilder(it).enablePendingPurchases().setListener(listener)
BillingClient.newBuilder(it).enablePendingPurchases(PendingPurchasesParams.newBuilder().enableOneTimeProducts().build()).setListener(listener)
.build()
}
}
Expand Down
Loading