mirror of
https://github.com/danog/termux-api.git
synced 2024-11-26 20:04:42 +01:00
Merge pull request #45 from ZeppLu/long-message
now able to send message longer than the maximum size
This commit is contained in:
commit
fb1ccb8683
@ -7,6 +7,7 @@ import com.termux.api.util.ResultReturner;
|
||||
import com.termux.api.util.TermuxApiLogger;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class SmsSendAPI {
|
||||
|
||||
@ -26,8 +27,9 @@ public class SmsSendAPI {
|
||||
if (recipients == null || recipients.length == 0) {
|
||||
TermuxApiLogger.error("No recipient given");
|
||||
} else {
|
||||
final ArrayList<String> messages = smsManager.divideMessage(inputString);
|
||||
for (String recipient : recipients) {
|
||||
smsManager.sendTextMessage(recipient, null, inputString, null, null);
|
||||
smsManager.sendMultipartTextMessage(recipient, null, messages, null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user