Call Features
Mute audio in call#
Whenever you are in the audio/video call, you can able to mute the mic so that receiver don't hear your voice or surrounding noise. In order the use the mute faeture you can utilise the call sdk method below:
| Argument | Type | Description |
|---|---|---|
| MUTE_AUDIO | boolean | Pass true,if you want to disable audio else pass false |
- Java
- Kotlin
Mute video in call#
Whenever you are in the video call, you can able to turn off the camera so that receiver don't see your video. In order the use the video mute faeture you can utilise the call sdk method below:
| Argument | Type | Description |
|---|---|---|
| MUTE_VIDEO | boolean | Pass true,if you want to disable audio else pass false |
Note: The below method accepts
CallActionListeneras a optional paramter. you can pass the listener to get the response when camera mute/unmute action completed.
- Java
- Kotlin
Check mute status of user in call#
At any time in call, you can able to check the audio/video mute status of the end user in call.
To check the audio muted status, call the below method:
| Argument | Type | Description |
|---|---|---|
| END_USER_JID | String | jid of the end call user |
- Java
- Kotlin
To check the video muted status, call the below method:
| Argument | Type | Description |
|---|---|---|
| END_USER_JID | String | jid of the end call user |
- Java
- Kotlin
Choose audio output device#
Whenever a user is in call and if they would like to change the output audio device then they can use the below call sdk method to change the output device for the call.
Get available audio devices#
You can get available audio devices by using the below sdk method to show it in your UI.
- Java
- Kotlin
Select audio device#
| Argument | Type | Description |
|---|---|---|
| AUDIO_DEVICE | String | any one of values of AudioDevice |
The AUDIO_DEVICE device can be any of the below,
- Java
- Kotlin
Note: whenever you are connected to bluetooth headset while using sdk call, if the gsm call arrives and if you attends it then gsm call will take priority for the bluetooth headset.so, even if you disconnect the gsm call, bluetooth headset will not connect back to the sdk call.
Switching between camera in video call#
Whenever you are in video call, you can able to switch between camera's by using the below method.
- Java
- Kotlin
Switch audio call to video call#
Whenever you are in one to one audio call, you can able to switch to video call by using the below method.
- Java
- Kotlin
Handling audio call to video call switch requests#
In your call activity, which you have given to the sdk using the CallManager.setCallActivityClass()
you need to check the below boolean flag in onCreate() as well as in onNewIntent() lifecycle callbacks.
- Java
- Kotlin
if the above method returns true, you may need to show call switch requesting dialog with ACCEPT and REJECT buttons.
if the user accepts call switch then you need to call the below method to notify the call switch requested user.
- Java
- Kotlin
if the user rejects call switch then you need to call the below method to notify the call switch requested user.
- Java
- Kotlin
Getting call logs from the sdk#
Call sdk keeps a local db for storing call logs which inlcudes all types of call logs with required information for the each and every call log. you can able to retrieve the call logs by using the below sdk method.
- Java
- Kotlin
| Argument | Type | Description |
|---|---|---|
| PAGE_NUMBER | Int | number of the page |
Note : To get a call logs of respective page, pass the page number
pageNumberparameter.
Observing call logs changes from the sdk#
In order to observe the call log changes in sdk, you can set the below listener.
Whenever a call log is updated in the db you will get notified by the onCallLogsUpdated() callback.
- Java
- Kotlin
caution
Please don't forget to remove the call logs listener by calling CallLogManager.setCallLogsListener(null) in onDestroy/onDestroyView method of activity/fragment.
Getting missed call count#
Call sdk keeps a local db for storing missed call logs with required information for the each and every call log. you can able to retrieve the missed call count by using the below sdk method.
- Java
- Kotlin
when the user reads the missed calls in UI, you need notify the sdk using the below method to keep track of the actual unread missed call count.
- Java
- Kotlin
Delete call logs#
Call sdk keeps a local db for storing call logs which inlcudes all types of call logs with required information for the each and every call log. you can able to delete single or all call log by using the below sdk method.
| Argument | Type | Description |
|---|---|---|
| IS_CLEAR_ALL | Boolean | if true, entire call log will be delete |
| CALL_LOG_ID_LIST | List<String> | list of call log id's |
| CALLBACK | ChatActionListener | callback to observe the action status |
- Java
- Kotlin
Mute call notifications#
Note: Call notifications are enabled by default.
When the user wants to mute the notifications for call when the app is in background, you can use the below method.
| Argument | Type | Description |
|---|---|---|
| MUTE_STATUS | Boolean | if true, call notification/ui will not be shown when app is in background |
- Java
- Kotlin
Configuring the call quality parameters#
Note: If you are satisfied with with provided default video call quality configuration, then you not required to configure the call quality parameters. if you are not fine with default video quality configuration then you can use the below methods to tweak the video call quality. Keep in mind that changing the video quality parameters will affect the call data usage.
When the user wants to change the maximum video bitrate for sending video, then you can use the below method.
| Argument | Type | Description |
|---|---|---|
| MAX_BITRATE | Int | bitrate in kbps |
- Java
- Kotlin
When the user wants to change the minimum video bitrate for sending video, then you can use the below method.
| Argument | Type | Description |
|---|---|---|
| MIN_BITRATE | Int | bitrate in kbps |
- Java
- Kotlin
Note: Sdk has adaptive bitrate implementation which will optimise the videobitrate based on the network quality. The maximum bitrate value
MAX_BITRATEwill be used at first for video calls, if the sdk detects slow internet it will reduce upto minimum video bitrate valueMIN_BITRATE. When the internet speed increases, sdk will automatically increase video bitrate upto the maximum bitrate valueMAX_BITRATE.
When the user wants to change the video resolutions based on the user count for video calls, then you can use the below method.
| Argument | Type | Description |
|---|---|---|
| VIDEO_RESOLUTION_ADJUSTER | VideoWidthHeightAdjuster | Implementation which will be used to configure video resolution based on users count |
- Java
- Kotlin
Default implementation for VideoWidthHeightAdjuster will look like below, you can
use this to implement your own VideoWidthHeightAdjuster. All the values are in pixels.
- Java
- Kotlin
Note: As per the default implementation above, for 1 or 2 users it will return a resolution of 640*360 which will be used for one to one video calls.
Implementing Speaking Indicators in UI#
Call sdk provides speaking related events to the UI. By observing the speaking events user can able to easily implement the speaking indicators in UI.
when user is speaking in call, the below event will be triggered from the sdk.
call sdk will trigger onUserSpeaking event for all the speaking users including the current user.
- Java
- Kotlin
userJid will be the userId of the user who is speaking and audioLevel value will be in the range of 1..10.
When the call users speaks louder, we will get a higher values and vice versa.
when user is stopped speaking in call, the below event will be triggered from the sdk.
Sdk will trigger onUserStoppedSpeaking event for all the users who just stopped speaking
including the current user.
- Java
- Kotlin
userJid will be the userId of the user who just stopped speaking.
info
Call Sdk requires chat sdk integration for user management.
Get Current Call Metadata#
To get metadata for the current call, use the method below.
- Java
- Kotlin