Reputation: 1891
I'm using RSA Encryption with a key of 1024bit , the ciphered text's length will be more than 160 bytes , and on sending an SMS of more than 160bytes it gives exception and after using sendmultisms() and divide the message , at the receiver side gets unprintable characters and also I will have a problem of how to concatandenate the SMSs.
Upvotes: 0
Views: 1150
Reputation: 2942
You can also encode the ciphered text using Base64 encoding, break it up the into an ArrayList of Strings and use sendMultipartTextMessage. It then sends as many SMS as needed.
SmsManager sms = SmsManager.getDefault();
ArrayList<String> parts = sms.divideMessage(base64EncodedMessage);
sms.sendMultipartTextMessage(phoneNumber, null, parts, null, null);
Upvotes: 1