react-native-sms icon indicating copy to clipboard operation
react-native-sms copied to clipboard

Callback is not being executed after sending the sms successfully

Open josegamboa opened this issue 6 years ago • 3 comments

It seems like there is no way to know when the sms is successfully sent, the callback is not being called after sending the SMS on android. but, if I do cancel the sms taping back, it gets into the callback. otherwise it does not know it. is there any delay or something when the sms has been sent?

SendSMS.send({

        body: 'The default body of the SMS!',
        recipients: ['0123456789', '9876543210'],
        successTypes: ['sent', 'queued'],
        allowAndroidSendWithoutReadPermission: true
    }, (completed, cancelled, error) => {
 
        console.log('SMS Callback: completed: ' + completed + ' cancelled: ' + cancelled + 'error: ' + error);
 
    });

josegamboa avatar Jan 15 '20 10:01 josegamboa

Hi,

Did you tried with the android permission READ_SMS and without the option allowAndroidSendWithoutReadPermission ?

UnableHead avatar Mar 26 '20 10:03 UnableHead

I did try with READ_SMS and without allowAndroidSendWithoutReadPermission but it does not respond to the callback. Works well on iOS only. Also, if I come back from SMS screen, the callback says sending cancelled

kaushil111 avatar Jun 05 '20 21:06 kaushil111

Same here. Did you find any solution for this?

brunomartinezciompi avatar Jun 19 '20 00:06 brunomartinezciompi