MeetingEngine is the public business entry point of the SMeeting Android SDK, created with MeetingEngine.create(application). It handles SDK initialization and release, pre-meeting management, entering and exiting meetings, in-meeting controls, local media, sharing, messages, and remote media subscription.
Usage notes
- Each call to
MeetingEngine.create(application)creates one Engine instance. Your app should hold a single instance in one place within the process and callrelease()when it’s no longer needed. - The current public API uses a single-meeting model: one Engine can have only one meeting that is being entered or active at a time; entering again returns
MeetingErrorCode.ALREADY_IN_MEETING. - A successful entry returns MeetingEnterInfo; in-meeting capabilities are then still called through the current
MeetingEngine. - All asynchronous result callbacks stay on the thread they actually come from; the main thread is not guaranteed. Switch to the main thread before updating the UI.
- The failure method of
MeetingResultCallback/MeetingValueResultCallback<T>isonFailure(errorCode, message). Messages for Meeting-produced errors are empty; RTC and backend messages pass through unchanged and may be null or empty. Provide localized text when no message is available. roomEvent,userEvent,mediaEvent, andmessageEventare bound to the current meeting and cleared when you exit the meeting; assign them again to receive events for the next meeting. Engine, IM, and device events share the Engine’s lifecycle.
Creation and version
setLanguage(language)
setRtcLanguage() and sets a process-wide language for subsequent RTC and Meeting HTTP requests, including streaming downloads. Call it before create() or initSdk(). Initialization and release do not reset the setting; changing it does not resend existing requests. The default SYSTEM mode reads the system language tag for each request and falls back to zh-CN if unavailable. Fixed Chinese uses zh-CN, and English uses en. This method does not translate errors; the backend determines the message.
Parameters: language is RtcLanguage: SYSTEM, ZH_CN, or EN. See SRTC enums.
Returns: None (Unit).
create(app)
MeetingEngine instance.
Parameters:
Returns: The newly created
MeetingEngine.
version()
x.y.z.
buildTime()
Manager properties
infosManager
rollCallManager
SESSION_NOT_ACTIVE through the callback. See RollCallManager.
signInManager
SESSION_NOT_ACTIVE through the callback. See SignInManager.
Event properties
Register a listener by assigning these properties directly; assignnull to remove it. For each event’s callback parameters and thread semantics, see the corresponding interface page.
Initialization and release
initSdk(meetToken, callback)
Returns: None (
Unit).
release()
Unit).
Media statistics and cloud recording capture
getMetric()
MediaMetric sample for the current meeting channel; null when no meeting is active, no sample is available, or the media connection is invalid. For the fields, see Media quality.
enableClientCloudRecordCapture
TrackDesc.TRACK_SHARE track used by cloud recording. When enabled, you can get the custom video track through getShareCustomVideoTrack().
getShareCustomVideoTrack(preOpt)
Returns: The cached or newly created
LocalCustomVideoTrack; null when the underlying SRTC isn’t ready yet or the track can’t be created. enableClientCloudRecordCapture constrains the subsequent course recording publish flow; it doesn’t prevent getting and writing to this track in advance.
Current user info
getSelfInfo(callback)
Returns: None (the asynchronous result is delivered through the callback).
Host member controls
adminUpdateUserName(targetId, name, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminUpdateUserRole(targetId, role, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminMoveHost(targetId, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminUpdateUserDrawDisabled(targetId, drawDisabled, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminUpdateUserChatDisabled(targetId, chatDisabled, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminRequestUserOpenCamera(targetId, callback)
MeetingUserEvent.onRequestOpenCamera().
Parameters:
Returns: None (the asynchronous result is delivered through the callback).
adminCloseUserCamera(targetId, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminDisableUserCamera(targetId, cameraDisabled, callback)
Returns: None (the asynchronous result is delivered through the callback).
:::warning
This capability isn’t implemented in the current version; don’t rely on it for meeting controls. To turn off a camera immediately, use
adminCloseUserCamera().
:::
adminRequestUserOpenMic(targetId, callback)
MeetingUserEvent.onRequestOpenMic().
Parameters:
Returns: None (the asynchronous result is delivered through the callback).
adminCloseUserMic(targetId, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminDisableUserMic(targetId, micDisabled, callback)
Returns: None (the asynchronous result is delivered through the callback).
:::warning
This capability isn’t implemented in the current version; don’t rely on it for meeting controls. To turn off a mic immediately, use
adminCloseUserMic().
:::
adminRequestUserShare(targetId, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminStopRoomShare(callback)
Returns: None (the asynchronous result is delivered through the callback).
adminInviteAgent(agents, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminKickUserOut(targetId, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminConfirmHandUp(targetId, code, approve, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminGetOnlineMembers(meetingId, page, prePage, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminUpdateRoomMCUMode()
Unit).
:::warning
This API isn’t implemented in the current version; calling it only logs a warning.
:::
Waiting room
adminWaitingRoomDisabled(waitingRoomDisabled, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminMoveOutWaitingRoom(uid, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminMoveInWaitingRoom(uid, nickName, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminGetWaitingRoomUsers(callback)
Returns: None (the asynchronous result is delivered through the callback).
Sub-meetings
createSubMeeting(subMeetingTitles, callback)
Returns: None (the asynchronous result is delivered through the callback).
updateSubMeetingTitle(id, title, callback)
Returns: None (the asynchronous result is delivered through the callback).
updateSubMeetingUsers(id, members, callback)
Returns: None (the asynchronous result is delivered through the callback).
deleteSubMeeting(ids, callback)
Returns: None (the asynchronous result is delivered through the callback).
getSubMeetingList(callback)
Returns: None (the asynchronous result is delivered through the callback).
startSubMeeting(ids, callback)
Returns: None (the asynchronous result is delivered through the callback).
stopSubMeeting(ids, callback)
Returns: None (the asynchronous result is delivered through the callback).
moveSubMeetingUser(fromId, toId, uid, callback)
Returns: None (the asynchronous result is delivered through the callback).
updateEnterBeforeHostDisabled(meetingId, enterBeforeHostDisabled, callback)
Returns: None (the asynchronous result is delivered through the callback).
helpSubMeeting(meetingId, callback)
Returns: None (the asynchronous result is delivered through the callback).
Current user’s nickname
updateName(name, callback)
Returns: None (the asynchronous result is delivered through the callback).
Users, IM, and calls
getAgentList(types, keyword, page, perPage, callback)
Returns: None (the asynchronous result is delivered through the callback).
enableIm(callback)
imEvent.
Parameters:
Returns: None (the asynchronous result is delivered through the callback).
disableIm()
MeetingImEvent.onImDisconnected().
Parameters: None.
Returns: None (Unit).
callUser(targetUids, callback)
Returns: None (the asynchronous result is delivered through the callback).
Pre-meeting management
createImmediateMeeting(title, option, callback)
Returns: None (the asynchronous result is delivered through the callback).
createScheduleMeeting(title, planTime, planDur, option, callback)
Returns: None (the asynchronous result is delivered through the callback).
updateMeetingBeforeStart(meetingId, option, callback)
Returns: None (the asynchronous result is delivered through the callback).
getMeetingList(page, perPage, callback)
Returns: None (the asynchronous result is delivered through the callback).
getHistoryMeetingList(page, perPage, callback)
Returns: None (the asynchronous result is delivered through the callback).
getMeetingDetail(meetingId, callback)
Returns: None (the asynchronous result is delivered through the callback).
getMeetingDetailByRoomNo(roomNo, callback)
Returns: None (the asynchronous result is delivered through the callback).
cancelMeetingBeforeStart(meetingId, callback)
Returns: None (the asynchronous result is delivered through the callback).
Entering and exiting meetings
enterMeeting(roomNo, password, nick, avatar, streamVendor, isAudience, extendInfo, callback)
Returns: None (the asynchronous result is delivered through the callback).
enterMeetingByMeetingId(meetingId, password, nick, avatar, streamVendor, isAudience, extendInfo, callback)
enterMeeting().
Parameters:
Returns: None (the asynchronous result is delivered through the callback).
exitWaitingRoom(callback)
MeetingServerErrorCode.ENTER_WAITING_ROOM (2118, moved into the waiting room) or ENTER_BEFORE_HOST (2120, waiting for the host, since 2.0.48); the current user is removed from both the waiting room and the waiting-for-host list.
Parameters:
Returns: None (the asynchronous result is delivered through the callback).
exitMeeting()
Unit).
Host room controls
adminDestroyMeeting(callback)
Returns: None (the asynchronous result is delivered through the callback).
adminUpdateConferee(conferees, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminUpdateRoomCameraState(selfUnMuteCameraDisabled, cameraDisabled, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminUpdateRoomSelfUnmuteCameraDisabled(selfUnMuteCameraDisabled, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminUpdateRoomMicState(selfUnMuteMicDisabled, micDisabled, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminUpdateRoomSelfUnmuteMicDisabled(selfUnMuteMicDisabled, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminUpdateRoomShareState(shareDisabled, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminUpdateRoomChatDisabled(chatDisabled, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminUpdateRoomScreenshotDisabled(screenshotDisabled, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminUpdateRoomWatermarkDisabled(watermarkDisabled, callback)
Returns: None (the asynchronous result is delivered through the callback).
adminUpdateRoomLocked(locked, callback)
Returns: None (the asynchronous result is delivered through the callback).
Local camera
openCamera(view, preOption, callback)
preOption doesn’t take effect; to change parameters, call closeCamera() first. The device ID and facing in the start parameters are suggestions; if unavailable, RTC picks another automatically. If an in-flight start is canceled by a switch or close, the callback returns LOCAL_DEVICE_OPERATION_CANCELLED.
Parameters:
Returns: None (the asynchronous result is delivered through the callback).
openCameraAndPublish(view, preOption, callback)
LOCAL_DEVICE_OPERATION_CANCELLED, which ends only the old publish transaction and doesn’t stop the new switch.
Parameters:
Returns: None (the asynchronous result is delivered through the callback).
closeCamera()
Unit).
switchCamera(isFrontCamera)
closeCamera() (without publishing automatically). We recommend disabling the switch control while the camera is off.
When the request is canceled by a later switch or by closeCamera(), the callback returns MeetingErrorCode.LOCAL_DEVICE_OPERATION_CANCELLED. A cancellation represents a newer user intent—don’t recover in the cancellation callback. SDK release() clears the waiters and no longer delivers cancellation callbacks.
Parameters:
Returns: None (
Unit).
getCameraDevices()
switchCameraDevice(cameraId)
switchCamera.
For an exact recovery, call this method again with the getCurrentCameraId() snapshot taken before the switch; the suggestion semantics of openCamera can’t guarantee a return to the original device.
Parameters:
Returns: None (
Unit).
getCurrentCameraId()
App-level exact recovery example
Start the switch on the UI thread.cameraUiGeneration is maintained by your app and incremented each time the camera is turned off, switched again, or the screen is destroyed; cameraEnabled indicates that your app still wants capture, preventing late callbacks from reopening the device. runOnUiThread, updateCameraUi, and showCameraLost are your app’s own UI methods.
CameraFragment: it ignores repeated taps during switching and recovery, and calibrates the UI facing against the real device on final success.
switchFrontCameraMirror(open)
Returns: None (
Unit).
isFrontCameraMirrorOpen()
true means mirroring is on; currently on by default.
addPreview(view)
Returns:
true means binding succeeded; false means the view type is invalid or the current track is unavailable.
removePreview(view)
Returns: None (
Unit).
replacePreview(views)
Returns: None (
Unit).
getAllPreview()
Local mic
openMic(preOption, callback)
Returns: None (the asynchronous result is delivered through the callback).
openMicAndPublish(preOption, callback)
Returns: None (the asynchronous result is delivered through the callback).
closeMic()
Unit).
getMicVolume()
null when not capturing.
getMicDevices()
switchMicDevice(deviceId)
Returns: None (
Unit).
Screen sharing
initScreenShare(activity, notificationParam, preOpt)
Returns: None (
Unit). Capture state is delivered through screenCaptureEvent.
startScreenShare(hasBar, callback)
initScreenShare() first.
Parameters:
Returns: None (the asynchronous result is delivered through the callback).
stopScreenShare()
Unit).
confirmStartScreenShareAgree(targetId, hasBar, callback)
Returns: None (the asynchronous result is delivered through the callback).
confirmStartScreenShareRefuse(targetId, callback)
Returns: None (the asynchronous result is delivered through the callback).
Whiteboard sharing
requestShareBoard(callback)
Returns: None (the asynchronous result is delivered through the callback).
stopShareWhiteBoard()
Returns: None (
Unit).
confirmStartWhiteBoardShareAgree(targetId, callback)
Returns: None (the asynchronous result is delivered through the callback).
confirmStartWhiteBoardShareRefuse(targetId, callback)
Returns: None (the asynchronous result is delivered through the callback).
Room messages and raising hands
sendRoomChatMessage(targetId, msg, msgType, callback)
Returns: None (the asynchronous result is delivered through the callback).
sendRoomCustomMessage(targetId, msg, callback)
MeetingMessageEvent.onExtensionMessage().
Parameters:
Returns: None (the asynchronous result is delivered through the callback).
getRoomChatMsgList(page, prePage, callback)
Returns: None (the asynchronous result is delivered through the callback).
requestHandUp(code, callback)
Returns: None (the asynchronous result is delivered through the callback).
cancelHandUp(code)
Returns: None (
Unit).
Presigned resource URLs
Supported since2.0.46. Use these to upload chat files, meeting materials, and similar resources directly to object storage: request an upload URL, have your app PUT the file to it, and from then on pass around only the resource key; when you need to download, exchange the key for a download URL. Both methods only require initSdk; you don’t need to be in a meeting.
presignedPutObject(type, meetingId, ext, callback)
url: the request body is the file’s binary content, with the header Content-Type: application/octet-stream (not multipart). After the upload succeeds, pass key to others; don’t pass or persist url (the signed URL expires).
When the deployment has file features turned off, the callback receives
onFailure(2125) (file features disabled); hide the send-file entry in that case. The SDK doesn’t limit file size; enforce a per-file limit in your app.
Returns: Unit; the result is delivered through the callback.
presignedGetObject(resKey, id, callback)
Returns:
Unit; the result is delivered through the callback.
Replying to device requests
confirmOpenCameraAgree(targetId, view, preOpt, callback)
Returns: None (the asynchronous result is delivered through the callback).
confirmOpenCameraRefuse(targetId, callback)
Returns: None (the asynchronous result is delivered through the callback).
confirmOpenMicAgree(targetId, preOpt, callback)
Returns: None (the asynchronous result is delivered through the callback).
confirmOpenMicRefuse(targetId, callback)
Returns: None (the asynchronous result is delivered through the callback).
Cloud recording and course recording
startCloudRecord(layoutData, callback)
Returns: None (the asynchronous result is delivered through the callback).
stopCloudRecord(callback)
Returns: None (the asynchronous result is delivered through the callback).
enableCourseRecordTrack(track, callback)
TRACK_SHARE, for course recording. This method only handles the media track; your app sends the recording business request separately.
Parameters:
Returns: None (the asynchronous result is delivered through the callback).
disableCourseRecordTrack()
Unit).
Audio routing and remote audio
toggleRemoteAudioMute(mute)
Returns: None (
Unit).
getAudioRouterManager()
AudioRouterManager?; null when the SDK isn’t ready. Callers must not call its release() directly.
releaseAudioRouterManager()
Unit).
Remote member video
startPlayRemoteVideo(uid, trackDesc, view, event, callback)
RemoteVideoTrack control object is returned.
Parameters:
Returns: None (the asynchronous result is delivered through the callback).
stopPlayRemoteVideo(uid, trackDesc)
Returns: None (
Unit).
getRemoteVideoTrack(uid, trackDesc)
Returns: The matching
RemoteVideoTrack; null when not in a meeting or the control track hasn’t been created. For track rendering methods, see SRTC RemoteVideoTrack.
Remote composite stream
startPlayRemoteMixture(view, event, callback)
Returns: None (the asynchronous result is delivered through the callback).
stopPlayRemoteMixture()
Unit).
getRemoteMixtureTrack()
RemoteVideoTrack?; null when not in a meeting or not yet created.
Wangsu generic streams
:::warning The APIs in this group apply only to the Wangsu (WS) media streaming engine, and you must already have entered the meeting. Calling them with a non-WS engine returns an underlying “not supported” error or a null control track. :::subscribeWsVideoStream(streamName, uid, trackDesc, view, event, callback)
Returns: None (the asynchronous result is delivered through the callback).
subscribeWsAudioStream(streamName, uid, trackDesc, callback)
Returns: None (the asynchronous result is delivered through the callback).
unsubscribeWsVideoStream(streamName, uid, trackDesc)
Returns: None (
Unit).
unsubscribeWsAudioStream(streamName, uid, trackDesc)
Returns: None (
Unit).
getWsVideoStreamTrack(uid, trackDesc)
Returns:
RemoteVideoTrack?; null for audio streams, non-WS engines, or when not in a meeting.
Cast codes
registerCastCode(meetingId, callback)
Returns:
Unit; the business result is returned through the callback.
unregisterCastCode(callback)
Returns:
Unit; the result is returned through the callback.
startCast(code, option, callback)
canShare is true, goes on to request sharing. When the large screen is already in a meeting, the server ignores the roles and ownership in option.
Returns:
Unit; the business result is returned through the callback. For the related models, see the model types page; for ownership values, see the enums page.
Audio capture processing
Supported since2.0.43. Same name and parameters as the RTC-layer RTCEngine.setAudioCaptureProcessor; use it to attach microphone capture processors such as the AI noise suppression plugin. See AI noise suppression for usage.
setAudioCaptureProcessor(processor)
null to clear it. You can call it before or after initSdk and in or out of a meeting, and it applies to all later meetings. The setting persists after release() and is attached again automatically on the next initialization. The SDK holds a strong reference and calls release() on the old processor when you replace or clear it. If the processor declares noise suppression off, the SDK turns off the built-in noise suppression of the system and WebRTC and restores it when cleared; switching restarts microphone capture once (a gap of under half a second).
Returns:
Unit.
Pre-call network check
Supported since2.0.45. Same name and parameters as the RTC-layer RTCEngine.networkCheck, with the same check items, statuses, and reason codes; the meeting layer additionally checks whether the meeting service is reachable as part of the server item.
networkCheck(option, callback)
permission (network permission) → connectivity (network connection) → mtu → dns (DNS resolution) → server (server connectivity). It calls onItem as each item completes and onComplete at the end; the whole check takes about 5 seconds. You don’t need to join a meeting. After initSdk, the app ID and server address are taken from the Meeting token, so you can simply pass NetworkCheckOption(); before initialization, provide them through option. Only one check can run at a time, and all callbacks run on the main thread.
MeetingNetworkCheckCallback (cn.seastart.meeting.callback):
The
data of the server item has one more sub-check than the RTC layer, meeting_api (ok, status, reason, rttMs, httpStatus); the meeting service counts as reachable once it returns any HTTP response. If it’s unreachable, the item is marked fail with the reason code meeting_api_unreachable (if RTC has already failed the item, RTC’s reason code is kept), and the overall status is recalculated.
Returns: Unit; results are delivered through the callback.
The RTC API check in
server requires server-side support for the pre-call network check. If the server hasn’t been upgraded, that item is fail (api_unreachable), and mtu plus the signaling and media checks are skipped; other items are unaffected.cancelNetworkCheck()
onFailure(102026). Does nothing when no check is running. No parameters; returns Unit.
Virtual background
Supported since2.0.39. First initialize the SDK and install the person segmentation model, then set blur or a background image, and finally turn the effect on. After camera capture or a switch succeeds, or after a successful reconnection, the meeting layer reapplies the cached configuration; release() clears the cache and releases the underlying resources.
installVirtualBackground(modelData)
Returns:
0 on success; MeetingErrorCode.INVALID_STATE when the SDK isn’t ready; other errors pass through RTC’s 102xxx error codes. Check the result before turning the effect on.
uninstallVirtualBackground()
Unit.
enabledVirtualBackground(enabled)
Returns:
0 on success; MeetingErrorCode.INVALID_STATE when the SDK isn’t ready; other errors pass through the RTC return value. Turning the effect off doesn’t uninstall the model.
setVirtualBackgroundBlur(level)
Returns:
Unit. Mutually exclusive with background image mode; whichever mode is set last takes effect. Setting the strength doesn’t turn on the main switch automatically.
setVirtualBackgroundImage(image)
Returns:
Unit. Mutually exclusive with blur mode; whichever mode is set last takes effect. Your app must first decode the image URI or file into a Bitmap; the meeting layer caches this object for configuration replay, so don’t recycle it while it’s in use. Setting the image doesn’t turn on the main switch automatically.
setVirtualBackgroundInferenceInterval(interval)
Returns:
Unit. For your app to configure according to device performance; we don’t recommend exposing it directly to end users.
setVirtualBackgroundMaskSync(on)
Returns:
Unit. Makes a difference only when the inference interval is greater than 1; it reduces mask misalignment trailing during fast motion.