views:

5

answers:

0

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

    }
  }