Why can't I send a spooky scary skeleton SMS?

android, java, sms, string

Solution

Perhaps the message is too long and it's failing silently somewhere, use `divideMessage` and `sendMultipartTextMessage`:

ArrayList<String> parts = smsManager.divideMessage(msg);
smsManager.sendMultipartTextMessage(phoneNo, null, parts, null, null);

Problem

I'm making an app to text this string: ``` ░░░░░░░░░░░░▄▐ ░░░░░░▄▄▄░░▄██▄ ░░░░░▐▀█▀▌░░░░▀█▄ ░░░░░▐█▄█▌░░░░░░▀█▄ ░░░░░░▀▄▀░░░▄▄▄▄▄▀▀ ░░░░▄▄▄██▀▀▀▀ ░░░█▀▄▄▄█░▀▀ ░░░▌░▄▄▄▐▌▀▀▀ ▄░▐░░░▄▄░█░▀▀ ▀█▌░░░▄░▀█▀░▀ ░░░░░░░▄▄▐▌▄▄ ░░░░░░░▀███▀█░▄ ░░░░░░▐▌▀▄▀▄▀▐▄ ░░░░░░▐▀░░░░░░▐▌ ░░░░░░█░░░░░░░░█ ░░░░░▐▌░░░░░░░░░█ ░░░░░█░░░░░░░░░░▐▌ ``` This method sends the text: ``` protected void sendSMSMessage(String phoneNo, String msg){ try { SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage(phoneNo,null,msg,null,null); Toast.makeText( getApplicationContext(), "SMS sent", Toast.LENGTH_LONG ).show(); Log.v("sendSMSMessage",msg); } catch (Exception e) { Toast.makeText( getApplicationContext(), "Failed to send. Try again.", Toast.LENGTH_LONG ).show(); e.printStackTrace(); } } ``` If `msg` is "test", and I run `sendSMSMessage`, I get the string "test" on my phone a few minutes later. If `msg` is the spooky skeleton, the method goes, but I don't get the text, and the console shows no errors -- the "SMS sent" toast pops up to show the code executed properly. When I manually text myself the spooky skeleton, I get the text, but it has "(X/6)" sprinkled throughout (where "x" is a number, of course). Is it impossible to send a skeleton SMS? If so, should I make it into a picture and have the code send it as an MMS?

Original source

Related problems