1

In my project, I'm using sms_maitained version 0.2.5 and I'm trying to send message of about 230 characters. But I'm getting RESULT_ERROR_GENERIC_FAILURE.

I've already gone through a lot of resources like this and this. I'm pretty sure:

  1. there isn't any network issue
  2. have proper permissions
  3. no dual sim issue
  4. receiver number is correct

Because, I am able to send messages; if the message length is shorter.

I found this java code, which divides and send longer message but I'm not good in java, and my project is in flutter so I'll prefer to do it natively on flutter. Also if I do it manually for android then I've to fix it for iOS separately.

ArrayList<String> texts = smsManager.divideMessage(text);
smsManager.sendMultipartTextMessage(phone, null, texts, null, null) 

Please tell me, if there is any solution available!

Alena
  • 1,134
  • 6
  • 19
  • 45

1 Answers1

0

This solved issue with sending long SMS messages.

In your pubspec.yaml put this:

  sms_maintained:
    git:
      url: https://github.com/andreimc/flutter_sms.git

I found it here: https://github.com/geordyvcErasmus/flutter_sms/pull/15

SardorbekR
  • 1,388
  • 3
  • 18
  • 33