Webex Meetings
Webex Meetings
Quickstart
This article provides examples of common API usage within the meetings flow. For detailed API information, please refer to the SDK API Reference.
The Webex
instance serves as the primary entry point for the SDK, providing access to all Webex SDK APIs. The Call
object represents a meeting and offers APIs for actions such as joining, leaving, muting, and unmuting. The Call
object is returned as a result of a successful dial
API call.
anchorJoin a Meeting
anchorTo join a meeting with the dial
API by providing a meeting ID, SIP address, or meeting link:
webex.phone().dial(meetingId, MediaOption.audioVideoSharing(Pair(localView,remoteView), screenShareView), CompletionHandler { result ->
if (result.isSuccessful) {
result.data?.let { _call ->
// Space call connected. Set observer to listen for call events
call.setObserver(object : CallObserver {
override fun onConnected(call: Call?) {
}
override fun onRinging(call: Call?) {
}
override fun onWaiting(call: Call?, reason: Call.WaitReason?) {
}
override fun onDisconnected(event: CallObserver.CallDisconnectedEvent?) {
}
override fun onInfoChanged(call: Call?) {
}
override fun onMediaChanged(event: CallObserver.MediaChangedEvent?) {
}
override fun onCallMembershipChanged(event: CallObserver.CallMembershipChangedEvent?) {
}
override fun onScheduleChanged(call: Call?) {
}
})
}
} else {
result.error?.let { errorCode ->
// Error in space call
}
}
});
anchorCheck Feature Entitlements
anchorTo determine the feature entitlements for messaging, meeting, and calling based on the logged-in user's license:
var capability = webex.people.getProductCapability()
var hasCalling = capability.isCallingSupported()
var hasMessaging = capability.isMessagingSupported()
var hasMeeting = capability.isMeetingSupported()
anchorManage Background Connection
anchorTo maintain the websocket connection in the background for quick synchronization of conversations and meetings:
webex.phone.enableBackgroundConnection(enable: Boolean)