# Quick start

> This topic introduces how to quickly set up the Alipay+ MPP Android SDK.

This topic introduces how to quickly set up the Alipay+ Android SDK.

## Before you begin

Before you get started, ensure that the following requirements are met:

-   Install or update Android Studio to a working version.
-   Use target API level 15 (ICE\_CREAM\_SANDWICH\_MR1) or later.
-   Use Gradle 4.1 or later.
-   Set up a physical device or use an emulator to run your app.

## Step 1: Add the SDK to your project

1.  Log on to [Alipay+ Developer Center](https://connect.alipayplus.com/account/signin?goto=https%3A%2F%2Fdevelopers.alipayplus.com%2Fopen%2Fconsole%2Fdeveloper%2Fapp%2Flist%3F_route%3DSG&terminal_type=pc&locale=cn&loginId=&from_site=GN) to download the SDK binaries as a package. You can also obtain the source code if you need to review or customize the SDK source code.

The following table lists the SDK packages that are required for different Alipay+ payment products:

| Product | Product | Merchant-presented Mode Payment | Auto Debit |
| --- | --- | --- | --- |
| aar | Foundational | - sdk-alipayplus.aar - iaptinylog.aar | - sdk-alipayplus.aar - iaptinylog.aar |
| aar | Product-specific | - sdk-mpm.aar | - sdk-autodebit.aar |

2.  Add the SDK binaries (the .aar files) to the _libs_ folder of your project.
3.  Add the following code to the _build.gradle_ file of your module.

```groovy
dependencies {

    implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"])

}
```

## Step 2: Set up the SDK before using other APIs

Configure the following parameters to set up the SDK before you use other APIs provided by the SDK.

```java
Configuration configuration = new Configuration();
configuration.envType = "PROD";
configuration.clientId = "XXX";
configuration.siteName = "YYY";
AlipayPlusClient.getInstance().setConfiguration(configuration);
```

> **Note**: When configuring the SDK in the sandbox environment, set _configuration.envType_ to `PROD`.

## Step 3: (Optional) Configure log monitoring

To track activity lifecycles within the SDK, initialize the monitoring component using the following code:

```java
// Listen to log type
IAPTinyLogger.setLogEnabledByType(true, IAPTinyLogType.LOG_TYPE_EVENT);
IAPTinyLogger.setLogEnabledByType(true, IAPTinyLogType.LOG_TYPE_EXCEPTION);
IAPTinyLogger.setLogEnabledByType(true, IAPTinyLogType.LOG_TYPE_DIAGNOSE);

// Setting up observer
IAPTinyLogger.addObserver(
    new ILogObserver() {
        @Override
        public void logger(IAPTinyLogger iapTinyLogger, IAPTinyLog iapTinyLog) {
            // Print iapTinyLog.name and iapTinyLog.parameters
        }
    }
);
```

## Next steps

After you have integrated the SDK, refer to the following guides to implement specific payment scenarios:

-   [Merchant-presented Mode Payment integration](../integration_merchant_mode_mpp/integration)
-   [Auto Debit integration](../integration_auto_debit_mpp/integration)