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

Callback failure

Open tmaly1980 opened this issue 8 years ago • 1 comments

I'm not getting any results from the callback OTHER than 'completed: false, cancelled: true, error: false", whether I press back during the message composition or I actually send the message.

Is there a way to know whether the text messages were actually sent or not? I'm needing both Android and iOS solutions, but it seems like I'm more than likely going to have to move away from SMS and toward push notifications if I want more robust/automated/failureproof peer-to-peer communication.

tmaly1980 avatar Jul 08 '17 17:07 tmaly1980

I found that onActivityResult (in SendSMSModule.java) with resultCode RESULT_CANCELED was called before onChange (in SendSMSObserver.java) was called. So it always returns: result: false, canceled: true, error: false I removed the line of code in the onActivityResult and solved.

@Override public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data) { //if (requestCode == REQUEST_CODE && resultCode == Activity.RESULT_CANCELED) { // sendCallback(false, true, false); //} }

nineto4 avatar Aug 16 '18 06:08 nineto4