All Products
Search
Document Center

ApsaraVideo VOD:Integrate the upload SDK for Android

Last Updated:Nov 29, 2023

Before you use the upload SDK for Android to upload media files, you must integrate the SDK. This topic describes how to integrate the upload SDK for Android.

Prerequisites

  • Android 2.3 or a later version is used on your terminal device.

  • The upload SDK for Android in a version from 4.0 to 11.0 is used. API 14 is used for the upload SDK for Android V4.0 by default.

Usage notes

You can use the following methods to integrate the upload SDK for Android: by using remote dependencies and by using local JAR packages. You can use only one of the two methods to integrate the upload SDK for Android.

Use remote dependencies

  1. Add the dependencies of the upload SDK for Android to the app/build.gradle file of the project.

    dependencies {
        implementation 'com.aliyun.video.android:upload:1.6.5'
    }
  2. Add the URL of a Maven repository to the build.gradle file in the root directory.

    allprojects {
        repositories {
            maven { url "https://maven.aliyun.com/nexus/content/repositories/releases" }
        }
    }
  3. Install OSS SDK for Android.

    For more information, see Installation.

Use local JAR packages

  1. Download the upload SDK for Android.

    For more information, see SDK download. Decompress the SDK package and import the following JAR packages in the libs directory to the libs directory of the project: aliyun-vod-upload-android-sdk-xxx.jar, gson-xxx.jar, and jsr305-xxx.jar.

  2. Install OSS SDK for Android.

    For more information, see Installation.