Setup

1. Ensure that your Minimum SDK version is at least API level 16 or above ( Android 4.1 ). In case your android project compiles for API level below 16, you can include the following line in your AndroidManifest.xml file to avoid any compilation issues :

<uses-sdk tools:overrideLibrary="com.truecaller.android.sdk"/>

Using this would ensure that the sdk works normally for API level 16 & above, and would be disabled for API level < 16 Please make sure that you put the necessary API level checks before accessing the SDK methods in case compiling for API level < 16

2. Add the following dependency in your app level build.gradle file :

dependencies {
...
implementation "com.truecaller.android.sdk:truecaller-sdk:2.4.0"
}

Also, add the following lines of code in your gradle file, if not already present

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

Please note that Truecaller SDK already contains consumer proguard rules, so it will be appended automatically to your app's proguard rules and you do not need to have any additional proguard rules to be added for the SDK to function