tags:

views:

1201

answers:

1

How to programmatically send an MMS in blackberry?

+4  A: 

MMS API (4.6 and >)

There is a net.rim.blackberry.api.mms class which "Provides advanced utilities for interaction with the MMS messaging system.". But this gives only ability to "modify the message before it is sent or deny it from being sent completely" using addSendListener

Using MMS protocol in connection

from javax.microedition.io.Connector API:

mms
This protocol opens an MMS connection across the wireless network. The open request should be formatted as follows:

(MessageConnection) Connector.open("mms://[<peer_address >]:[<application_Id>]");

where:

  • < peer_address > is the phone number or the email address of recipient.
  • < application_Id > is used to identify a Java application.

For example, to send a mms message to specific application use

Connector.open("mms://+123456789:applicationID");

To open a server mode MessageConnection use

Connector.open("mms://:applicationID");

Also see Introduction of MMS in J2ME and sample code - How to send MMS? and Sending and Receiving MMS on J2ME devices

I have never tried this approach, so I can't tell if it's working.

Invoking Messages application

Other option is open Messages application programmatically, to compose MMS:

Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES,
 new MessageArguments(MessageArguments.ARG_NEW_MMS));

Also see Invoking MMS with attachment using application.

Max Gontar
This is a pretty good post!
San Jacinto
+1 awesome post.
jinsungy
Good - but the OP commented that the OS is v4.5 :(
martin clayton
According to this linkhttp://supportforums.blackberry.com/t5/Java-Development/How-to-send-MMS/td-p/147549the native J2ME method to send MMS doesn't work with blackberry
Ali El-sayed Ali
@Ali El-sayed Ali - there must be some reason why mms protocol is included in javadocs. maybe its require some configured server or something.
Max Gontar