Hey everyone,
I am trying to figure out how to store the SMS I sent via my application. The Folder class gives me access to the e-mail folders, but not SMS or MMS. If anyone has been able to do this, please let me know.
I am also faced with another issue that the SMS I send via my application is received as garbage text.
Following is the code I am using to test the SMS application. The result I get on the target phone is garbage, which is of the same string length as that of the original message.
Code:
MessageConnection mc = null;
try {
mc = (MessageConnection) Connector.open("sms://" + phonenumber);
TextMessage message = (TextMessage) mc.newMessage(MessageConnection.TEXT_MESSAGE);
message.setPayloadText("Hello! Testing testing...");
mc.send(message);
mc.close();
} catch (InterruptedIOException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} Any help is appreciated. Thanks!