Flutter quickstart#
Five minutes. One package, two credential files, one function call.Before you start#
Your Android build targets minSdk 24 and uses JDK 17.
Your iOS build targets iOS 13.0 or later.
Step 1: add the package#
In your project folder, run:That adds callerapi: ^1.4.0 to pubspec.yaml and downloads it.The plugin pulls the native code from Maven Central on Android and CocoaPods on iOS. You do not copy any files by hand.Step 2: add your Android credentials#
Open android/app/src/main/AndroidManifest.xml. Paste these three entries inside the <application> tag:<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>
Step 3: add your iOS credentials#
Open ios/Runner/Info.plist. Paste these four lines before the closing </dict>:<key>CallerAPISDKKey</key>
<string>paste-your-sdk-key</string>
<key>CallerAPISDKSecret</key>
<string>paste-your-sdk-secret</string>
Skip this step if you only build for Android today. iOS lookups fail without it, and they fail quietly.Step 4: look up a number#
Run the app on a device or emulator. The console prints Caller: CallerAPI LC.There is no initialize call. The plugin starts the SDK when Flutter attaches it, and reads your credentials from the two files above. If you look for an initialize function, you will not find one.Checking for spam#
A complete example#
Things that will confuse you#
It works on Android and returns null on iOS. You skipped step 3, or you did not run pod install after editing Info.plist.Every lookup returns null on both platforms. Your credentials are wrong or in the wrong place. Try +18883578668 first, because it is a known business. Then check that the manifest entries sit inside <application>.The Android build fails on Gradle. Confirm JDK 17. Run flutter doctor -v and read the Java version it reports.The iOS build fails after adding the package. On Flutter 3.44 and later, turn off Swift Package Manager for this project, because the plugin ships a CocoaPods podspec. Run flutter config --no-enable-swift-package-manager.Some functions only make sense on one platform. They return false rather than throwing on the other, so it is safe to call them without a platform check.| Function | Android | iOS |
|---|
lookupLabel, isSpam, checkIn | Yes | Yes |
requestCallScreeningRole, isCallScreeningRoleGranted | Yes | Returns false |
requestOverlayPermission, isOverlayPermissionGranted | Yes | Returns false |
bootstrapFromInfoPlist, getLiveLookupStatus, prewarmLiveLookup | Returns false | Yes |
setAnalyticsConsent | Yes | Does nothing |
Next#
Modified at 2026-07-29 20:10:37