Flutter용 SMS 패키지는 SMS 메시지 보내기, 받기, 조회, 전달 상태 확인 및 연락처 정보 접근을 위한 간단한 API를 제공합니다. 최소한의 설정으로 기능이 완전한 SMS 애플리케이션을 개발할 수 있게 해줍니다. 사용 편의성을 고려해 플랫폼별 복잡성을 추상화하여 안드로이드와 iOS에서 원활한 통합을 가능하게 합니다. 핵심 메시징 작업을 지원하며 신뢰할 수 있는 통신 기능을 통해 앱 기능을 강화합니다.
사용 사례
SMS 메시징 앱 만들기
이중 인증 구현
메시지 전달 자동화
연락처 검색 통합
메시지 전달 상태 추적
알림 시스템 만들기
주요 기능
SMS 메시지 보내기 및 받기
메시지 전달 상태 조회
연락처 정보에 액세스
간단하고 직관적인 API
크로스 플랫폼 호환성
Android 및 iOS 지원
적합한 대상
메시징 앱을 개발하는 개발자
SMS 인증이 필요한 앱
자동 메시지 처리가 필요한 도구
연락처와 통합된 애플리케이션
신뢰할 수 있는 SMS 기능을 찾는 프로젝트
고려 사항
Android 및 iOS에서 적절한 권한이 필요합니다
기본 SMS 작업에 제한됨
백그라운드 메시지 처리를 위해 추가 구성이 필요할 수 있습니다
기기 수준의 SMS 액세스에 의존함
고용량 상업 메시지에는 적합하지 않습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
[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.');
}));
}