mirror of
https://github.com/danog/termux-api.git
synced 2024-11-30 04:19:20 +01:00
now able to send message longer than the maximum size
This commit is contained in:
parent
fbf628fefd
commit
05a9ad60bd
@ -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