×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    7

    Send MMS, only works in debug mode

    Hi,

    i have a MIDlet that opens an mms port (like this
    Code:
    Connector.open(mms://:54531)
    ) and the same midlet, running on a different phone may eventually send an mms to another phone (running the very same MIDlet). The code to send the mms looks like this:

    Code:
    String address = "mms://"+cellPhoneNumber+":54531";
    MessageConnection clientConnection = (MessageConnection)Connector.open(address);
                    
    MultipartMessage multipartMessage = (MultipartMessage)clientConnection.newMessage(MessageConnection.MULTIPART_MESSAGE);
                   
    multipartMessage.setSubject("MessagBrokerMessage");
    MessagePart bandyMessage = new MessagePart(
                                                aByteArrayOfSize454[],            /* the actual message content */
                                                BANDY_MESSAGE_MIME, /* mime type */
                                                BANDY_MMS_PAYLOAD,  /* part name */
                                                null,               /* no file name */
                                                null);              /* no encoding */
                    
                    multipartMessage.addMessagePart(bandyMessage);
                    
                    clientConnection.send(multipartMessage);
                    clientConnection.close();
    I have two instance of SUNs WTK (version 2.2) running this applet, one waiting for the other to send an mms. With the code above, this works fine, BUT only in debug mode (i.e. inside eclipse, running eclipseME with the wtk). If not running in debug mode, I always get an ioexception:

    Code:
    java.io.IOException: Connection closed
    	at com.sun.midp.io.j2me.datagram.Protocol.ensureOpen(+16)
    	at com.sun.midp.io.j2me.datagram.Protocol.newDatagram(+4)
    	at com.sun.midp.io.j2me.mms.DatagramImpl.send(+354)
    	at com.sun.midp.io.j2me.mms.Protocol.send(+473)
    Which is hard to belief, as I just opened the connection (
    Code:
    Connector.open("mms://+5550000:54531)
    just a few lines above!?

    Does anyone know this problem?

    Cheers, Phibo

    PS The same happens when using the nokia emulator (Nokia Dev Suite for JME 3.0, running S60)

  2. #2
    Registered User
    Join Date
    Oct 2005
    Posts
    7

    Re: Send MMS, only works in debug mode

    Me again,

    on the phone I've been able to track it down to a ClassNotFoundError, namely for the com/../symbian/.../mms/Protocol class.
    Is it possible, that the Nokia 6680 does not support MMS sending as defined in JSR-120?!?

    Thanx for sharing your experience.

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    5

    Re: Send MMS, only works in debug mode

    i face the same problem .... i test on netbeans and i use nokia n70 .... so did u find any solution

  4. #4
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: Send MMS, only works in debug mode

    Make always a practice to close all the streams and other connections inside the finally block so that you can make sure that the resources were released. Search the web or even this link can help you,
    SEND MMS:
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Understanding how to send MMS
    By vict3m in forum General Messaging
    Replies: 2
    Last Post: 2005-08-24, 22:55
  2. how to send MMS via persnal wap server?
    By jiangpo in forum General Messaging
    Replies: 4
    Last Post: 2003-06-05, 10:06
  3. Send an MMS from 7650 to 7650 larger than 100k
    By marcusn in forum General Messaging
    Replies: 2
    Last Post: 2002-12-17, 09:50
  4. Send a SMS from a MMS Phone
    By Nokia_Archive in forum General Messaging
    Replies: 1
    Last Post: 2002-05-23, 13:25
  5. Replies: 0
    Last Post: 2002-05-21, 04:51

Posting Permissions

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