send blank SMS with SmsManager.sendTextMessage method in android
- by Dany Wehbe
I created an android app and one of its functions is to send SMS, when I try to send blank SMS it throws an exception.
Here is the code:
SmsManager sm=SmsManager.getDefault();
sm.sendTextMessage("9999", null, messageBody,sentPI, deliveredPI);
messageBody maybe empty string and maybe it is a string, previous method throws IllegalArgumentException when messageBody is empty string!
what can I do to send blank SMS?