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
- Place the CLASSROOMSDK.AAR into the LIBS directory of your project
- Add the SDK component dependency in the APP/BUILD.GRADLE file.
1 2 3
dependencies { implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs') }
- 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" />
- Initialize TKRoomManager:
Set Room Listeners:
1 2 3 4
TKRoomManager.getInstance().init(activity.getApplicationContext(), "appId", new TKRoomManager.Builder() .setTkRoomType(TK_ROOM_TYPE.TK_ROOM_LARGE_CLASS) .setTkCheckroomInterrupt(false) ...);
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.