Customisation

Truecaller SDK provides you with capabilities to configure the following :

If you are already using Truecaller SDK with pop-up variant of the verification screen, you can upgrade to the bottom sheet layout by simply making changes to the configuration options in your TruecallerSdkScope object. Refer to the below section for details on all the customisation capabilities and the possible values you may set.

TruecallerSdkScope trueScope = new TruecallerSdkScope.Builder(this, sdkCallback)
        .consentMode(TruecallerSdkScope.CONSENT_MODE_BOTTOMSHEET)
        .buttonColor(Color.parseColor("<<YOUR_DESIRED_COLOR_HEX_CODE>>"))
        .buttonTextColor(Color.parseColor("<<YOUR_DESIRED_COLOR_HEX_CODE>>"))
        .loginTextPrefix(TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_GET_STARTED)
        .loginTextSuffix(TruecallerSdkScope.LOGIN_TEXT_SUFFIX_PLEASE_VERIFY_MOBILE_NO)
        .ctaTextPrefix(TruecallerSdkScope.CTA_TEXT_PREFIX_USE)
        .buttonShapeOptions(TruecallerSdkScope.BUTTON_SHAPE_ROUNDED)
        .privacyPolicyUrl("<<YOUR_PRIVACY_POLICY_LINK>>")
        .termsOfServiceUrl("<<YOUR_PRIVACY_POLICY_LINK>>")
        .footerType(TruecallerSdkScope.FOOTER_TYPE_NONE)
        .consentTitleOption(TruecallerSdkScope.SDK_CONSENT_TITLE_LOG_IN)
        .sdkOptions(TruecallerSdkScope.SDK_OPTION_WIHTOUT_OTP)
.build();          

Contextual text prefix [ .loginTextPrefix() ] To provide appropriate context of verification to the Truecaller user, use one of the below mentioned TruecallerSdkScope values to show the corresponding message to the user.

Contextual text suffix [ .loginTextSuffix() ] To provide appropriate context of verification to the Truecaller user and set the suffix string

Button text options [ .ctaTextPrefix() ] To set the prefix on the CTA button

Button shape [ .buttonShapeOptions() ] To chose the shape of the CTA button

Footer CTA text [ .footerType() ] To configure the text of the additional footer CTA present at the bottom

Privacy policy text [ .privacyPolicyUrl() ] To add your privacy policy link on the verification screen ( optional ), you can configure the respective hyperlink as mentioned below

Copy

.privacyPolicyUrl("<<YOUR_PRIVACY_POLICY_LINK>>")

Terms of service text [ .termsOfServiceUrl() ] To add your terms of service link on the verification screen ( optional ), you can configure the respective hyperlink as mentioned below

Copy

.termsOfServiceUrl("<<YOUR_TERMS_OF_SERVICE_LINK>>")

Language To customise the profile dialog in any of the supported Indian languages To do so, add the following lines before calling the "getUserProfile()" method as mentioned in the previous step

Copy

Locale locale = new Locale("ru");
TruecallerSDK.getInstance().setLocale(locale);

Currently supported languages :

NOTE : In case the input locale is not supported, the profile will by default be shown in English language.

Last updated

Copyright © 2009-2024 True Software Scandinavia AB. All rights reserved. Truecaller™ is a registered trademark.