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:
- there isn't any network issue
- have proper permissions
- no dual sim issue
- 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!