tags:

views:

1676

answers:

7
+1  Q: 

Android SDK MMS

Does anyone know how to programmatically send a MMS via the Android SDK? Any version of the SDK will do, just need to know where to get started. I know how to send / receive SMS, I now need to add a picture to the message before sending.

+1  A: 

This worked for me.

Intent sendIntent = new Intent(Intent.ACTION_SEND); 
sendIntent.putExtra("sms_body", "some text"); 
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(url));
sendIntent.setType("image/png");

The url being passed to the Uri.parse method should be of the form used to access the media store such as content://media/external/images/media/23.

From the series at jtribe.

Wayne Young
Forgot to say, I don't want to fire up the messaging application. The MMS should be sent behind the scenes. Here is the full story:I have a desktop application that sends data over TCP sockets to the phone. The socket server on the phone receives the stream, parses the data, and determines what to do. In the case of SMS, it composes a new SMS and sends the message behind the scenes. I now need to know how to send a MMS behind the scenes. I already have the photo streaming from client / server(phone) working fine, just need to be able to send the MMS with out asking for user input.
Unfortunately, there isn't an API provided for sending SMS; just the `SmsManager` class that you've already seen.
Christopher
A: 

Did you ever get this answered..

Please let me know I need the solution.

Thanks

Mat

A: 

I'd love to get an answer to this one myself. It seems like a gaping hole in the API right now, and it's ridiculous that SMS is supported but MMS is not.

You might be able to leverage the MMS application itself; there's code in there for sending the MMS. You can see the source at the Android source repository

Adrian
A: 

Ping -- I'm also very interested to know if anyone has found a solution to this one ...

ghassett
A: 

Another interested user here. Is there a solution yet?

A: 

Did you get a solution for this? I also need to send MMS programmatically

sjd
+1  A: 

Seems to be an answer already posted: http://stackoverflow.com/questions/2972845/i-want-send-image-through-using-mms-in-android/2973016#2973016