Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oskang09/sms_listener
https://github.com/oskang09/sms_listener
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/oskang09/sms_listener
- Owner: Oskang09
- License: other
- Created: 2020-02-06T02:32:04.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-19T03:23:19.000Z (almost 5 years ago)
- Last Synced: 2023-08-20T23:11:09.759Z (over 1 year ago)
- Language: Dart
- Size: 63.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Introduction
a simple native sms listener ( android only )
# Usage
```dart
// Construct listener
SmsListener listener = SmsListener();// After listen first message will unsubscribe automatically or cancel when error.
listener.receiveOnce(
(Message message) {},
errorCallback: (PlatformException exception) {},
cancelOnError: true,
);// Will keep listening until error or cancel by unsubcribe
var sub = listener.onReceive(
(Message message) {},
errorCallback: (PlatformException exception) {},
cancelOnError: true,
);
sub();
```