Agora Edu Context enables developers to implement the functions in the Flexible Classroom.
Different contexts represent different function modules in the Flexible Classroom. Each context contains methods for the app to call and also reports event callbacks to the app.
Agora provides the following contexts:
Chat Context: Chat.
Device Context: Audio and video device control during a class.
Extension App Context: Extension applications.
Hands-up Context: Hand raising.
Media Context: Local preview before a class.
Room Context: Classroom management.
Screen Sharing Context: Screen sharing.
User Context: User list.
Video Context: In-class media control, mainly for controlling the audio and video of the teacher and student in the One-to-one Classrooms scenario and the audio and video of the teacher in the Small Classroom and Lecture Hall scenarios.
Whiteboard Context: Whiteboard, including the whiteboard basic editing tools and page controller.
The edu context pool interface. Use this interface to implement all the functions provided by the Agora Classroom SDK.
interface EduContextPool {
fun chatContext(): ChatContext?
fun handsUpContext(): HandsUpContext?
fun roomContext(): RoomContext?
fun screenShareContext(): ScreenShareContext?
fun userContext(): UserContext?
fun videoContext(): VideoContext?
fun whiteboardContext(): WhiteboardContext?
fun extAppContext(): ExtAppContext?
}
The handler pool interface. Use this interface to implement all the callbacks provided by the Agora Classroom SDK.
interface IHandlerPool<T> {
// Register the callback listener for the context
fun addHandler(handler: T?)
// Remove the callback listener for the context
fun removeHandler(handler: T?)
// Get all callback listeners of the context
fun getHandlers(): List<T>?
}