All Products
Search
Document Center

ApsaraVideo VOD:Integrate the Android SDK

Last Updated:Feb 10, 2026

This topic describes how to add the Android SDK dependency to a Gradle project.

Prerequisites

  • Your Android device runs Android 4.0 or later.

  • Supported Android versions: Android 4.0 (API level 14) and later.

Step 1: Install the Android SDK

Add the Android SDK dependency to the app/build.gradle file in your project.

dependencies {
    implementation 'com.aliyun.video.android:upload:1.7.4'
}

Add the Alibaba Cloud Maven repository URL to the build.gradle file in the root directory.

allprojects {
    repositories {
        maven { url "https://maven.aliyun.com/nexus/content/repositories/releases" }
    }
}

Step 2: Install the OSS Android SDK

The video-on-demand (VOD) Android upload SDK depends on the OSS Android SDK. Install the OSS Android SDK. For more information, see Install the OSS Android SDK. Add the dependency to your Gradle project as well.

Step 3: Configure obfuscation rules

Configure obfuscation in the obfuscation rules file (proguard-rules.pro). Example code:

-keep class com.aliyun.vod.jasonparse.**{*;}
-keep class com.aliyun.auth.model.**{*;}
-keep class com.aliyun.vod.qupaiokhttp.**{*;}
-keep class com.alibaba.sdk.android.vod.upload.model.**{*;}
-keep class com.aliyun.auth.core.AliyunVodErrorCode{*;}
-keep class com.alibaba.sdk.android.vod.upload.VODUploadClient{*;}
-keep class com.alibaba.sdk.android.vod.upload.VODUploadCallback{*;}
-keep class com.alibaba.sdk.android.vod.upload.VODSVideoUploadClient{*;}
-keep class com.alibaba.sdk.android.vod.upload.VODSVideoUploadCallback{*;}