The audio and video terminal SDK provides a centralized license management service that allows you to manage licenses for Android and iOS applications. The processes of obtaining licenses for different modules are integrated into a unified process. This effectively reduces the integration difficulty. This topic describes the prerequisites for using a license for the audio and video terminal SDK and how to connect to an application.

Prerequisites

A license is registered. If you have not registered a license, register a license and obtain the license key and license.crt file. For more information about how to register a license, see Obtain a license.
Important
  • Keep the license key and license.crt file properly after registration. If you do not provide a correct license key or license.crt file when you connect to an application, an error message appears.
  • Only the latest license.crt file is used for each application within a UID even if you submit multiple requests to obtain licenses for the application. You can use different metadata.

Connect to an Android application

  1. Recommended. Copy the license.crt file to the assets directory in the Android Studio project.
    Note You can also copy the license.crt file to a sandbox or another directory. Make sure that the value corresponding to AlivcLicenseFile in Step 2 is the same as the path of the license.crt file.
  2. Add the following metadata to the AndroidManifest.xml file:
    • If the key is com.aliyun.alivc_license.licensekey, the value is your license key. The key must be in lowercase letters. Example:
      <meta-data
          android:name="com.aliyun.alivc_license.licensekey"
          android:value="<your licenseKey>" />
    • If the key is com.aliyun.alivc_license.licensefile, the value is the path in which the license.crt file is stored. The key must be in lowercase letters. Example:
      <meta-data
          android:name="com.aliyun.alivc_license.licensefile"
          android:value="assets/license.crt" />
    Code

Connect to an iOS application

  1. Recommended. Copy the license.crt file to the AppSupportFiles directory in the Xcode project and add the file in Copy Bundle Resources on the Build Phases tab.
    Note You can also copy the license.crt file to another directory on the device. Make sure that the value corresponding to com.aliyun.alivc_license.licensefile in Step 2 is the same as the path of the license.crt file.
  2. Add the AlivcLicenseFile or AlivcLicenseFile field to the info.plist file.
    • If the key is AlivcLicenseKey, the value is your license key. Example:
      <key>AlivcLicenseKey</key>
      <string>Wo8stiG49mZsBReN8a089ddc9989f41b79fa729cbffef****</string>
    • If the key is AlivcLicenseFile, the value is the path in which the license.crt file is stored. Example:
      <key>AlivcLicenseFile</key>
      <string>license.crt</string>