I wrote an application to send SMS messages and it fails with “Type not supported”

One thought on “I wrote an application to send SMS messages and it fails with “Type not supported”

  1. Normal
    0

    MicrosoftInternetExplorer4

    You should pass MessageConnection.TEXT_MESSAGE and add the payload like this:

    smsconn =
    (MessageConnection)Connector.open(address);

    TextMessage txtmessage =
    (TextMessage)smsconn.newMessage(

    MessageConnection.TEXT_MESSAGE);
    txtmessage.setAddress(address);
    txtmessage.setPayloadText(messageBox.getString());
    smsconn.send(txtmessage);

    Please, see the
    SMSDemo example for a complete code example.