Joining a Meet
#
PrerequisitesMeet sdk should be initialised, group call feature has to be enabled for the current plan and a valid Meetlink should be available.
info
Calling CallManager.createMeetlink()
method will provide a unique meet id everytime.
For better user experience, users could be presented with a preview screen to observe the meet events, render local preview video, option to switch camera and mute the audio or video even before joining the meet. We can make use of the below methods for preview screen UI implementations.
#
SetupWe must establish a connection to the meet server for further subscription, for that we need to call the below method before calling any other methods related to meet.
caution
Make sure to clean up meet data by the calling this Unsubscribe
method before joining or to cancel a meet.
#
SubscribeSDK require the User to subscribe the link before joining the meet SDK requires the User to subscribe the link before joining the meet.Successful subscription will let us know of the participants of the ongoing meet and provide realtime updates of newly joined and recently left participates too. Also let the developers restrict the participants to a meet based on the requirements.
- Java
- Kotlin
caution
Make sure to ask for the Camera and Microphone access in th UI before joining/subscribing to a meet. Without Microphone permission SDK won't let users join a meet.
#
ObserveWhen you are in the meet UI, you might need to observe the meet events to update the UI. You can use the below method to set the observer for the meet events from meet sdk.
Argument | Type | Description |
---|---|---|
joinCallListener | JoinCallListener | Listener to observe the events |
- Java
- Kotlin
onSubscribeSuccess
event will be fired once subscribeCallEvents()
called and there is no failures,
in this event only you need to enable the join call button in the UI.
onLocalTrack
event will be fired once you called startVideoCapture()
from the sdk and all the
required permissions are already granted.
onUsersUpdated
event will be fired whenever there is a changes in users list for the call, you can use this
to update the users list in the join call UI screen as well as you can notify the user that call has been ended
when there is no users in the list
onError
event will be fired whenever there is a error occurred while joining the call.
info
onUsersUpdated
event will be fired with an empty list if the call has been ended you can notify the ui by checking the
users count in the list
#
UnsubscribeWhenever you are leaving from the the meet call UI, you should call the below method to cleanup the meet data.
you can preferably call the below method from your activity onDestroy
.
- Java
- Kotlin
#
JoinWhen you are in the join meet UI, you can call the below method to start joining in the ongoing meet.
- Java
- Kotlin
#
EndIf you want to disconnect an ongoing meet at the end of conversation or when the user presses the end button of your meet UI , you need to call the below sdk method to disconnect the meet.
- Java
- Kotlin