Overview
The android_sms_retriever package is a Flutter plugin designed to automatically retrieve OTP codes from SMS messages on Android devices without requiring the app to request SMS permissions. It leverages Android's SMS Retriever API to detect and extract one-time passwords sent via SMS, enhancing user experience by simplifying authentication flows. The plugin is lightweight and secure, ensuring sensitive data is handled within the system's trusted framework. It’s ideal for apps that rely on SMS-based two-factor authentication.
Use cases
- Automated OTP extraction in login flows
- Streamlined 2FA verification
- Reducing manual input errors
- Secure SMS-based authentication
- Enhancing user onboarding
Key features
- No SMS permission required
- Uses Android's built-in SMS Retriever API
- Automatic OTP detection
- Secure message handling
- Simple integration with Flutter
Suitable for
- Apps using SMS-based 2FA
- Authentication-heavy applications
- User-friendly onboarding experiences
- Android-only apps needing OTP auto-fill
- Developers avoiding SMS permission requests
Considerations
- Only works on Android
- Requires SMS Retriever API support
- Limited to OTPs sent via SMS
- Depends on device-level SMS processing
- Not compatible with all Android versions or manufacturers