×

Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Registered User
    Join Date
    Apr 2012
    Posts
    3

    Message sending failed by jsr 205_2.0 wireless messaging API

    Hello ,

    I m triing to send message by using jsr 205_2.0 wireless messaging API on Nokia c2-03 but it fails to send

    My code:

    public string sendMessage(data, mobno)
    {
    String smsPort="16050";
    String address = "sms://+"+"mobno" + ":" + smsPort;
    String msg=data;
    MessageConnection smsconn = null;
    try
    {
    smsconn = (MessageConnection) Connector.open (address);
    TextMessage txtmessage =
    (TextMessage) smsconn.newMessage (MessageConnection.TEXT_MESSAGE);
    txtmessage.setAddress (address);
    txtmessage.setPayloadText (msg);
    smsconn.send (txtmessage);
    }
    catch (Throwable t) {
    System.out.println ("Send caught: ");
    t.printStackTrace ();
    return "FAILED";
    }

    return "SUCESS";
    }

    Is there any problem with port no.
    I hav tried port no 5000 as well but not working ..

    Thank u

  2. #2
    Nokia Developer Expert
    Join Date
    May 2012
    Location
    Espoo
    Posts
    224

    Re: Message sending failed by jsr 205_2.0 wireless messaging API

    Hi amol_list,

    See other discussion thread on the same issue.

    You have to send the message to a specific port that an app on the receiving side is waiting for. J2ME doesn't allow you to get to regulard inbox messages (port 0).
    see Listening asynchronously for incoming SMS messages in Java ME
    and
    How to send a message to a given port as SMS with Java ME

Similar Threads

  1. While Sending MMS Getting javax.wireless.messaging.SizeExceededException
    By shailendra98 in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2012-06-19, 16:42
  2. Message is not showing in sent Items folder on device-Wireless Messaging API
    By vsh.rules in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2011-09-22, 09:38
  3. Message Sending failed !!!!!
    By ankushbabrekar in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2007-03-21, 07:09
  4. Message Sending Failed
    By pnkdrg in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2007-01-15, 14:40
  5. Message Sending Failed message in Nokia 6600 when Memory In Use set to MMC
    By razas in forum General Development Questions
    Replies: 0
    Last Post: 2006-02-01, 07:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×