Alipay+ Super App PlatformAlipay+ Super App Platform

Overview

The Android IAPASAP SDK provides custom components designed for compatibility with your super app environment. You can select these components based on the specific requirements of your application.

Step 1: Add annotation support

To add annotation support, you need to add the required dependencies first by taking the following steps:

  1. Add the dependencies in the app-level build.gradle file using the following code:
copy
// in app build.gradle
// if there are some conflicts with existing sdk, please exclude them
dependencies {
   kapt "com.alipay.plus.android:iapasap-apt:${asap_version}"
}
  1. Externalize the version number in the build.gradle file to easily manage upgrades using the following code:
copy
ext {
     asap_version = 'ASAP_VERSION'
}

Replace the value of ASAP_VERSION with the latest version number.

Step 2: Implement components

You must implement the following components:

Step 3: Register Components

The Android IAPASAP SDK provides two methods for registering components:

  • Register by annotation: Add annotations to the implementation class of each component.
copy
@AsapExtension(AsapLoggerExtensionProxy::class)
class Logger : AsapLoggerExtensionProxy {
    //.......
}
  • Register by code: Add annotations at the appropriate locations within your code to register the code.
copy
 AsapExtensionManager.register(AsapLoggerExtensionProxy::class,Logger::class)