[Solved] Text Message (SMS)


Well… I recomend you to put this on a try{}catch{} to know what’s failing… check this :

try {      
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(numbers[1], null, msg, null, null);    
Toast.makeText(getApplicationContext(), "Message Sent",
   Toast.LENGTH_LONG).show();
} catch (Exception ex) {
     Toast.makeText(getApplicationContext(),ex.getMessage().toString(),
         Toast.LENGTH_LONG).show();
      ex.printStackTrace();
} 

By the way don’t forget to add this on your manifest.xml

<uses-permission android:name="android.permission.SEND_SMS" />

If this doesn’t work (IT SHOULD) take a look on this sms-messaging-android

11

solved Text Message (SMS)