Guide for integrating Baidu Swipe SDK V1.0 into Android apps, covering identity acquisition, loading, configuration, initialization, and SwipeMgr APIs.
The Swipe SDK for Android provides a set of APIs that enable developers to embed swipe‑based advertisements in their applications. This manual explains the required steps to obtain an ad identity, load the SDK package, configure the AndroidManifest, and initialize the library.
Key sections include permission requirements, required activities, ProGuard configuration, and the SwipeMgr interface for controlling the swipe feature. The document also lists supported Android versions and required dependencies on the DU Ad Platform SDK. This manual is written in Chinese.
| Supported Android versions | Android < 11 not supported; Android > 25 requires floating‑window permission |
|---|---|
| Required dependency | DU Ad Platform_SDK HW1.0.9.7 or CW1.0.9.6 |
| Required Android permissions | INTERNET, ACCESS_NETWORK_STATE, SYSTEM_ALERT_WINDOW, etc. |
The SDK does not work on Android versions lower than 11, and on versions higher than 25 it requires the floating‑window permission.
You need to add INTERNET, ACCESS_NETWORK_STATE, SYSTEM_ALERT_WINDOW, GET_TASKS, ACCESS_WIFI_STATE, CHANGE_WIFI_STATE, BLUETOOTH, BLUETOOTH_ADMIN, CHANGE_NETWORK_STATE, WRITE_SETTINGS, WRITE_EXTERNAL_STORAGE, and CAMERA permissions.
Add Swipe SDK‑Vx.x.aar and nineoldandroids.jar to the libs folder and reference them in build.gradle.
Call SwipeMgr.onAppStart(this) and then set the ad placement ID with SwipeMgr.getInstance().setAdSid(int pid) in the Application's onCreate method.