Open litzbalane2017 opened 6 years ago
Are you using the function onSmsDelivered
?
I've pushed a fix, this should be good now. Reopen if not
Are you using the function
onSmsDelivered
?
No. I am not using that function.
I've pushed a fix, this should be good now. Reopen if not
I've tested it and still messages are not sent via 2nd sim slot. I am getting the following error messages and incorrect message.onStateChanged saying the SMS was sent.
D/flutter_sms(21885): Sent result: SmsManager.RESULT_ERROR_GENERIC_FAILURE I/flutter (21885): SMS is sent!`
You have this error because you're second sim card cannot send SMS
I see. It seems to just preferring to send with a particular sim card, even if I try to switch the default sim for text. It will find it and send it with sender.sendSms(message, simCard: card.first);
even if I put it on either slot 1 or slot 2.
I then tried using other sim cards without the preferred one, the same message appears and now I cannot send on both sender.sendSms(message, simCard: card.first);
or sender.sendSms(message, simCard: card.last);
:
D/flutter_sms(21885): Sent result: SmsManager.RESULT_ERROR_GENERIC_FAILURE I/flutter (21885): SMS is sent!`
Not sure how this is still happening, since all sim cards work perfectly fine if I do not use a simcard parameter in sender.sendSms(message);
I can't find where is the issue, if I found how to fix I will ping you
When sending using the 1st sim slot, the code bellow works.
However, when using card.last, in order to send via the 2nd sim slot like this:
sender.sendSms(message, simCard: card.last);
I always get this error.
I am testing using Samsung Galaxy J7 Prime (SM-G610Y) with android version 6.0.1.