From 124c54d8a9b4bf2fd9fbc8e6978f6be12717f3ca Mon Sep 17 00:00:00 2001 From: briankabiro Date: Fri, 6 Mar 2020 11:39:24 +0300 Subject: [PATCH] Update docs to show how to send messages to multiple numbers --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 9b0b1ca..a8e2713 100644 --- a/README.md +++ b/README.md @@ -206,6 +206,26 @@ SmsAndroid.autoSend( ); ``` +#### Send message to multiple numbers + +```javascript +import SmsAndroid from 'react-native-get-sms-android'; + +let phoneNumbers = ["123", "456"]; + +SmsAndroid.autoSend( + JSON.stringify(phoneNumbers), + message, + (fail) => { + console.log('Failed with this error: ' + fail); + }, + (success) => { + console.log('SMS sent successfully'); + }, +); +``` + + #### Event listeners An event will be thrown when the sms has been delivered. If the sms was delivered successfully the message will be "SMS delivered" otherwise the message will be "SMS not delivered"