smart solutions for small devices
[ start | index | login ]
start > J2ME > Fun with sending mms from a midlet

Fun with sending mms from a midlet

Created by bjoernQ. Last edited by bjoernQ, 7 years and 335 days ago. Viewed 4,163 times. #4
[diff] [history] [edit] [rdf]
labels
attachments

Some thoughts

When I thought about how mms works the following idea came to mind:
The only thing that my midlet has to do is submitting the message correctly to the mmsc. I learned that the mmsc is only accessible through a wap gateway. So when I finally got my new 6600 which supports datagrams I thought I would be able to implement the wap push myself and then implement the submission to the mmsc. So I connected my PC via bluetooth to the apn for sending/receiving mms from my mobile operator and .... no connection to the wap gateway ....
When I looked at the settings I thought that the proxy port 8008 isn't normaly used for wap. What if my nokia sends the mms by a simple http post via tcp? That's easy.
Okay. I tried it but it failed with a stange symbian os error. I quickly found out that my 6600 (at least fw 3.49.1) doesn't like to use the proxy set in the connection settings. So I wrote up the http post stuff myself. (The phone supports sockets so this was uncomfortable but possible.)

It worked!

Posting a mms by a http post worked. Yep! Encoding the message in the right format and it realy works. (If you're interrested in how the encoding has to be done you can have a look at nokia's mms java library (source is included) or look at >>http://sourceforge.net/projects/jvending ).
Since the internal mms application used in the 6600 does it the same way (I mean by not using a wap proxy but a regular http proxy) there's no problem with this soluation.
I never tought it could be that easy. Really. But you should know that it won't work if your carrier's MMS server is listening to port 80 or 8080 since these are restricted ports for socket connections.

The future

When WMA2.0 is available everthing is getting easier. Then it's as easy to send an mms as it is to send a regular sms when using WMA1.0 today. I hope to get access to a WMA2.0 capable phone as soon as possible.
no comments | post comment
www.mobile-j.de | Bjoern Quentin