minSdk 24, because the SDK turns the feature off by itself on older versions.| Feature | Permission the user grants | Where the user grants it |
|---|---|---|
| Reject known spam calls | Caller ID and spam app role | A system dialog you trigger |
| Show a name over the call screen | Display over other apps | A Settings screen you open |
CallScreeningService of your own. Do not add android.permission.BIND_SCREENING_SERVICE. Both are present already.CallerAPI.prewarmAsync(number) when you already know a number is about to call, for example from your own recent calls list. That fills the cache in advance.CallScreeningService.tools namespace to the manifest, then remove the SDK service and add yours:<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application>
<service
android:name="com.callerapi.sdk.CallerScreeningService"
tools:node="remove" />
<service
android:name=".MyCallScreeningService"
android:permission="android.permission.BIND_SCREENING_SERVICE"
android:exported="true">
<intent-filter>
<action android:name="android.telecom.CallScreeningService" />
</intent-filter>
</service>
</application>
</manifest>CallerAPI.register in your Application class first. Lookups fail if the SDK is not started.isSpam or lookupLabel before respondToCall. Those use the network. Telecom drops screening if you wait.CallerAPI.canShowIncomingCallerIdOverlay(this).com.callerapi.sdk.CallerScreeningService. Gradle still merges it, and Telecom can bind it instead of yours.setAnalyticsConsent(true).