This topic describes how to manually import the mPaaS configuration file into your project using the native AAR method.
Complete the three steps below in order:
Enter configuration information and upload a signed APK
-
On the application list page, click the application card — for example, the mPaaS Demo application created in the previous step — to open the product page.

The application name appears in the upper-left corner. Use this to switch between applications.
On the Product Details page, click Android Code Configuration to open the application configuration panel.
In the application configuration panel, click the Download Configuration File link to open the Code Configuration page.
-
On the Code Configuration page, enter the Package Name — for example, com.mpaas.demo — and upload the compiled, signed APK. To quickly generate a signed APK, see Generate a signed APK for the console.

Download the configuration to your local machine
On the Code Configuration page, click Download Configuration after entering the required information to download the mPaaS configuration file.
The configuration file is a compressed package. The package contains a .config file and an encrypted image named yw_1222.jpg.

Before proceeding, verify the package contents based on your deployment environment:
-
Public cloud: Open the
base64Codefield in the.configfile and confirm it is not empty. Theyw_1222.jpgfile is deprecated in public cloud environments — you can ignore it.
Apsara Stack: You do not need to check
base64Code. Instead, manually generate an Apsara Stack encrypted image and replace theyw_1222.jpgfile downloaded from the console. For instructions, see Generate an encrypted image (Apsara Stack configuration file).
Add the configuration file to your project
If you use the component-based method (Portal & Bundle), see Introduction to the component-based access procedure.
Prerequisites
To use the native AAR method, you must have a native development project.
Procedure
In Android Studio, open your existing project, then click mPaaS > Native AAR Access.
In the access panel, under Import App Configuration, click Start Import.
Select I have downloaded the configuration file (Ant-mpaas-xxxx.config) from the console and am ready to import it into the project, then click Next.
In the Import mPaaS Configuration File window, select the app module to import, choose the configuration file, then click Finish.
A confirmation message appears in Android Studio. You have now manually imported the configuration file.