All Products
Search
Document Center

ApsaraVideo VOD:Initialize the short video SDK for Android

Last Updated:May 10, 2023

The core class of the short video SDK for Android is AlivcSdkCore. AlivcSdkCore serves as the entry point for all features of the SDK and allows you to debug features.

Before you begin

Make sure that the following operations are complete before you initialize the short video SDK for Android:

Initialization

You must perform the following operations to initialize the short video SDK for Android before you use the SDK. For more information, see AlivcSdkCore.

// Initialize the SDK.
bool result = AlivcSdkCore.register(Context context)
// If false is returned, the license failed to be initialized. Check whether the configurations of the license are correct.

Important

The short video SDK cannot be used if the license is disabled, invalid, or expired.

Logging

The short video SDK for Android provides the AlivcLogLevel class that allows you to generate different levels of logs. In a log file, you can filter the log content by using tag : AliYunLog.

// Enable the logging feature.
AlivcSdkCore.setLogLevel(AlivcLogLevel level)

// Set the path in which you want to store log files.
AlivcSdkCore.setLogPath(String path)

// Set the log level.
AlivcSdkCore.setDebugLoggerLevel(AlivcDebugLoggerLevel level)