I converted my ArrayList to an Array and then created a loop to send out the SMS
android.telephony.SmsManager shortMessageManager;
shortMessageManager = SmsManager.getDefault();
// Get DB
dbTools = new DBTools(MainActivity.this);
// Get array
ArrayList<String> phoneNumberArray = dbTools
.getAllphoneNumbers();
String[] SMSNumbers = phoneNumberArray.toArray(new String[phoneNumberArray.size()]);
String message = "Hello from Android";
try {
// Do something
for(int i=0;i<SMSNumbers.length;i++){
Thread.sleep(3000);
shortMessageManager.sendTextMessage(SMSNumbers[i],
null, message, null, null);
Log.d("PhoneNo",SMSNumbers[i]);
}
} catch (Exception e) {
Log.d("PhoneNo", "fail");
}