Integrate Flexible Classroom
This page introduces how to add Flexible Classroom into your app.
Understand the tech
The following figure shows the overall technical architecture of Flexible Classroom:
Module introduction
The source code of Flexible Classroom contains the following packages:
app
: (Optional) This module contains code for the classroom login interface and a client-side token generator, showing how to call APIs to join a flexible classroom. This module is an open-source project available on GitHub and for reference only.
AgoraEduUIKit
: (Optional) This module contains code for the classroom UI, showing how to call APIs to aggregate and update UI data. This module is an open-source project available on GitHub. You can develop your own classroom UI based on this module.AgoraClassSDK
: (Optional) This module provides methods for configuring the SDK, launching a flexible classroom, and registering ext apps, and provides the activity implementation of each teaching scenario. This module is an open-source project available on GitHub. Agora recommends integrating this module.AgoraEduCore
: (Required) The core module of Flexible Classroom. Since v2.0.0, this module is closed-source, and you can import this module only by adding a remote dependency.hyphenate
: (Optional) The UI and logic of the chat feature implemented with the Hyphenate IM SDK. If you implement the chat feature on your own, you do not need to import this module.
Module relations
AgoraEduCore
is the required core module, and all the other modules depend on it.- Both
AgoraEduUIKit
andAgoraClassSDK
depend onAgoraEduCore
, and there is no dependency between them. AgoraEduUIKit
depends onhyphenate
.hyphenate
depends onAgoraEduCore
.app
depends on all other modules.
Integrate Flexible Classroom through Maven
If you use the default UI of Flexible Classroom, take the following steps to add remote dependencies and integrate the whole Flexible Classroom through Maven:
-
Add the following library to your project's
build.gradle
file: -
Add the following dependencies in the project's
build.gradle
file to import four modules:AgoraEduUIKit
,AgoraClassSDK
,AgoraEduCore
, andhyphenate
: -
To launch a classroom, call Classroom SDK.setConfig and Classroom SDK.launch. Sample code:
See also
Third-party libraries
No matter which method you choose, the third-party libraries used by Flexible Classroom may conflict with the third-party libraries on which your own project depends. You can use exclude
to resolve this conflict or change the version that your project depends on.