Reputation: 1
How to prevent smsmanager from trying to send sms multiple times if there is an error. Or how to receive and handle the error sending sms
I use a list of phone numbers: "listeDestinataire"
for (int i = 0, listeDestinatairesSize = listeDestinataires.size(); i < listeDestinatairesSize; i++) {
String phone = listeDestinataires.get(i);
phone = phone.replace(" ","");
Log.d("control.envoisms", "************* phone : "+phone);
SmsManager.getDefault().sendTextMessage(phone , null, message, null , null);
}
But when a phone number is wrong, for example a landline number, smsmanager tries to send several times
Upvotes: 0
Views: 17