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
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' }
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" } } }
Install OSS SDK for Android.
For more information, see Installation.
Use local JAR packages
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.
Install OSS SDK for Android.
For more information, see Installation.