# Setup

1. Ensure that your Minimum SDK version is at least API level 24 or above. In case your android project compiles for API level below 24, 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 24 & above, and would be disabled for API level < 24. Note: Please make sure that you put the necessary API level checks before accessing the SDK methods in case of compiling for API level < 24
2. \
   **2.1)** Add the Truecaller SDK which contains OAuth functionality to your **app-level build.gradle** file \
   \
   `dependencies {`

   `...`

   `implementation "com.truecaller.android.sdk:truecaller-sdk:3.1.0"`

   `}` \
   \
   \
   **2.2)** 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`

   `}`

   `}`&#x20;
3. Add mavenCentral() in your project level **build.gradle** file :<br>

   `allprojects{`

   &#x20;  `repositories{`

   &#x20;`...`

   &#x20;      `mavenCentral()`

   &#x20;`...`

   `}`                                                                                                                                                 \
   \
   Also check your AGP and distribution URL version AGP : 7.4.2 (minimum) distributionUrl=https\\://[services.gradle.org/distributions/gradle-7.5-bin.zip](http://services.gradle.org/distributions/gradle-7.5-bin.zip) (minimum).
4. **Configure Client ID :**&#x20;

a.) Open your strings.xml file. Example path: /app/src/main/res/values/strings.xml and add a new string with the name "clientID" and value as your "clientID"

b.) Open your AndroidManifest.xml and add a meta-data element to the application element

\<application android:label="@string/app\_name" ...>

`...`

`<meta-data android:name="com.truecaller.android.sdk.ClientId" android:value="@string/clientID"/>`

`...`

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
