shinewanna / BackgroundSmsPlugin

Apache License 2.0
12 stars 20 forks source link

Get real sending status and delivery status #9

Open Hossny37 opened 2 years ago

Hossny37 commented 2 years ago

Hi Dear, Currently the service is giving sent status in all cases even if there is no sim card, I believe it's better to get the real status through intentPending interface.

Best regards,

shinewanna commented 2 years ago

I'm not sure, it's been too long, I'll check.

VaishvikaPawar commented 1 year ago

Any update on this issue? I'm also getting message as sent but on my phone I'm not receiving any message from another device that I'm using for testing. I have added SEND_SMS permission in manifest file.

lolloden commented 9 months ago

I had the problem of messages sent but not delivered on an older smartphone (Q). Solved by changing this line:

SmsStatus result = await BackgroundSms.sendMessage(
            phoneNumber: "391234567890", message: "Hello world!", simSlot: 1);

in:

SmsStatus result = await BackgroundSms.sendMessage(
            phoneNumber: "+391234567890", message: "Hello world!", simSlot: 1);

(added + symbol ). In my experience this is not necessary in newer Android devices. Hope this can help