Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending SMS onchange listener. #29

Open
lloydie008 opened this issue Jun 28, 2023 · 1 comment
Open

Sending SMS onchange listener. #29

lloydie008 opened this issue Jun 28, 2023 · 1 comment

Comments

@lloydie008
Copy link

In sending Sms the listening status is not updating after sending another SMS. but when i restarted my app, it listen once then failed to listen again.

SmsMessage message = new SmsMessage(address, 'Hello flutter world!');
message.onStateChanged.listen((state) {
  if (state == SmsMessageState.Sent) {
    print("SMS is sent!");
  } else if (state == SmsMessageState.Delivered) {
    print("SMS is delivered!");
  } else if (state == SmsMessageState.Fail) {
    print("SMS is failed!");
  }
});
sender.sendSms(message);

}

@Keveltiah
Copy link

@lloydie008 I got the same problem, i noticed that the problem was inside sms_adavced.dart file at line 365. if (_sentMessages.containsKey(id)). The value of id is always 0 and i dont know why.
The workaround for me was to update this part of the code, pleas take a look here: Keveltiah@1cb942c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants