Hi,
i have a MIDlet that opens an mms port (like this) 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:Connector.open(mms://:54531)
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: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();
Which is hard to belief, as I just opened the connection (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)just a few lines above!?Code:Connector.open("mms://+5550000:54531)
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)

Reply With Quote



