×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Location
    Tampere, Finland
    Posts
    1,115

    Nokia MMS Java Library and Audio

    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

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    474

    RE: Nokia MMS Java Library and Audio

    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

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    4

    RE: Nokia MMS Java Library and Audio

    As far as i know the content types wich not are in the WAP forum is encoded as plain text, so it should not matter.

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    1

    RE: Nokia MMS Java Library and Audio

    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.)

    BR,
    vincenzo sambucaro

Posting Permissions

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