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.
#
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.
info
Call Sdk requires chat sdk integration for user management.