How to SMS string that base on Base64
HI,
anything different between string and string that base on Base64? I can send out string by SMS programmatic开发者_如何学编程allly. But not sure this will apply to string that is base on Base64. can someone provide guidance what need to be done on the string base on Base64 and send it by SMS. Thanks
Do you mean you want the text message to just contain the base64 string itself? That should work fine - as far as I'm aware, all the characters used within base64 are also available in text messages. If you mean you want to send arbitrary binary data which you happen to have in base64 form at the moment, that could be harder. It wouldn't really be "text" at that point - I dare say there's a way of sending it (possibly MMS etc) but you should be looking at APIs which take byte arrays rather than strings at that point.
have you tried to send a Base64String via SMS?
EDIT... thanks to Jon :)
At the risk of another downvote by the almighty Jon Skeet ;) I will provide "some" help... @MilkBottle, if you have a byte[] and you convert it (for example with Convert.ToBase64String) you can send the result as a smsbody. I cannot understand, why you want to do this, but that doesn`t matter. Another (bad) example:
byte[] arr = new byte[] {0x02, 0x04, 0x07};
String smsbody = System.Convert.ToBase64String(arr);
The result will look like this "AgQG" and this is able to be send programmatically with the SmsComposerTask.
Hope that helps...
精彩评论