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

Text to use

TruecallerSdkScope value

To get started

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_GET_STARTED

To continue

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_CONTINUE

To place order

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_PLACE_ORDER

To complete your order

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_COMPLETE_YOUR_PURCHASE

To checkout

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_CHECKOUT

To complete your booking

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_COMPLETE_YOUR_BOOKING

To proceed with your booking

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_PROCEED_WITH_YOUR_BOOKING

To continue with your booking

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_CONTINUE_WITH_YOUR_BOOKING

To get details

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_GET_DETAILS

To view more

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_VIEW_MORE

To continue reading

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_CONTINUE_READING

To proceed

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_PROCEED

For new updates

TruecallerSdkScope.LOGIN_TEXT_PREFIX_FOR_NEW_UPDATES

To get updates

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_GET_UPDATES

To subscribe

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_SUBSCRIBE

To subscribe and get updates

TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_SUBSCRIBE_AND_GET_UPDATES

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

Suffix string

TruecallerSdkScope value

please login

TruecallerSdkScope.LOGIN_TEXT_SUFFIX_PLEASE_LOGIN

please signup

TruecallerSdkScope.LOGIN_TEXT_SUFFIX_PLEASE_SIGNUP

please login/ signup

TruecallerSdkScope.LOGIN_TEXT_SUFFIX_PLEASE_LOGIN_SIGNUP

please register

TruecallerSdkScope.LOGIN_TEXT_SUFFIX_PLEASE_REGISTER

please sign in

TruecallerSdkScope.LOGIN_TEXT_SUFFIX_PLEASE_SIGN_IN

please verify mobile number

TruecallerSdkScope.LOGIN_TEXT_SUFFIX_PLEASE_VERIFY_MOBILE_NO

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

Button text to use

TruecallerSdkScope value

Use

TruecallerSdkScope.CTA_TEXT_PREFIX_USE

Continue with

TruecallerSdkScope.CTA_TEXT_PREFIX_CONTINUE_WITH

Proceed with

TruecallerSdkScope.CTA_TEXT_PREFIX_PROCEED_WITH

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

Button shape

TruecallerSdkScope value

Round

TruecallerSdkScope.BUTTON_SHAPE_ROUNDED

Rectangle

TruecallerSdkScope.BUTTON_SHAPE_RECTANGLE

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

Footer CTA string

TruecallerSdkScope value

Use another number

TruecallerSdkScope.FOOTER_TYPE_CONTINUE

Use another method

TruecallerSdkScope.FOOTER_TYPE_ANOTHER_METHOD

Enter details manually

TruecallerSdkScope.FOOTER_TYPE_MANUALLY

Later

TruecallerSdkScope.FOOTER_TYPE_LATER

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

.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

.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

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

Currently supported languages :

Language

locale value to use

english

en

hindi

hi

marathi

mr

telugu

te

malayalam

ml

urdu

ur

punjabi

pa

tamil

ta

bengali

bn

kannada

kn

swahili

sw

arabic

ar

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

Last updated