Initialize mPaaS configuration
This tutorial describes how to integrate the Content Delivery component using the native AAR method. After you add the Content Delivery software development kit (SDK), you must initialize mPaaS.
Initialize mPaaS
Create a
MyApplicationclass in your project.Add the following code to the
MyApplicationclass.public class MyApplication extends Application { @Override public void onCreate() { super.onCreate(); // Initialize mPaaS MP.init(this); } }For more information, see Initialize mPaaS.
Add Manifest configuration
If your baseline version is earlier than 10.1.68.18, you can skip this step.
Starting from version 10.1.68.18, the Content Delivery component no longer pulls ad slots and campaigns by default when a process starts. To enable automatic initialization, add the following configuration to the AndroidManifest file:
<meta-data android:name="com.mpaas.cdp.autoInit" android:value="true" />If you upgrade from an earlier baseline version to 10.1.68.18, you must manually add the configuration to the AndroidManifest file to ensure that the feature works correctly.
This completes the initialization of the Content Delivery component. You can now use the console to visually configure custom dynamic ad slots and marketing campaigns.
Before you configure ad slots, ensure that you have developed the app page where the ad slots will be located.
Integrate related component SDKs
The Content Delivery component uses the user segmentation feature of the Mobile Analysis service and the push feature of the Message Push service to deliver personalized and targeted in-app ads for precision marketing. Therefore, you must also integrate the Mobile Analysis and Message Push components before you use the Content Delivery component.
For more information, see Integrate the Mobile Analysis component.
For more information, see Integrate the Message Push component.
What to do next
You can configure preset ad slots or create dynamic ad slots as needed.