Skip to content

Commit

Permalink
Merge pull request briankabiro#62 from briankabiro/update-readme-with…
Browse files Browse the repository at this point in the history
…-how-to-send-messages-to-multiple-numbers

Update docs to show how to send messages to multiple numbers
  • Loading branch information
briankabiro authored Mar 6, 2020
2 parents 21e5d96 + 124c54d commit c5035d7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,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"
Expand Down

0 comments on commit c5035d7

Please sign in to comment.