Migration guide
This page shows you how to upgrade to the latest version of Flexible Classroom.
Migrate from v1.1.5 to v2.1.0
In v2.1.0, Agora fully optimizes the internal architecture of the Agora Classroom SDK and refactors the Agora Edu Context APIs.
This section lists the major changes of the Edu Context API between v2.1.0 and v1.1.5.
Chat context
Remove ChatContext and IChatHandler.
Whiteboard context
Remove WhiteboardContext and IWhiteboardHandler. In v2.1.0, the whiteboard feature is implemented in AgoraUIKit.
Device context
Remove DeviceContext and IDeviceHandler. Use methods and callbacks in MediaContext and IMediaHandler instead, as follows:
- Remove
getDeviceConfig. UsegetLocalDeviceStateinstead. - Remove
setCameraDeviceEnable,switchCameraFacing,setMicDeviceEnable, andsetSpeakerEnable. UseopenSystemDeviceandcloseSystemDeviceinstead. - Remove
setDeviceLifecycle. In v2.1.0, the SDK does not maintain the device state. - Remove
onCameraDeviceEnableChanged,onCameraFacingChanged,onMicDeviceEnabledChanged, andonSpeakerEnabledChanged. UseonLocalDeviceStateUpdatedinstead. - Remove
onDeviceTips.
Hands-up context
Remove HandsUpContext and IHandsUpHandler. Use methods and callbacks in UserContext and IUserHandler instead, as follows:
- Remove
performHandsUp. UsehandsWaveandhandsDowninstead. - Remove
onHandsUpEnabled. UseonHandsWaveEnabledinstead. - Remove
onHandsUpStateUpdatedandonHandsUpStateResultUpdated. UseonUserHandsWaveandonUserHandsDowninstead. - Remove
onHandsUpTips.
Room context
- Remove
roomInfo. UsegetRoomInfoinstead. - Remove
leave. UseleaveRoominstead. - Move
uploadLogtoMonitorContext. - Remove
updateFlexRoomProps. UseupdateRoomPropertiesanddeleteRoomPropertiesinstead. - Rename
joinClassroomasjoinRoom. - Remove
onClassroomName. You can callgetRoomInfoto get the room name. - Rename
onClassStateasonClassStateUpdated. - Remove
onClassTime. - Remove
onNetworkStateChanged. UseonLocalNetworkQualityUpdatedinIMonitorHandlerinstead. - Remove
onLogUploaded. You can get the logserailNumberwith the callback function in theuploadLogmethod inMonitorContext. - Remove
onConnectionStateChanged. UseonLocalConnectionUpdatedinIMonitorHandlerinstead. - Remove
onClassTip. - Remove
onFlexRoomPropsInitialized. To get room custom properties after joining the room, you can callgetRoomProperties. - Remove
onFlexRoomPropsChanged. UseonRoomPropertiesUpdatedandonRoomPropertiesDeletedinstead. - Remove
onError. - Remove
onClassroomJoinSuccessandonClassroomJoinFail. UsecallbackinjoinRoominstead. - Remove
onClassroomLeft. UseonRoomClosedinstead.
Screen-sharing context
- Remove
ScreenShareContext. UseStreamContextinstead. WhenvideoSourceTypeinAgoraEduContextStreamInfoisScreen, you can regard this stream as a screen-sharing video stream. - Remove
IScreenShareHandler. UseIStreamHandlerinstead. RemoveonUpdateScreenShareState. UseonStreamJoined,onStreamLeft, andonStreamUpdatedinIStreamHandlerinstead.
User context
- Remove
localUserInfo. UsegetLocalUserInfoinstead. - Remove
muteVideoandmuteAudio. UsemuteStreamsinStreamContextinstead. - Remove
renderVideo. UsestartRenderLocalVideoandstartRenderRemoteVideoinMediaContextinstead. - Remove
updateFlexUserProps. UseupdateUserPropertiesanddeleteUserPropertiesinstead. - Remove
setVideoEncoderConfig. UsesetLocalVideoConfiginStreamContextinstead. - Remove
onUserListUpdated. UsgetAllUserListandgetUserListinUserContextandonRemoteUserJoined,onRemoteUserLeft, andonUserUpdatedinUserHandlerinstead. - Remove
onCoHostListUpdated. UseonCoHostUserListAddedandonCoHostUserListRemovedinstead. You can also get the information of all on-stage users throughgetCoHostListinUserContext. - Rename
onUserRewardtoonUserRewarded. - Rename
onKickOutasonLocalUserKickedOut. - Remove
onUserTipandonRoster. - Remove
onFlexUserPropsChanged. UseonUserPropertiesUpdatedandonUserPropertiesDeletedinIUserHandlerinstead. You can also get custom user properties throughgetUserPropertiesinUserContext.