开发者

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) {

    }
  }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜