This topic describes how to integrate the Android client for the short video demo.
Prerequisites
The following table describes the environment requirements for development.
Category | Description |
System version | Android 4.3 or later. |
API version | 18 or greater. |
CPU architecture | ARM64 and ARMV7 are supported for physical devices. Emulators are not supported. |
Supported Android Studio versions | Android Studio 3.1 or later. Download Android Studio. |
You must integrate and start the server first. For more information, see Server-side integration.
Procedure
Download and decompress the short video demo. To download the Android demo, see Short Video SDK.
Directory structure
- demo - ApsaraVideoQuVideo - |- AlivcLittleVideo # Contains code related to the short video service. - |- AliyunCrop # The clipping module. Contains implementation code for the clipping interface. - |- AliyunEditor # The editor module. Contains implementation code for the editor interface. - |- AliyunFileDownLoader # Module for resource downloads and the database. - |- AliyunRecorder # Code for the recording interface. - |- AliyunSVideoBase # Contains custom views, utility classes, and more. - |- AliyunSvideoMusic # Module for the music interface. - |- AliyunVideoCommon # The common module, which contains utility classes. - |- thirdparty-lib # Contains third-party dependencies required by the demo. - SDK # The SDK used by the project. You can also import an SDK manually. - xxxReleaseNote.md # Release notes.Import and configure the project.
Open Android Studio, click Open an existing Android Studio project, and select the ./demo/ApsaraVideoQuVideo folder in the root directory of the Android source code.

Configure the server address.
File path: AlivcLittleVideo/src/main/java/com/aliyun/apsara/alivclittlevideo/constantsAlivcLittleServerApiConstants.java.
Set the
BASE_URLvariable to the public IP address of the Elastic Compute Service (ECS) instance that runs the server, and then add the port number 8080.Example: http://<Public IP address of the ECS instance>:8080.

Compile and run the project.
Connect a physical Android device to your computer using a data cable. On the device, enable Developer options and USB debugging in the system settings. After you approve the debugging request, select the device in Android Studio.
Click the build and run button. The app is then installed and runs on the physical Android device.
