Making a call
#
Make a callCall feature is essential for the modern day communication. Call sdk allows users to make a one to one audio/video call with the another sdk user.
Note: Check Permissions Before Working in Call Feature.
#
Required permissionsFor audio call, the below permissions:
For video call, we need below permissions:
#
Make a Voice CallTo make a one to one voice call, call the below method.
Argument | Type | Description |
---|---|---|
USER_JID | String | Jid of another registered user |
caution
If one to one call feature unavailable for your plan then it will throw 403 exception.
#
Make a video callMake video call feature allows users to make a one to one video call with the another sdk user. You can make a video call using the below method.
Argument | Type | Description |
---|---|---|
USER_JID | String | Jid of another registered user |
caution
If one to one call feature unavailable for your plan then it will throw 403 exception.
#
Make a group voice callMake group voice call feature allows users to make a voice call with multiple users. You can make a group voice call using the below method.
Argument | Type | Description |
---|---|---|
USER_LIST | <String> | Jid List of Callee's |
GROUP_ID | <String> | ID of the group from which call is initiated, empty if made outside the Group Chat |
#
Make a group video callMake group video call feature allows users to make a video call with multiple users. You can make a group video call using the below method.
Argument | Type | Description |
---|---|---|
USER_LIST | <String> | Jid List of Callee's |
GROUP_ID | <String> | ID of the group from which call is initiated, empty if made outside the Group Chat |
caution
If group call feature unavailable for your plan then it will throw 403 exception.
#
Add participants to the callAfter call is connected, you can able to add more users to the ongoing call. You can use the following methods to invite users to the call, once they accepted the incoming call, they will join in the ongoing call.
Argument | Type | Description |
---|---|---|
USER_LIST | <String> | Jid List of Callee's |
#
Receiving a incoming audio/video callWhenever you receive the audio/video call from the another sdk user, it will be reported to SDK and Incoming Call Notification will be displayed from Plugin.
#
Answer the incoming callOnce the Call is being presented with Accept/Reject Call buttons, we can either choose to attend or reject the call. If we attend the call the below event listener onCallStatusUpdated
will be triggered, and the status will be of the case Attended
.
Argument | Type | Description |
---|---|---|
callMode | String | For this callMode OneToOne or groupCall will be returned from SDK |
userJid | String | For this userJID will be returned from SDK |
callType | String | For this callType Video or Audio will be returned from SDK |
callStatus | CallStatus | An enum class defines the current status of the call |
Note: if the required permissions are not available then call be will be automatically declined even though you answered a call in Android.
#
Decline the incoming callWhenever you receive the audio/video call from the another sdk user, depending upon the android version, you activity may be started so whenever user presses decline button from your call UI , you need to call the below sdk method to decline the call and notify the caller.
#
Disconnect the ongoing callWhenever you make the audio/video call to the another sdk user and you just want to disconnect the call before getting connected or If you want to just disconnect a connected call after the end of conversation, whenever user presses the disconnect button from your call UI , you need to call the below sdk method to disconnect the call and notify the caller.