As suggested in the previous post in this forum, I use the following codes to create SMS with predefined text strings and display SMS in the SMS editor with Invoke.invokeApplication method. However, if the text strings contain Chinese characters, all these characters are replaced with "?" in the text area of the SMS editor. How can I make the SMS editor to show Chinese characters correctly? Many thanks.
Code:
MessageConnection conn = null;
TextMessage msg = null;
try {
conn = (MessageConnection) Connector.open("sms://" + "phone number");
conn.close();
msg = (TextMessage) conn.newMessage(MessageConnection.TEXT_MESSAGE);
msg.setPayloadText(predifined_text);
} catch (IOException e) {
Dialog.alert("Exception: " + e);
}
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(msg));