400-881-9892

文档中心

官方文档,可查阅产品介绍、快速入门、用户指南、开发指南、API参考、SDK参考、帮助等信息。

文档中心 互动课堂

Getting Started Example

    As you read this document, we assume that you have basic experience in Android app development and can understand related foundational concepts.

    Environment Preparation
    • Android Studio 3.0 or above, Android minSdkVersion: 15, Gradle: 4.2 or above
    Importing the SDK and Initialization
    1. Place the CLASSROOMSDK.AAR into the LIBS directory of your project
    2. Add the SDK component dependency in the APP/BUILD.GRADLE file.
      1
      2
      3
      dependencies {
          implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
      }
      
    3. Add permissions in the ANDROIDMANIFEST.XML manifest file
      1
      <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /><uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
      
    4. Initialize TKRoomManager:
      1
      2
      3
      4
      TKRoomManager.getInstance().init(activity.getApplicationContext(), "appId", new TKRoomManager.Builder()
              .setTkRoomType(TK_ROOM_TYPE.TK_ROOM_LARGE_CLASS)
              .setTkCheckroomInterrupt(false)
              ...);
      
      Set Room Listeners:
      1
      TKRoomManager.getInstance().registerRoomObserver(this);
      
    Supported CPU Architectures

    The SDK currently supports arm64, armv7, and x86_64 architectures.

    Using Sample Programs

    The talkSDKDemo includes basic SDK call methods (such as joining a room, publishing audio and video, and leaving a room, etc.). Open the sample program with Android Studio and directly compile and run it on a real device for experience.