i want to send messages to five different numbers. I am getting that numbers from an another page by using the getIntent() method. Can anyone please give a proper way to send the messages. i used the following code. but it toasts that " SMS sent fo first number" and then all other messages are getting failed.!! But the thing is that i didnt even recieve any message.!!
try{
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage( phonenumber1 ,null,message,null, null);
Toast.makeText(getApplicationContext(), "SMS Sent to First Number.!",Toast.LENGTH_LONG).show();
}catch(Exception e)
{
Toast.makeText(getApplicationContext(), "SMS Sent failed to First Number.!",Toast.LENGTH_LONG).show();
e.printStackTrace();
} // like this up to phonenumber5 with the same try and catch block each five times