Upgrading ONE store IAP to V21

Upgrade from v19 to v21

Change the Library

ONE store In-App Purchase (IAP) SDK provides distribution through maven from v21. If you want to use the IAP library through maven, you must make the following changes:

  • Delete the v19 AAR file.

    • Delete the iap_sdk-v19.XX.XX.aar file in the libs folder of the project.

  • Add maven dependencies.

    • Register the ONE store maven address in the project top-level build.gradle file.

      
      allprojects {
      repositories {
      ...
      maven { url 'https://repo.onestore.co.kr/repository/onestore-sdk-public' }
      }
      }
    • Add ONE store payment library dependencies to the app's build.gradle file.

      
      dependencies {
      def onestore_iap_version = "21.00.00"
      implementation "com.onestorecorp.sdk:sdk-iap:$onestore_iap_version"
      }
      

Change the json File

ONE store has provided essential params for use in SDK from IAP SDK v19 through global-appstores.json. Starting from v21, we are distributing these values to maven to make them more convenient. To change the content, please follow the steps below:

  • Delete global-appstores.json

    • Delete the global-appstores.json file in the assets folder of the project

  • Add maven dependencies

    • Register the ONE store maven address in the project top-level's build.gradle file.

      
      allprojects {
      repositories {
      ...
          maven { url 'https://repo.onestore.co.kr/repository/onestore-sdk-public' }
      }
      }
      
    • Add ONE store payment library dependencies to the app's build.gradle file.

      
      dependencies {
      def onestore_configuration_version = "1.0.0"
      implementation "com.onestorecorp.sdk:sdk-configuration-kr:$onestore_configuration_version"
      }
      

Edit Deprecated Items

The following items have been deprecated in v21 SDK. There is no problem using it. However, changes are required for smooth use in the future.

  • Interface

    name

    description

    PurchasesListener

    Starting from v21, please use QueryPurchasesListener instead of PurchasesListener

  • Method

    class

    method name

    description

    PurchaseClient

    manageRecurringProductAsync

    Starting from v21, Subscription products are supported instead of Monthly auto-renewal products, and these functions are supported through the regular payment menu. In the case of the subscriptions menu, monthly auto-renewal products are not supported, so reservation/cancellation must be provided before using the API. Subscription products must be implemented to guide the users to the subscription menu.

    launchLoginFlowAsync

    The authentication-related flow is separated into separate classes. For details, please refer to the InApp Auth Implementation Guide

Upgrade from v17 to v21

Change the Payment Library

Upgrading from v17 to v21 changes the library from jar to aar. Developers using the v17 library must upgrade from 19 to v21 through the guide and change to maven. Then, additional work (deleting meta-data) is required on the part that has changed from jar to aar distribution.

  • Delete v17 jar library

    • Delete the jar file in the libs folder of the project.

  • Delete the following meta-data in AndroidManifest

    
    <meta-data android:name="iap:api_version" android:value="5"/>
    
  • Add maven dependencies: Note for upgrading from v19 to v21

Add Json File Dependencies

From v19 and above, the json file is required for the operation of SDK. Please refer to Upgrading from v19 to v21 > Change the json file > Add maven dependencies to add dependencies to the project.

Edit Changes

Please refer to the ONE store In-App Purchase SDK upgrade guide to edit changes.

Last updated