Tuesday, February 05, 2008

Send MMS

Some months ago I've had to write a simple software for sending MMS. Before that moment, my knowledge of MMS or WAP was very limited. Indeed my mobile phone do not even supports MMS... (or color to be honest).

So I've start to search the internet for some documentation regarding MMS and how to send them through a GPRS connection. Unfortunately there's not so much documentation on these matters. In the end I figured out that I could use jWAP to send the binary MMS message to the MMSC of the provider. The last problem was how to build a binary MMS. The only Java library I found capable of encoding a binary MMS was "MMS Java Library" from Nokia. The first problem with this libarry was the download (for some reason, it's not downloadable from the Nokia web site anymore and I had to search for it a lot to find a copy). The second problem was the license that wasn't so clear (the only thing I found it's a post on the Nokia forum where it's said you cand modify if freely).

So after all I decided it was a better idea to write a simple library to encode MMS messages. Fortunately the specification avaiable at Open Mobile Alliance are quite detailed. The only problematic thing is to find the informations you need in all those pdf files.

In the end the results of this work are avaiable here. You'll find the library for encoding and decoding MMS and a simple client to send them trough a WAP gateway. At the moment the library is quite simple, it supports encoding of send_req messages and decoding of send_conf ones only. Also it does supports only image and text parts. In the future it's possible that new features will be added.

Anyway if someone is searching information on how to send MMS take a look at the sources of SendMMS (a total of 3 classes with one being an Exception and one a container).
If you want details on how to encode a MMS message take a look at the sources of jMmsLib, they are quite simple to read and understand.

5 comments:

BinarySpike said...

sweetness! I've been looking for MMS encoding for quite a while now. Thanks! Hopefully I can use this for a PC-to-alltel gateway I'm trying to build.

Anonymous said...

can you please tell from where should i start .... please help me

can u mail me the code of this project ...

Anonymous said...

sorry i forgot to tell you email ...

p060150@nu.edu.pk

pinta said...

Hi
Can you please tell me how to use the source code. how i make it work?
thanks
pinta

Unknown said...

Hi,

I have tried running the SendMMS.java file but I don't know where do I actually pass in the arguments?? Can you give me a brief idea of how it works? e.g. do I have to create one main class to get that sendmms.java to work?

my email: ongyongming87@gmail.com