Truecaller SDK
  • Hello!
  • Why Truecaller SDK
  • Getting Started
  • ANDROID
    • 🆕OAuth SDK 3.0
      • Implementing user flow for your App
      • Scenarios for all user verifications : Truecaller and Non Truecaller Users
      • Integration Steps
        • Generating Client ID
        • Setup
        • Implementing Callbacks
        • Initialisation
        • Setting up OAuth parameters
        • Invocation
        • Customisation
        • Clearing SDK Instance
        • Handling Error Scenarios
        • Integrating with your Backend
          • Fetching User Token
          • Fetching User Profile
        • Non Truecaller User Verification
          • Completing Verification
          • TrueException
          • Server Side Validation
      • Instrumentation
      • Getting Release Ready
        • Testing your verification flow
          • Non-Truecaller user verification flow
          • Truecaller user verification flow
          • Test Setup
        • Google play store app permission declaration form
        • Moving to Production
    • SDK v2.8.0
      • Implementing user flow for your app
      • Scenarios for all user verifications : Truecaller and Non Truecaller Users
      • Generating App Key
      • Integrating with your App
        • Setup
        • App Key Configuration
        • Initialisation
        • Customisation
        • Implement Callbacks
        • Clearing SDK instance
        • Handling Error Scenarios
        • Verifying non Truecaller users
          • TrueException
          • Completing Verification
        • Advanced Steps
      • Server Side Response Validation
        • For Truecaller users verification flow
        • For Non-Truecaller users verification flow
      • Instrumentation
      • Getting Release Ready
        • Testing your verification flow
          • Truecaller user verification flow
          • Non-Truecaller User Verification Flow
          • Test Setup
        • Google Play App Signing
        • Google Play Store app permissions declaration
        • Google Play Policy Change for Device Identifiers
      • Changelog
  • MOBILE WEBSITES
    • Implementing user flow for your Mobile Website
    • Generating App Key
    • Integrating with your mobile website
      • Initialisation
      • Invoking verification
      • Fetch User Profile
      • Completing User Verification
      • Handling Error Scenarios
    • Getting Release Ready
      • Instrumentation
      • Testing your verification flow
  • IOS
    • Generating App Key
    • Integrating with your iOS App
      • Setup
      • Configuration
      • Usage
        • Swift
        • Objective-C
      • Verifying Non-Truecaller app users
        • Completing Verification
      • Handling Error Scenarios
        • Safari Redirection
    • Server Side Response Validation
  • SHOPIFY APP
    • Generating App Key
    • App Configuration
    • Deactivating App Block
  • FAQs
    • General
    • Developer Account
    • Android App SDK
    • Android OAuth SDK
    • Mobile Web SDK
    • Number Verification Plugin
  • PRODUCT UPDATES
    • App Review Process
    • Introducing dark theme
Powered by GitBook
On this page

Was this helpful?

  1. ANDROID
  2. SDK v2.8.0
  3. Integrating with your App

Customisation

PreviousInitialisationNextImplement Callbacks

Last updated 3 years ago

Was this helpful?

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