Hello there!
I'm trying to send an encoded Multimedia Message to the EAIF Emulator. The message consists of a SMIL file with text, an image(jpg or gif) and an audio file (wav). As audio files are not supported by the Java Library, I added the new content type audio/x-wav. Everything works fine, the emulator shows a green light. But this is only a solution to satisfy the emulator. Audio is not on the list of the WAP Forum (where is the content type amr?), so the Java Library adds 0 and throws no exception.
How can I encode and send a message with audio content?
I hope somebody helps a poor student.
Thanks in advance,
Pascal
RE: Nokia MMS Java Library and Audio
2002-05-08, 06:47#2
I don't exactly understand the question. It seems that Pascal has already managed to both encode and send a message with audio content.
But if you mean how are content-types such as audio/wav binary encoded into well-known bytes, then the answer is that they're not. Instead of a well-known byte, you simply see the bytes representing "audio/wav", null-terminated.
-paul / forumnokia
RE: Nokia MMS Java Library and Audio
2002-05-15, 06:02#3
HI,
in order to send a mms with audio, you have only to set the right content type in the MMContent object. Here is an example:
MMContent part3=new MMContent();
byte [] buf3 = me.readFile(path+"000.amr"
part3.setContent(buf3,0,buf3.length);
part3.setContentId("000.amr"
part3.setType("audio/amr" //content type for amr
...
mm.addContent(part3); //mm is a MMMessage object
In this way you can send all types of content that you want.
In the Java MMS Library there are only some constants regarding the content-types. But anyway you don't need to use the defined constant (i.e IMMConstants.CT_IMAGE_JPEG, IMMConstants.CT_IMAGE_GIF, ecc.)