> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.qonversion.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Android SDK 7.x to 8.x migration guide

> We've upgraded the Google Play Billing Library dependency to version 7 in this release, leading to several changes in our SDK. These are described below.

## Upgrading version

Increase the dependency version in your app *build.gradle* file to upgrade your Qonversion SDK to the latest version

<CodeGroup>
  ```groovy build.gradle theme={null}
  dependencies {    
       implementation 'io.qonversion.android.sdk:sdk:8.+'
  }
  ```
</CodeGroup>

## Deployment upgrades

With the new Google Play Billing Library 7 we've increased our `minSdkVersion` to 21 and `targetSdkVersion` to 34.

If you were using lower `minSdkVersion` you should upgrade it to 21 to use the latest version of our SDK and Google Play Billing Library. If you have already targeted the 21+ version, you should do nothing.

## Installment plans support

In the latest library version, Google introduces installment plans, when a customer commits to pay for several subsequent subscription periods. In our release, we've added a new field `installmentPlanDetails` to `QProductOfferDetails` with the details of the installment plan if they exist. It contains the following information:

| Field                               | Type | Description                                                               |
| ----------------------------------- | ---- | ------------------------------------------------------------------------- |
| `commitmentPaymentsCount`           | Int  | Committed payments count after a user signs up for this subscription plan |
| `subsequentCommitmentPaymentsCount` | Int  | Subsequent committed payments count after this subscription plan renews   |

We've also added an `isInstallment` flag to `QProductStoreDetails` to check if the current product has an installment plan or not.

Below is an example of those fields usage:

<CodeGroup>
  ```java Java theme={null}
  Qonversion.getSharedInstance().products(new QonversionProductsCallback() {
    @Override
    public void onSuccess(@NonNull Map<String, QProduct> products) {
      QProduct installmentProduct = products.get("installmentProductId");
      if (installmentProduct == null) {
        // Product not found
        return;
      }

      QProductStoreDetails storeDetails = installmentProduct.getStoreDetails();
      if (storeDetails != null && storeDetails.isInstallment()) {
        QProductOfferDetails basePlan = storeDetails.getBasePlanSubscriptionOfferDetails();
        if (basePlan == null) {
          // No base plans exist
          return;
        }
        QProductInstallmentPlanDetails installmentPlanDetails = basePlan.getInstallmentPlanDetails();
        // Use the installment plan information
      }
    }

    @Override
    public void onError(@NonNull QonversionError error) {
  		// Handle error here
    }
  });
  ```

  ```kotlin Kotlin theme={null}
  Qonversion.shared.products(object : QonversionProductsCallback {
    override fun onSuccess(products: Map<String, QProduct>) {
      val installmentProduct = products["installmentProductId"]
      val storeDetails = installmentProduct?.storeDetails
      if (storeDetails?.isInstallment == true) {
        val installmentPlanDetails = storeDetails.basePlanSubscriptionOfferDetails?.installmentPlanDetails
        // Use the installment plan information
      }
    }

    override fun onError(error: QonversionError) {
  		// Handle error here
    }
  })
  ```
</CodeGroup>

## Fallback files

We're happy to introduce the fallback files support in this release to make our system reliability even higher. Fallback files allow your app to work as expected in rare cases of network connection or Qonversion API issues for new users without a cache available. This allows purchases and entitlements to be processed for new users even if the Qonversion API faces issues. This also makes it possible to receive remote configs for cases when the network connection is unavailable.

Read more about the fallback files in [the documentation](system-reliability#fallback-files).

## Error codes changes

In this release, we have renamed several `QonversionErrorCode` values to make them more clear.

| Old name              | New name                   |
| --------------------- | -------------------------- |
| `UnknownError`        | `Unknown`                  |
| `CanceledPurchase`    | `PurchaseCanceled`         |
| `ProductUnavailable`  | `StoreProductNotAvailable` |
| `ParseResponseFailed` | `ResponseParsingFailed`    |

If you were using any of the mentioned codes, please, update the names with the right column values.

## The other changes

* Pending purchases support was added for prepaid subscriptions.
* `QIntroEligibilityStatus` `NonIntroProduct` was renamed to `NonIntroOrTrialProduct` to better reflect the meaning.

***

[\[Jul 2024\] Migration guide. Google Play Billing Library 7.](jan-2024-migration-guide-google-play-billing-library-6-copy)

[Flutter SDK 8.x to 9.x migration guide](flutter-9-migration-guide)
