invoke SMS application, starts with default sms content?
l want to invoke the native sms application with the specified text but without the phone number , I want it to start with add recipient screen.
I have tried m开发者_JAVA百科any ways but without the solution to my problem.
By the way this does not work for me (BB9700, JDE 5.0.0):
code:
public void send(String text) {
MessageConnection c = null;
try {
c = (MessageConnection)Connector.open("sms://"); // fails here: Malformed URL
c.close(); // missing everything
TextMessage message = (TextMessage)c.newMessage(MessageConnection.TEXT_MESSAGE);
message.setPayloadText(text); // fails here: needs
// [message.setAddress(phone)]
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(message));
} catch (Exception e) {
}
}
精彩评论