How to send sms with flutter in android and iOS

Viewed 2369

all my app is base on SMS communication, first I use this sms package (https://pub.dartlang.org/packages/sms) but it's only supported by android. It's work fine for this.

But I need also to implement my app on iOS, so I use this new package (https://pub.dartlang.org/packages/flutter_sms) but it's didn"t work for me... when I try to send SMS to 0123456789, native sms APP call me an error :" wrong format [0123456789]".but I never add [].

I tried also simple_sms plugin (https://pub.dartlang.org/packages/simple_sms) first I don't know if it's iOS compatible, and when I click on "send SMS" I'm redirected to the native SMS app ...

I see that URL_lancher can send SMS, but if I understand, URL_lancher call also the native app to send SMS...

I need something more transparent. So are there an other example to send simple SMS in ios and android or just iOS with flutter, without call a second page ?

thank you

1 Answers

There's no available Flutter plugin with iOS support for sending SMS directly without launching an SMS app. For Android, you can use telephony - this has support for sending SMS directly from your app.

You can also try exploring Twilio. However, this requires a network connection to be able to send an SMS.

Related