Truecaller Integration guide for Android — I

Guide to integrate truecaller SDK to your android app.

Image for post
Image for post

Problem.

The first thing that every application does is to onboard a user, onboarding in itself is a very complex task, we have to manage so many things like visuals experience, tour and tutorials, device permissions, application usage policies, and conditions along with validating the user.

Most Boring and tedaous way to validate a user is by email or phone, where the user enters an email/phone number in the application then receives a one-time-password/email, for which they exit the app, click some random link in it which directs them back to app breaking user flow and immersion of the application. Automating any of this task like automatically read one-time-password retrieval from device makes the implementation layer more complex and add more permissions confusing user why all those apps require all such permission and dependencies, recently changed google policy stopping user to take access to user’s call logs and messages putting end for malicious developer who scrapes all the private messages in name of automating SMS reading.

TLDR

  • Verifying a user is a nasty job :
  • OTP/email verification is an option but is a multi-step process.
  • makes the user exit app and depends upon external applications.
  • most of the users drop at this step if onboarding isn’t successful at first.
Image for post
Image for post

Solution.

We needed a smart one-click solution and here enters the social login SDK such as google, facebook login SDK. They expose controlled social information from your profile from their platform with the application which is very simpler to add on the implemntation side and provide an immersive experience in the application as the user never leaves the application and are simple as one click.

So does we get all the personal information required for onboarding? well, the answer is ‘it depends’, the platform can only supply information they have or doesn't violate their user privacy and their policy, but we can always ask for remaining information later down in our applications flow.

One of the other common fields expect email and name most developers look for is phone number, as per various social SDK implementation/policies they cant always provide you with that, we can go ask user manual such field but again becomes a multistep process which we were avoiding , or we can use Truecaller login SDK or facebook account kit. Accountkit from Facebook is an OTP based login solution. In emerging markets, OTP has its challenges and the user manually has to enter details.

Truecaller SDK is an OTP less phone-based login, verification solution, and ultra lightweight solution and absolutely free for lifetime. It’s a mobile identity verification product and not just a login or signup solution!

TLDR

  • Facebook and Google are e-mail based logins and signup solutions.
  • Accountkit from Facebook is a manual OTP based login solution.
  • Truecaller SDK is a free and OTP less phone-based login.
Image for post
Image for post

Truecaller

You can find the official documentation on GitHub

https://github.com/truecaller/android-full-stack-sdk

Adding an application

  1. Create a Truecaller account
  2. Use this link https://developer.truecaller.com to register your account
  3. Click on Get started: https://developer.truecaller.com/sign-up
  4. Register yourself and login to the account: https://developer.truecaller.com/login
  5. After Login into your account.
Image for post
Image for post
Truecaller login page

On Dashboard click on manage app.

Image for post
Image for post
Truecaller dashboard

On manage apps tab click on the create app tab

Image for post
Image for post
Truecaller manage app tab

Fill the details in the form

Image for post
Image for post
Truecaller adding an application
  1. App type select android
  2. App name is the name of your app
  3. I will suggest to add Production or debug as a suffix so you can differentiate your build types. example “testAppProd” or “testAppDebug”
  4. Add application package name/application id
  5. You can find it in gradle of application level
Image for post
Image for post
Android studio application id
  • d. FingerPrint/SHA1 key from gradle task of android studio
  • i. Select on the upper right side of the android studio we have gradle tab
  • ii. expand root and double click signingReport this will run the task and build tab will show SHA keys
Image for post
Image for post
Android studio SHA generation
  • e. Click on create the app and your app will be registered.

Congratulations! you have successfully added your app to Truecaller dashboard in next part I will guide you through setup android code.

If you have questions please add them into comments down below. I will try to answer them to my best.

Happiee hacking!

P.s. checkout my blogger, maybe you discover something new!

Written by

Coding enthusiast! love Android #kotlinAlltheWay, want to explore all opportunity around it! CodingMantra: #cleanCoder #TDD #SOLID #designpatterns

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store