The initialization process includes the following steps:
Initialize mPaaS
This tutorial uses native Android Archive (AAR) integration. You must initialize mPaaS.
In your project, create a new class named
MyApplication. Add the following code to the class:public class MyApplication extends Application { @Override public void onCreate() { super.onCreate(); MP.init(this, MPInitParam.obtain().setCallback(new MPInitParam.MPCallback() { @Override public void onInit() { // Initialize the mini program public resource package. H5Utils.setProvider(H5AppCenterPresetProvider.class.getName(),new TinyAppCenterPresetProvider()); } }) ); } }For more information, see Initialize mPaaS.
Open the
AndroidManifest.xmlfile. In the<application>tag, add the following code to specify the Application class.android:name=".MyApplication"
Configure mini program signature verification
In your Android project, create a
custom_config.jsonfile in theassets/configdirectory.Add the following code to the file:
[ { "value": "NO", "key": "h5_shouldverifyapp" } ]Set the value to "NO" to disable mini program signature verification or "YES" to enable it. If you do not specify a value, the default is "YES". You can disable signature verification during development and testing for faster integration. However, you must enable signature verification before you publish the app. For more information about how to configure mini program package signature verification, see Configure mini program packages.
Configure AndroidManifest
Because this tutorial uses native AAR integration, you must add the following configuration to the AndroidManifest.xml file:
<application>
···
<meta-data android:name="nebula.android.meta.enable" android:value="true"/>
···
</application>Request the UC kernel
Due to a policy change, the UC kernel is no longer available for public application. As of December 1, 2022, we no longer accept public applications for UC Keys. You must submit a UC Key application form. Our staff will review your application and notify you of the result.
Click mPaaS > Basic Tools > Generate UC Key Signature Information to open the Query Signature Information window.
In the Query Signature Information window, enter the required configuration information and click Next.
Copy the generated SHA1 information.

Add the Key that you obtained in the previous step to your project's
AndroidManifest.xmlfile:<meta-data android:name="UCSDKAppKey" android:value="The Key you obtained"/>NoteThe UC SDK authorization information is bound to the APK's package name and signature. Therefore, if UCWebView does not work, check that the signature and package name match the information that you provided in your application.
You have now completed the initialization configurations.