SMS library for Flutter applications. Its allow to send, receive, query sms messages, sms delivery and query contacts info. It exposes an easy and friendly API for developing a completely functional sms app in Flutter.
Package selection guidance compiled from public package information, community data, and project usage.
The SMS package for Flutter provides a straightforward API to send, receive, query SMS messages, check delivery status, and access contact information. It enables developers to build fully functional SMS applications with minimal setup. Designed for ease of use, it abstracts platform-specific complexities, allowing seamless integration across Android and iOS. The package supports essential messaging operations and enhances app functionality with reliable communication features.
Use cases
Building SMS messaging apps
Implementing two-factor authentication
Automating message delivery
Integrating contact lookup
Tracking message delivery status
Creating notification systems
Key features
Send and receive SMS messages
Query message delivery status
Access contact information
Simple and intuitive API
Cross-platform compatibility
Support for Android and iOS
Suitable for
Developers creating messaging apps
Apps requiring SMS verification
Tools needing automated message handling
Applications integrating with contacts
Projects seeking reliable SMS functionality
Considerations
Requires appropriate permissions on Android and iOS
Limited to basic SMS operations
May require additional configuration for background message handling
Depends on device-level SMS access
Not suitable for high-volume commercial messaging
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
[UNMAINTAINED] This project is unmaintained
Flutter SMS
This is an SMS library for flutter.
It only support Android for now (I can't do it for iOS because I don't own Mac).
Getting Started
For help getting started with Flutter, view our online
documentation.
For help on editing plugin code, view the documentation.
Installation and Usage
Once you're familiar with Flutter you may install this package adding sms (0.1.4 or higher) to the dependencies list
of the pubspec.yaml file as follow:
dependencies:flutter:sdk:fluttersms:^0.2.0
Then run the command flutter packages get on the console.
Querying SMS messages
Add the import statement for sms and create an instance of the SmsQuery class:
Note: the use of await keyword means that getAllSms is resolved asynchronously
and a Future is retorned.
Filtering SMS messages
The method querySms from the SmsQuery class returns a list of sms depending of the supplied parameters. For example,
for querying all the sms messages sent and received write the followed code:
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/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.');
}));
}