Signed Call Android SDK

Learn how to integrate Signed Call Android SDK in your app to avail the Signed Call feature.

Overview

CleverTap provides in-app calls via its Signed Call Android SDK, which means you can make and receive calls in any Android app if the device has an internet connection and Signed Call Android SDK. This document shows you how to integrate the Signed Call Android SDK and manage calls. To know more about the Signed Call feature, refer to Signed Call.

Requirements

The basic requirements for the Signed Call Android SDK are:

  • Minimum SDK Level - 21
  • Java 8 and above
  • Application permissions for the following:
    • Microphone (Required)
    • Read Phone State (Optional)

📘

Emulator Support

Emulator support is available for voice calls, but voice transmission will not work.

Install Signed Call Android SDK

Download the latest version of the Signed Call Android SDK from mavenCentral as follows:

  1. Include mavenCentral in your project-level build.gradle file as follows:
allprojects {
    repositories {
        mavenCentral()
    }
}
  1. Add the following line to the dependencies element in your application module's build.gradle file:
implementation "com.clevertap.android:clevertap-signedcall-sdk:0.0.1"

Add Other Dependencies

To enable voice calling with the Signed Call Android SDK, add the following dependencies to your application module's build.gradle file:

CleverTap Android SDK

The Signed Call Android SDK uses CleverTap Android SDK for analytics. The Signed Call Android SDK requires an active CleverTapAPI instance as a parameter during the SDK initialization.

To integrate the CleverTap Android SDK, refer to the CleverTap Android SDK Integration.

📘

Minimum Supported Version

The Signed Call Android SDK integrates with CleverTap SDK v4.6.4 or higher.

Socket-IO Client

The Signed Call Android SDK uses a Socket-IO client library to enable the socket-based signaling channel for voice calls.

To add the Socket-IO client dependency to your application, add the following line to the application module's dependency element:

implementation('io.socket:socket.io-client:2.1.0') {
        exclude group: 'org.json', module: 'json'
}

Glide

The Signed Call Android SDK uses a Glide library for loading the image assets on the call screen.

To add the Glide dependency to your application, add the following line to the application module's dependency element:

implementation 'com.github.bumptech.glide:glide:4.12.0'

Work Manager

The Signed Call Android SDK uses a Work Manager dependency to process the incoming call push for the receiver.

To add the Work Manager dependency to your application, add the following line to the application module's dependency element:

implementation 'androidx.work:work-runtime:2.7.1'

ConstraintLayout

The Signed Call Android SDK uses a ConstraintLayout dependency to build a responsive UI for the call screens.

To add the ConstraintLayout dependency to your application, add the following line to the application module's dependency element:

implementation 'androidx.constraintlayout:constraintlayout:2.1.3'

Upgrade Java Compatibility

The Signed Call Android SDK's source and target compatibility are set to Java 8.
To upgrade your application to target Java 8, use the following snippet:

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

After updating your build.gradle file, sync your project by clicking the Sync Project button.

Initialize and Authenticate Signed Call Android SDK

Initialize the Signed Call Android SDK using the SignedCallAPI class instance:

SignedCallInitResponse signedCallInitListener = new SignedCallInitResponse() {
      @Override
      public void onSuccess() {
          //App is notified on the main thread when the Signed Call SDK is initialized
      }

      @Override
      public void onFailure(@NonNull InitException initException) {
          //App is notified on the main thread when the initialization is failed
          Log.d("SignedCall: ", "error code: " + initException.getErrorCode()
                 + "\n error message: " + initException.getMessage()
                 + "\n error explanation: " + initException.getExplanation());

          if (initException.getErrorCode() == InitException.SdkNotInitializedException.getErrorCode()) {
             //Handle this error here
          }
      }
};

//Create a Builder instance of SignedCallInitConfiguration and pass it inside the init() method
SignedCallInitConfiguration initConfiguration = new SignedCallInitConfiguration.Builder(initOptions, allowPersistSocketConnection)
         .build();

SignedCallAPI.getInstance().init(getApplicationContext(), initConfiguration, cleverTapAPI, signedCallInitListener);
val signedCallInitListener: SignedCallInitResponse = object : SignedCallInitResponse {
    override fun onSuccess() {
        //App is notified on the main thread when the Signed Call SDK is initialized
    }

    override fun onFailure(initException: InitException) {
        //App is notified on the main thread when the initialization is failed
        Log.d("SignedCall: ", "error code: " + initException.errorCode
                 + "\n error message: " + initException.message
                 + "\n error explanation: " + initException.explanation)

        if (initException.errorCode == InitException.SdkNotInitializedException.errorCode) 
        {
           //Handle this error here
        }
    }
}

//Create a Builder instance of SignedCallInitConfiguration and pass it inside the init() method
val initConfiguration = SignedCallInitConfiguration.Builder(initOptions, allowPersistSocketConnection)
    .build()

SignedCallAPI.getInstance().init(applicationContext, initConfiguration, cleverTapAPI, signedCallInitListener)

Following are the parameters passed inside the constructor of SignedCallInitConfiguration.Builder:

initOptions

The initOptions is a JSON object that is passed inside the constructor of SignedCallInitConfiguration.Builder with the following properties:

Properties

Description

Type

Notes

accountId

Unique identity of the client's account. Available from the CleverTap dashboard.

String

Required

apikey

Unique identity of the client's account. Available from the CleverTap dashboard.

String

Required

cuid

Unique identity of the user.
Validation rules:

  • The cuid must range between 5 and 50 characters.
  • The cuid is case sensitive and only '_' is allowed as a special character.
  • The cuid parameter cannot be of the number-number type, that is, a number followed by another number separated with a special character. For example, org_25 is allowed, but 91_8899555 is not allowed.
  • You must use a unique cuid for every device.

String

Required

appId

Application ID of the app. Use the BuildConfig.APPLICATION_ID to get your application ID.

String

Optional

name

The name of the user.
Validation rule:

  • The name must range between 3 and 25 characters.

String

Optional

ringtone

The URL of the ringtone that is played on the caller's end during the outgoing call.
Note: The default ringtone plays without this parameter.

String

Optional

The syntax for the properties of initOptions is as follows:

JSONObject initOptions = new JSONObject();
try {
    initOptions.put("accountId", <string>);
    initOptions.put("apiKey", <string>);
    initOptions.put("cuid", <string>);
    initOptions.put("appId", <string / optional>);
    initOptions.put("name", <string / optional>);
    initOptions.put("ringtone", <string / optional>);
} catch (JSONException e) {
    e.printStackTrace();
}
val initOptions = JSONObject();
try {
    initOptions.put("accountId", <string>);
    initOptions.put("apiKey", <string>);
    initOptions.put("cuid", <string>);
    initOptions.put("appId", <string / optional>);
    initOptions.put("name", <string / optional>);
    initOptions.put("ringtone", <string / optional>);
} catch (e: JSONException) {
    e.printStackTrace();
}

allowPersistSocketConnection

The socket connection plays a crucial role in processing the call request to initiate a call and receive calls on the socket channel. Android OS imposes several battery restrictions that lead to issues in maintaining a persistent socket connection. To overcome this issue, Signed Call Android SDK expects the allowPersistSocketConnection flag, which is a boolean parameter passed inside the SignedCallInitConfiguration.Builder constructor.

The following is the Signed Call Android SDK behavior:

Value

Signed Call Android SDK Behavior

true

The Signed Call Android SDK uses a background service to keep the socket connection persistent in the foreground and background states of the application.

false

The Signed Call Android SDK does not use the background service for the socket connection; hence the socket connection may be inconsistent under battery restriction scenarios.

Permission Management

Following are the permissions that the Signed Call Android SDK uses and their management:

Microphone

This is a required permission. The Signed Call Android SDK requires microphone permission to exchange voices during the call. At the receiver's end, the Signed Call Android SDK asks for microphone permission and handles it accordingly when the receiver answers the call. If the receiver denies microphone permission, the Signed Call Android SDK declines the call. We recommend you add the required handling to request the microphone permission before initiating a call.

Read Phone State

This is optional permission. The Signed Call Android SDK uses this permission to enable busy handling for Public Switched Telephone Network (PSTN) calls. This permission determines if the receiver is available or busy on a PSTN call. We recommend you add the required handling to request the Read Phone State permission before initiating a call.

The Signed Call Android SDK exposes a promptReceiverReadPhoneStatePermission(boolean) method via the SignedCallInitConfiguration.Builder class. Pass the boolean flag as true to allow the Signed Call Android SDK to prompt for the read phone state permission at the receiver's end when the receiver answers the call.

SignedCallInitConfiguration initConfiguration = new SignedCallInitConfiguration.Builder(initOptions, allowPersistSocketConnection)
         .promptReceiverReadPhoneStatePermission(<pass boolean here>)
         .build();

SignedCallAPI.getInstance().init(getApplicationContext(), initConfiguration, cleverTapAPI, signedCallInitListener);
val initConfiguration = SignedCallInitConfiguration.Builder(initOptions, allowPersistSocketConnection)
        .promptReceiverReadPhoneStatePermission(<pass boolean here>)
        .build()

SignedCallAPI.getInstance().init(applicationContext, initConfiguration, cleverTapAPI, signedCallInitListener)

Logout the Signed Call Android SDK

When the Signed Call Android SDK initializes, it maintains the init configuration in a local session. Use the logout(context) method to reset the active session and disable the Signed Call functionality (call initiation and reception).

SignedCallAPI.getInstance().logout(getApplicationContext());
SignedCallAPI.getInstance().logout(applicationContext)

Make a Signed Call

Use the following code to make a Signed Call:

OutgoingCallResponse outgoingCallResponseListener = new OutgoingCallResponse() {
    @Override
    public void callStatus(VoIPCallStatus callStatus) {
        //App is notified on the main thread to notify the changes in the call-state
        if (callStatus == VoIPCallStatus.CALL_CANCELLED) {
            //when the call is cancelled from the initiator's end
        } else if (callStatus == VoIPCallStatus.CALL_DECLINED) {
            //when the call is declined from the receiver's end
        } else if (callStatus == VoIPCallStatus.CALL_MISSED) {
            //when the call is missed at the receiver's end
        } else if (callStatus == VoIPCallStatus.CALL_ANSWERED) {
            //When the call is picked up by the receiver
        } else if (callStatus == VoIPCallStatus.CALL_IN_PROGRESS) {
            //when the connection to the receiver is established
        } else if (callStatus == VoIPCallStatus.CALL_OVER) {
            //when the call has been disconnected
        } else if (callStatus == VoIPCallStatus.CALLEE_BUSY_ON_ANOTHER_CALL) {
            //when the receiver is busy on another call
        }
    }

    @Override
    public void onSuccess() {
        //App is notified on the main thread when the call-request is accepted and being processed by the signalling channel
    }

    @Override
    public void onFailure(CallException callException) {
        //App is notified on the main thread when the call is failed
        Log.d("SignedCall: ", "error code: " + callException.getErrorCode()
               + "\n error message: " + callException.getMessage()
               + "\n error explanation: " + callException.getExplanation());

        if (callException.getErrorCode() == CallException.BadNetworkException.getErrorCode()) {
            //Handle this error here
        }
    }
};

SignedCallAPI.getInstance().call(getApplicationContext(), receiverCuid, contextOfCall, callOptions, outgoingCallResponseListener);
val outgoingCallResponseListener: OutgoingCallResponse = object : OutgoingCallResponse {
    override fun callStatus(callStatus: VoIPCallStatus) {
        //App is notified on the main thread to notify the changes in the call-state
        if (callStatus == VoIPCallStatus.CALL_CANCELLED) {
            //when the call is cancelled from the initiator's end
        } else if (callStatus == VoIPCallStatus.CALL_DECLINED) {
            //when the call is declined from the receiver's end
        } else if (callStatus == VoIPCallStatus.CALL_MISSED) {
            //when the call is missed at the receiver's end
        } else if (callStatus == VoIPCallStatus.CALL_ANSWERED) {
            //When the call is picked up by the receiver
        } else if (callStatus == VoIPCallStatus.CALL_IN_PROGRESS) {
            //when the connection to the receiver is established
        } else if (callStatus == VoIPCallStatus.CALL_OVER) {
            //when the call has been disconnected
        } else if (callStatus == VoIPCallStatus.CALLEE_BUSY_ON_ANOTHER_CALL) {
            //when the receiver is busy on another call
        }
    }

    override fun onSuccess() {
        //App is notified on the main thread when the call-request is accepted and being processed by the signalling channel
    }

    override fun onFailure(callException: CallException) {
        //App is notified on the main thread when the call is failed
        Log.d("SignedCall: ", "error code: ${callException.errorCode}" 
               + "\n error message: ${callException.message}" 
               + "\n error explanation: ${callException.explanation}")
    }
}


SignedCallAPI.getInstance().call(applicationContext, receiverCuid, contextOfCall, callOptions, outgoingCallResponseListener)

The parameters to make a Signed Call are as follows:

Parameter

Description

Type

Notes

receiverCuid

It is the receiver's cuid.
Note: The Signed Call Android SDK returns CallException.CalleeInfoRequiredException error if this parameter is not passed.

String

Required

contextOfCall

It specifies the context of the call. For example, Delivery Partner is calling, Driver is calling, Agent is calling, and so on.
Validation rule:

  • It must include alphanumeric characters, and its length must not exceed 64 characters.

String

Required

callOptions

It is a JSON object with the following properties:

  • receiver_image (string): URL that displays the receiver's image to the initiator of the call (optional).
  • initiator_image (string): URL that displays the initiator's image to the receiver of the call (optional).

JSON Object

Optional

Call Quality Control

The Signed Call Android SDK always checks the ping latency before processing the call initiation request. If the latency is more than 3 seconds, the Signed Call Android SDK does not process the call request and returns a CallException.BadNetworkException exception.

Receive a Signed Call

Signed Call uses the following routing channels to receive Signed Calls at the receiver's end:

Socket Channel

It is a primary routing channel. Signed Call Android SDK requires a successful initialization to receive a call on the socket channel.

FCM Channel

It is a secondary or fallback routing channel that is used when the receiver is not connected to the primary routing channel (Socket).

📘

FCM Version

The minimum supported version of FCM is v21.0.0 for Signed Call Android SDK.

To enable the FCM channel, follow the steps below:

  1. Add your FCM Server Key to the Signed Call section of the CleverTap dashboard. Ignore it if you have already added it.

  2. Add the following code to your Application class:

CleverTapAPI.setSignedCallNotificationHandler(new SignedCallNotificationHandler());
CleverTapAPI.setSignedCallNotificationHandler(SignedCallNotificationHandler())
  1. Add the following code inside your FirebaseMessagingService:
public class MyFcmMessageListenerService extends FirebaseMessagingService {
    @Override
    public void onMessageReceived(RemoteMessage message){
        new CTFcmMessageHandler().createNotification(getApplicationContext(), message);
    }
}
class MyFcmMessageListenerService : FirebaseMessagingService() {

    override fun onMessageReceived(message: RemoteMessage) {
        super.onMessageReceived(message)
        CTFcmMessageHandler().createNotification(applicationContext, message)
    }
}

📘

Note

If you use CleverTap's default implementation to handle the push notifications, then step 3 is not required. For more information, refer to Adding CleverTap's Listener Service.

Busy Handling

Signed Call Android SDK smartly handles the scenarios when the user is busy on a call.
The following scenarios describe the Signed Call Android SDK behavior:

Scenario 1: The user is busy on a call (VoIP or PSTN), and another user initiates a VoIP call to the busy user. In this case, the Signed Call Android SDK displays User is busy on another call on the outgoing call screen and declines the initiated call.

Scenario 2: The user is busy on a VoIP call, and meanwhile, the user answers a PSTN call meaning that two calls (VoIP and PSTN) are connected simultaneously. In this case, the Signed Call Android SDK prioritizes the PSTN call over the VoIP call by putting the VoIP call on hold for both the receiver and initiator of the VoIP call. After the PSTN call ends, the Signed Call Android SDK resumes the VoIP call.

📘

Prerequisites of Busy Handling Scenarios

The Signed Call Android SDK needs Read Phone State permission to handle the busy handling scenarios of PSTN calls.

  • In scenario 1, Signed Call Android SDK uses this permission to determine if the user is available or busy on a PSTN call. This permission is required for Android 12 and onwards only.
  • In scenario 2, the Signed Call Android SDK supports the underlying implementation only if the user has granted the Read Phone State permission.

Missed Call Solution

If the receiver misses a call, the Signed Call Android SDK shows a missed call notification to the receiver. The Signed Call Android SDK uses action buttons on the missed call notification to display a Call to Action (CTA).

To configure the CTA on the missed call notification, perform the following steps during the initialization of the Signed Call Android SDK:

  1. Create a list of CTAs using the MissedCallAction class.
List<MissedCallAction> missedCallActionsList = new ArrayList<>();
missedCallActionsList.add(new MissedCallAction("<Unique Identifier>", "<label on action-button>"));
val missedCallActionsList: MutableList<MissedCallAction> = ArrayList()
missedCallActionsList.add(MissedCallAction("<Unique Identifier>", "<label on action-button>"))

📘

Action Buttons

You can configure a maximum of three action buttons on a missed call notification.

  1. Handle the click events of the missed call CTAs. To do so, create a custom MissedCallActionsHandler class by implementing the MissedCallNotificationOpenedHandler.
public class MissedCallActionsHandler implements MissedCallNotificationOpenedHandler {

    @Override
    public void onMissedCallNotificationOpened(Context context, MissedCallNotificationOpenResult result) {
        //get the the action-details from result object and handle accordingly
        Log.d(TAG, "actionID: " + result.action.actionID
                + " actionLabel: " + result.action.actionLabel
                + " context of call: " + result.callDetails.callContext
                + " cuid of caller: " + result.callDetails.callerCuid
                + " cuid of callee: " + result.callDetails.calleeCuid);
    }
}
class MissedCallActionsHandler : MissedCallNotificationOpenedHandler {

    override fun onMissedCallNotificationOpened(context: Context, result: MissedCallNotificationOpenResult) {
        //get the the action-details from result object and handle accordingly
        Log.d(TAG, "actionID: " + result.action.actionID
                    + " actionLabel: " + result.action.actionLabel
                    + " context of call: " + result.callDetails.callContext
                    + " cuid of caller: " + result.callDetails.callerCuid
                    + " cuid of callee: " + result.callDetails.calleeCuid);
    }
}

📘

Note

The MissedCallActionsHandler must not be a singleton class.

  1. Pass the list of MissedCallAction and the canonical path of the MissedCallActionsHandler in the
    setMissedCallActions(List<MissedCallAction> list, String path) method of the SignedCallInitConfiguration.Builder class.
List<MissedCallAction> missedCallActionsList = new ArrayList<>();
missedCallActionsList.add(new MissedCallAction("<Unique Identifier>", "<label on action-button>"));

//gets the name of the class including its package
String missedCallHandlerPath = MissedCallActionsHandler.class.getCanonicalName();

SignedCallInitConfiguration initConfiguration = new SignedCallInitConfiguration.Builder(initOptions, allowPersistSocketConnection)
       .setMissedCallActions(missedCallActionsList, missedCallHandlerPath)
       .build();

SignedCallAPI.getInstance().init(getApplicationContext(), initConfiguration, cleverTapAPI, signedCallInitListener);
val missedCallActionsList: MutableList<MissedCallAction> = ArrayList()
missedCallActionsList.add(MissedCallAction("<Unique Identifier>", "<label on action-button>"))

//gets the name of the class including its package
val missedCallHandlerPath = MissedCallActionsHandler::class.java.canonicalName

val initConfiguration = SignedCallInitConfiguration.Builder(options, allowPersistSocketConnection)
    .setMissedCallActions(missedCallActionsList, missedCallHandlerPath)
    .build()

SignedCallAPI.getInstance().init(applicationContext, initConfiguration, cleverTapAPI, signedCallInitListener)

Call Hangup Functionality

The call hangup functionality is user-driven, and ending the call depends on the user. For example, if one of the users in a call clicks the call hangup button from the ongoing call screen, the Signed Call Android SDK internally manages the call hangup functionality to end the call.

In the case of a metered call, when a business wants to end the call after a specific duration, you must maintain a timer in the app and use the following method to terminate the call when the timer ends:

SignedCallAPI.getInstance().getCallController().endCall();
SignedCallAPI.getInstance().callController?.endCall()

Override the Dashboard Branding for Call Screen

CleverTap dashboard provides a branding tool to alter the look and feel of the call screens. If you have multiple apps to integrate with the Signed Call Android SDK, all those apps will share the same branding that you have set from the CleverTap dashboard. By overriding the dashboard's call screen branding, you can have different branding for each app.

To override the dashboard branding, use the overrideDefaultBranding(SignedCallScreenBranding branding) method exposed via the SignedCallInitConfiguration.Builder class:

SignedCallScreenBranding callScreenBranding = new SignedCallScreenBranding(bgColor, fontColor, logoUrl, buttonTheme);

SignedCallInitConfiguration initConfiguration = new SignedCallInitConfiguration.Builder(initOptions, allowPersistSocketConnection)  
      .overrideDefaultBranding(callScreenBranding)
      .build();

SignedCallAPI.getInstance().init(getApplicationContext(), initConfiguration, cleverTapAPI, signedCallInitListener);
val callScreenBranding = SignedCallScreenBranding(bgColor, fontColor, logoUrl, buttonTheme)

val initConfiguration = SignedCallInitConfiguration.Builder(initOptions, allowPersistSocketConnection)
    .overrideDefaultBranding(callScreenBranding)
    .build()

SignedCallAPI.getInstance().init(applicationContext, initConfiguration, cleverTapAPI, signedCallInitListener)

The parameters to override the dashboard's call screen branding are as follows:

Parameter

Description

Type

Notes

bgColor

The background color of the call screens.
Note: Use any Hex color code. For example, #000000

String

Required

fontColor

The color of the text displayed on the call screens.
Note: Use any Hex color code. For example, #ffffff

String

Required

logoUrl

The image URL that renders on the call screens.
Note: Use an HTTPS URL only.

String

Required

buttonTheme

The theme of the control buttons shown on the ongoing call screen (Mute, Speaker, and Bluetooth).
Note: The Light theme represents the white color of the buttons whereas Dark is for the black color.

SignedCallScreenBranding.ButtonTheme.LIGHT
OR SignedCallScreenBranding.ButtonTheme.DARK

Required

Debugging

Signed Call Android SDK logs are, by default, set to the SignedCallAPI.LogLevel.INFO level. We recommend you set the Signed Call Android SDK to VERBOSE mode to log warnings or other important messages to the Android logging system during development. To do so, set the debug level to SignedCallAPI.LogLevel.VERBOSE. If you want to disable the Signed Call Android SDK logs for the production environment, you can set the debug level to SignedCallAPI.LogLevel.OFF.

To debug your app with the Signed Call Android SDK:

  1. Set the debug level for the Signed Call Android SDK.
SignedCallAPI.setDebugLevel(SignedCallAPI.LogLevel.INFO);    //Default Log level

SignedCallAPI.setDebugLevel(SignedCallAPI.LogLevel.DEBUG);   //Set Log level to DEBUG log warnings or other important messages

SignedCallAPI.setDebugLevel(SignedCallAPI.LogLevel.VERBOSE); //Set Log level to VERBOSE

SignedCallAPI.setDebugLevel(SignedCallAPI.LogLevel.OFF);     //Switch off the logs for Production environment
SignedCallAPI.setDebugLevel(SignedCallAPI.LogLevel.INFO)    //Default Log level

SignedCallAPI.setDebugLevel(SignedCallAPI.LogLevel.DEBUG)   //Set Log level to DEBUG log warnings or other important messages

SignedCallAPI.setDebugLevel(SignedCallAPI.LogLevel.VERBOSE) //Set Log level to VERBOSE

SignedCallAPI.setDebugLevel(SignedCallAPI.LogLevel.OFF)     //Switch off the logs for Production environment
  1. After setting the debug level to SignedCallAPI.LogLevel.VERBOSE, search for
    [CT]:[SignedCall]. The logcat window displays the handshakes between the Signed Call Android SDK and your app.

Error Handling

The Signed Call Android SDK provides error reporting and handling. The onFailure(InitException) of the SignedCallInitResponse reports all the initialization errors, where the onFailure(CallException) of the OutgoingCallResponse reports all the Call errors.

Initialization Errors

Below is the list of the errors that you may receive while initializing the Signed Call Android SDK:

Error

Description

NoInternetException

No internet connection.

AppContextRequiredException

The application context is missing.

CleverTapApiInstanceRequiredException

The CleverTapApi instance is missing.

InitConfigRequiredException

The initOptions is missing.

SdkNotInitializedException

The Signed Call Android SDK is not initialized.

MissingAccountIdOrApiKeyException

The accountId and apikey parameters are missing.

MissingCuIdException

The cuid is missing.

InvalidCuidLengthException

The cuid length is invalid.

InvalidCuidException

Invalid cuid due to violation of valid cuid rules.

InvalidNameLengthException

The length of the name parameter is invalid.

InvalidAppIdException

The appId is invalid.

InvalidBrandingConfigException

The branding configuration is invalid.

BadRequestException

The values in initOptions are invalid.

AuthFailureException

The user authentication is not successful.

Call Errors

Below is the list of possible errors while making a call:

Status

Description

NoInternetException

No internet connection.

MicrophonePermissionNotGrantedException

Microphone permission is not available.

InternetLostAtReceiverEndException

The Internet is lost at the receiver's end before the call connects.

ContactNotReachableException

The receiver is unreachable.

BadNetworkException

The Signed Call Android SDK can not initiate the call because of a poor network.

CanNotCallSelfException

The Receiver and Initiator's cuid is the same.

CallContextRequiredException

The context of the call is missing.

CallContextExceededBy64Exception

The length of the context message exceeds the limit of 64 characters.

InvalidAppContextException

Invalid context of the application.

CalleeInfoRequiredException

The receiver's cuid is missing.

VoIPCallException

An unknown error occurred while making the call.

ClientDisconnectedDueToNetworkProblemException

The Signed Call Android SDK is disconnected from the signaling channel, due to poor network connectivity.

IncorrectParamsInCallOptionsException

The callOptions parameters are invalid.

CanNotProcessCallRequest

Cannot process new call requests as the Signed Call Android SDK is already processing another.

CallFeatureNotAvailable

The call feature is not enabled to initiate the call.

FAQs

Q. Is Signed Call accountId and apikey the same as CleverTap's accountId and token?

A. No. Signed Call accountId and apikey differ from CleverTap's accountId and token. You can find these details under your dashboard's Signed Call Settings.

Q. Does the Signed Call Android SDK support in-app calls over Bluetooth?

A. Yes. The Signed Call Android SDK has built-in Bluetooth support. It requires a runtime BLUETOOTH_CONNECT permission for Android 12 and onwards.

Q. What channels are used for call routing by Signed Call Android SDK?

A. Signed Call Android SDK uses an active socket connection as soon as the SDK is initialized. The socket connection is a primary routing channel to receive the calls, whereas FCM is a fallback channel in case the receiver is not connected to the socket channel. This socket connection processes the call requests raised to make a call. To know more, refer to the Best practices for initializing Signed Call SDKs.