0
In my application I am trying to send several Smss, but sometimes it does not send.
smsManager.sendMultipartTextMessage (telefones.get(i), null,smsManager.divideMessage("Mensagem"), null, null);
try {
SmsManager smsManager = SmsManager.getDefault();
for (int i = 0; i < telefones.size(); i++) {
smsManager.sendMultipartTextMessage(telefones.get(i), null, "foo"), null, null);
}
} catch (Exception e) {
e.printStackTrace();
}
I have an Arraylist with the phones , then I try to send sms to all of the vector with a for and using smsManager, more sometimes does not send , someone knows if it is a problem of this class?
has two lines that can be sent smsManager.sendMultipartTextMessage(phones.get(i), null, smsManager.divideMessage("The time has come! " + baby.christBeb + " is coming. Gone " + baby.maternity + "! Nass: " + bebe.namePai + " and " + bebe.nameMae + " n(App Arrived Time)"), null, null);
– Ilgner de Oliveira
An important consideration: try to make a minimum example of code that can be used in the resolution. The logic that checks whether a baby has a father has nothing to do with the problem of texting. Avoid putting code beyond the problem as this is reason enough to close the question, okay? In this case I reduced the code in the question to be readable and contain only the relevant parts.
– Oralista de Sistemas
ta good , I didn’t know that I just put the part of the code that sends
– Ilgner de Oliveira
@Ilgnerdeoliveira you can find more information by doing a [tour] :)
– gmsantos
Aff pq suspended my question :/ so it is difficult to be helped here
– Ilgner de Oliveira
Perhaps more information is missing for the staff to be able to answer. But I am reopening the question.
– bfavaretto
What about the mistake? Or just don’t get the message on the mobile... inside your for use tbm smsManager.divideMessage(), I don’t know how you’re passing your data but some characters sometimes gets encoded making it happen, already had this problem especially '#'.
– Flávio Silva
even the error Lavio, just not enough , I’m already using smsManager.divideMessage() , and I simplified a little the code pq asked
– Ilgner de Oliveira