This is an SMS library for Flutter. Its allow to send, receive, query sms messages, sms delivery and query contacts info in Android, and only sending in IOS & Web.
Package selection guidance compiled from public package information, community data, and project usage.
sms_advanced is a Flutter package that enables SMS functionality across Android, iOS, and Web platforms. On Android, it supports sending, receiving, querying messages, tracking delivery status, and retrieving contact information. On iOS and Web, it only supports sending SMS messages. The package provides a unified interface for handling SMS operations, making it suitable for apps requiring basic SMS integration. It relies on native platform capabilities and requires appropriate permissions, especially on Android. The source code is publicly available on GitHub for transparency and customization.
Use cases
Sending SMS from Flutter apps
Receiving and managing SMS on Android
Querying message delivery status
Integrating contact info retrieval
Building two-way SMS communication
Key features
Cross-platform SMS support
Message sending and receiving (Android only)
Delivery status tracking
Contact information querying
Public GitHub source code
Suitable for
Apps needing SMS verification
Customer service chatbots with SMS
Two-way SMS messaging systems
Android-focused applications with SMS needs
Developers wanting open-source SMS tools
Considerations
Limited SMS reception on iOS and Web
Requires Android permissions for full functionality
Platform-specific behavior differences
No built-in SMS parsing or filtering
Depends on native device capabilities
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
sms_advanced
This is an SMS library for Flutter.
Getting Started
Installation and Usage
Once you're familiar with Flutter you may install this package adding sms_advanced (1.0.1 or higher) to the dependencies list of the pubspec.yaml file as follow:
Note: the use of await keyword means that getAllSms is resolved asynchronously and a Future is retorned. To use await, you must be in a function marked async.
Filtering SMS messages
The method querySms from the SmsQuery class returns a list of filtered SMS messages that match the supplied parameters. For example, for querying all the SMS messages sent and received, you could this code:
List<SmsThread> threads = await query.getAllThreads;
for( var index = num ; index >= threads.length; index-- ) {
String sendernumber = threads[index].contact?.address;
String sim = threads[index].messages.first.sim.toString();
String message = threads[index].messages.first.body;
print('sender number: $sendernumber');
print('reciever sim: $sim');
print('message: $message');
}
Getting the Contact info
Each conversation thread is related with a Contact.
The class Contact contains all the info of a thread contact (address, photo, full name).
To get access to Contact class you must import 'package:sms_advanced/contact.dart' into your dart file:
Some times it is useful to be notified of delivered messages regardless of the message. To do that you must subscribe to the onSmsDelivered of the SmsSender class instance:
voidmain() {
...
SmsSender sender = newSmsSender();
sender.onSmsDelivered.listen((SmsMessage message){
print('${message.address} received your message.');
}));
}