1. Quickstart
CallerAPI Documentation
  • Quickstart
  • Use cases
    • For carriers (MNOs/MVNOs)
    • CPaaS platforms
    • Cloud communications providers
    • SIP trunking providers
    • PBX/Cloud PBX
    • UCaaS vendors
  • Account
    • Balance and email
      GET
  • Spam protection
    • Voice firewall
      • Get started
      • Quickstart
        • What you get
        • Before you start
        • Test with a recording
        • Connect your switch
        • Switch notes
        • Twilio and Telnyx
        • Send text instead of audio
      • Verdicts
        • Read a verdict
        • What to do with a verdict
        • Block a caller
        • Events and webhooks
      • Honeypot
        • Hand a call over
        • Audio, events, and limits
      • Reference
        • Endpoints
        • Errors
        • Limits and thresholds
        • Production checklist
      • REST
        • What this deployment can do
        • List the verdict categories
        • List the honeypot personas
        • Score a transcript or a recording
        • List your recent sessions
        • Get one session with verdict and intel
        • Twilio voice URL for a screened number
        • Preview the Twilio TwiML
        • Telnyx voice URL for a screened number
        • Twilio voice URL for a honeypot number
        • Telnyx voice URL for a honeypot number
      • WebSocket
        • Live scam filter stream
        • Honeypot stream
    • Daily spam reports
      • Webhook
        • Subscribe to daily reports
        • Unsubscribe from daily reports
        • List webhook subscriptions
        • Manual dispatch of reports
        • Test webhook
      • REST
        • Fetch daily spam reports
    • 15 days spam CSV snapshot
      GET
    • Spam score + HLR
      GET
  • Mobile SDK
    • Get started
    • Quickstart
      • What you get
      • Get your keys
      • Android
      • iOS
      • Flutter
      • React Native
      • Check it works
    • Call screening
      • What each platform can do
      • Android call screening
      • iOS prerequisites
      • iOS add the extension
      • iOS test on device
    • Reference
      • Methods
      • Errors
      • Limits and billing
      • Troubleshooting
  • Data partners
    • Partner tems & docs
    • Upload spam reports
      POST
    • Upload contacts
      POST
  • Fraud prevention
    • Ported date
    • Porting history
    • Online presence
    • KYC user identity
  • Business Caller ID
    • Get started
    • Quickstart
      • Announce a call
      • Verify at INVITE
      • What you get
    • Verdicts
      • Show the name and logo
      • Read a verdict
    • REST
      • Verify the calling number
      • Fetch the logo
      • Announce a call
  • Signer reputation by SPC
    GET
  • Signers ranked by score
    GET
  • Schemas
    • Spam protection
      • Spam score request
      • Business info
      • Carrier info
      • Complaint (without number)
      • Daily spam reports request
      • Complaint (with phone)
    • Signer
  1. Quickstart

Android

Five minutes. Four edits to your project.

Before you start#

Your app targets Android 7.0 or later (minSdk 24).
Your machine builds with JDK 17.
You have your three credentials. See Get your keys.

Step 1: add the dependency#

Open app/build.gradle.kts. Add one line inside dependencies:
The SDK is on Maven Central, so you do not add a repository. Confirm that mavenCentral() and google() are already in your settings.gradle.kts, because almost every Android project has both.
If you use Groovy, the line is the same without the brackets:
Click Sync Now in the bar at the top of Android Studio.

Step 2: add your credentials#

Open app/src/main/AndroidManifest.xml. Paste these three entries inside the <application> tag, next to your activities:
<application ... >

    <meta-data android:name="com.callerapi.sdk.CLIENT_KEY"
               android:value="paste-your-client-key" />
    <meta-data android:name="com.callerapi.sdk.SDK_KEY"
               android:value="paste-your-sdk-key" />
    <meta-data android:name="com.callerapi.sdk.SDK_SECRET"
               android:value="paste-your-sdk-secret" />

</application>
A common mistake is pasting these outside <application>. The build still succeeds, and the SDK then finds no credentials at run time.

Step 3: start the SDK#

The SDK needs to start once, when your app process starts.
If you already have an Application subclass, add the marked line to it. If you do not, create this file at app/src/main/java/com/yourcompany/yourapp/App.kt:
Now tell Android to use it. In the same manifest, add android:name to the <application> tag:
<application
    android:name=".App"
    ... >
register reads the credentials from the manifest, so you pass nothing but the context. It returns immediately and does the slow work on a background thread.

Step 4: look up a number#

lookupLabel is a suspend function, so call it from a coroutine. From an activity or fragment, lifecycleScope is the easiest:
Run the app. Logcat prints Caller: CallerAPI LC.
That is the quickstart. Go to Check it works to confirm the dashboard sees your app.

Checking for spam#

isSpam answers whether a number is a known spam caller:
isSpam blocks the thread it runs on. Keep it inside a coroutine, or on a background thread. Never call it on the main thread, and never call it from a call screening callback. Android call screening explains what to use on the call path instead.

Things that will confuse you#

lookupLabel returned null. Either the number does not belong to a business, which is the normal case, or the lookup failed. The function cannot tell you which. Use lookupLabelCode when you need the difference. See Errors.
The app crashed with "CallerAPI not initialised". You called a lookup before register. Check that your manifest has android:name=".App" and that the class name matches your file.
Every lookup fails. Your credentials are missing or wrong. Filter Logcat for CallerAPI and look for native init failed. The SDK logs the failure and then stays off, so nothing else tells you.

Move your credentials out of the manifest#

Before you ship, keep the secret out of git. Put it in local.properties, which git already ignores:
Read it in app/build.gradle.kts:
Then reference the placeholders in the manifest:
<meta-data android:name="com.callerapi.sdk.CLIENT_KEY"
           android:value="${callerApiClientKey}" />
<meta-data android:name="com.callerapi.sdk.SDK_KEY"
           android:value="${callerApiSdkKey}" />
<meta-data android:name="com.callerapi.sdk.SDK_SECRET"
           android:value="${callerApiSdkSecret}" />
Your build server needs the same three values as environment variables.

Next#

Check it works
Android call screening
Methods
Modified at 2026-08-19 00:10:27
Previous
Get your keys
Next
iOS
Built with