All Products
Search
Document Center

ApsaraVideo Live:SDK integration

Last Updated:Jun 18, 2026

Integrate the Push SDK to enable live stream pushing in your Flutter application.

Prerequisites

Android Studio or Visual Studio Code is installed.

Environment requirements

Category

Requirement

Flutter version

Version 2.5.0 or later, but earlier than 3.0.0. Version 2.8.0 is recommended.

Dart version

Version 2.12.0 or later, but earlier than 3.0.0.

System Version

  • Android 5.0 or later.

  • iOS 10.0 or later.

CPU architecture

armeabi-v7a or arm64-v8a.

Development tools

Use Android Studio or Visual Studio Code.

Procedure

  1. Integrate the SDK.

    Choose one of the following methods:

    Add dependency

    Add the following dependency to the pubspec.yaml file of your local project:

    dependencies:
      flutter_livepush_plugin: ^x.y.z
    Note

    Replace x.y.z with the actual version number of the Push SDK, such as 7.1.0. For the latest version, see SDK download.

    Use command-line tool

    flutter pub add flutter_livepush_plugin

    This command automatically updates your pubspec.yaml file.

    Local Integration

    Create a plugins directory in your project and place the SDK in this directory. Then, add the following dependency to the pubspec.yaml file:

    flutter_livepush_plugin:
        path: "./plugins/flutter_livepush_plugin" // SDK storage path
    Note

    For latest SDK version, see SDK download.

  2. Run the following command to install the dependency.

    flutter pub get
  3. Add the required system permissions.

    Android

    Open the ./android/app/src/main/AndroidManifest.xml file and declare the required permissions. 

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />

    iOS

    Add camera and microphone access permissions to the Info.plist file of your project. 

    <key>NSCameraUsageDescription</key>
    <string>Authorize access to the camera for video streaming</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>Authorize access to the microphone for audio streaming</string>
  4. Configure other project settings. 

    In Android, add the following rules to the obfuscation rule file.

    Note

    If obfuscation is enabled for your application, you must configure obfuscation rules to prevent crashes. For the latest obfuscation configuration, see the demo source code. 

    -keep class org.webrtc.** { *; }
    -keep class com.alivc.** { *; }
    -keep class com.aliyun.** { *; }
    -keep class com.cicada.** { *; }
  5. Configure a license.

    To integrate a license, see License Integration Guide.

References