truecaller_sdk
1.2.0, released a year ago by truecaller.com
Flutter plugin for Truecaller OAuth SDK on Android.
What it does
Allows Android apps to authenticate users using Truecaller's OAuth 2.0 flow or manual phone number verification. It provides methods to initialize the SDK, check usability, manage OAuth states and scopes, and listen to authentication callbacks via a stream.
AI-written summary of version 1.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to integrate Truecaller login or phone verification into your Android Flutter app.
- You need to support both Truecaller and non-Truecaller users with fallback manual verification.
Skip it when
- Your target platform includes iOS or web (as this plugin uses Truecaller's Android SDK).
- You only need standard OAuth providers like Google or Apple.
Strengths
- Supports seamless OAuth login for Truecaller users.
- Provides manual verification flows (OTP, missed call, IM OTP) for non-Truecaller users.
- Exposes stream-based callback handling for different authentication states.
Weaknesses
- Restricted to Android platform only based on the documentation.
- Requires manual native configuration including AndroidManifest.xml and MainActivity modifications.
Setup
- Kind
- Plugin (native code)
- Effort
- High
- Code generation
- No
- Direct dependencies
- 0
Requires generating a Truecaller client ID, adding metadata and permissions to AndroidManifest.xml, updating MainActivity to extend FlutterFragmentActivity, and configuring launchMode.
import 'package:truecaller_sdk/truecaller_sdk.dart';
TcSdk.initializeSDK(sdkOption: TcSdkOptions.OPTION_VERIFY_ONLY_TC_USERS);
StreamSubscription streamSubscription = TcSdk.streamCallbackData.listen((tcSdkCallback) {
if (tcSdkCallback.result == TcSdkCallbackResult.success) {
String authCode = tcSdkCallback.tcOAuthData!.authorizationCode;
}
});Alternatives
Packages that do the same job and could replace truecaller_sdk.
- google_sign_in
If you want cross-platform social sign-in via Google instead of Truecaller.
84Compare - sign_in_with_apple
If you need native Apple authentication for iOS users.
86Compare