From 01df8dfbcc88044c34378755c17cf344d2f15d6a Mon Sep 17 00:00:00 2001 From: Tomas Maly Date: Sat, 29 Jul 2017 16:01:33 -0400 Subject: [PATCH] Update SendSMSModule.java When sending, recipient list always ends with a comma, which makes the messages app say the wrong # of recipients (+1). There shouldn't be a delimiter at the end of the recipient string. --- android/src/main/java/com/tkporter/sendsms/SendSMSModule.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/tkporter/sendsms/SendSMSModule.java b/android/src/main/java/com/tkporter/sendsms/SendSMSModule.java index 23f0307..6304130 100644 --- a/android/src/main/java/com/tkporter/sendsms/SendSMSModule.java +++ b/android/src/main/java/com/tkporter/sendsms/SendSMSModule.java @@ -88,7 +88,9 @@ public void send(ReadableMap options, final Callback callback) { String recipientString = ""; for (int i = 0; i < recipients.size(); i++) { recipientString += recipients.getString(i); - recipientString += separator; + if(i + 1 < recipients.size()) { + recipientString += separator; + } } sendIntent.putExtra("address", recipientString); }