Quickstart
Android Meetings SDK | 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
}
}
});
anchorDisplay Remote Screen Share
anchorTo display the screen share from the remote party:
webex.phone.dial("spaceId", MediaOption.audioVideoSharing(Pair(localView, remoteView), screenShareView), CompletionHandler {
if(it.isSuccessful){
val call = it.data
call?.setObserver(object :CallObserver{
override fun onConnected(call: Call?) {
super.onConnected(call)
}
// ...
override fun onMediaChanged(event: CallObserver.MediaChangedEvent?) {
event?.let { _event ->
val _call = _event.getCall()
when (_event) {
is CallObserver.RemoteSendingSharingEvent -> {
if (_event.isSending()) {
_call?.setSharingRenderView(screenShareView)
} else {
_call??.setSharingRenderView(null)
}
}
}
}
}
})
} else {
val error = it.error
}
})
anchorShare the Screen from the SDK Client
anchorTo start and stop screen sharing:
call.startSharing(CompletionHandler {
if (it.isSuccessful){
// ...
}
})
call.stopSharing(CompletionHandler {
if (it.isSuccessful){
// ...
}
})
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)