function to send notification

This commit is contained in:
Milos Kozak 2016-12-25 11:51:46 +01:00
parent 02b3da97e0
commit 381de0a5f5

View file

@ -376,6 +376,13 @@ public class SmsCommunicatorPlugin implements PluginBase {
MainApp.bus().post(new EventSmsCommunicatorUpdateGui());
}
public void sendNotificationToAllNumbers(String text) {
for (int i = 0; i < allowedNumbers.size(); i++) {
Sms sms = new Sms(allowedNumbers.get(i), text, new Date());
sendSMS(sms);
}
}
public void sendSMSToAllNumbers(Sms sms) {
for (int i = 0; i < allowedNumbers.size(); i++) {
sms.phoneNumber = allowedNumbers.get(i);