|
Jack's Hack for the month of January, 2004:
Using the Openwave MMS SDK to Construct and Deliver SMIL This month in Jack's Hacks, we'll take a look at another new feature In the 2.1 Release of the Openwave MMS SDK. In addition to the ability to query device information, we have introduced an API which allows developers to dynamically create slide show presentations without having to use pre-existing SMIL content. This API provides a the ability to build more compelling messaging applications and deliver a rich end user experience without having to manage SMIL markup independently. The API to deliver content as attachments without the SMIL, or deliver pre-existing SMIL still persists, but this new functionality helps developers take the next step. Read the full article The Multimedia Content API can be used in conjunction with the submit and deliver messages to allow users to compose and decompose SMIL-based multimedia content. With this API, a user can make presentations or slide shows with SMIL content. The API also allows clients to import SMIL-based content developed using a third-party tool. The SMIL generated and understood by this API conforms to the MMS Conformance Document available from the Open Mobile Alliance website as part of the OMA Multimedia Messaging Service version 1.1 specifications. The API consists of objects corresponding to the different multimedia objects that
can be sent in a multimedia message, such as The The MultimediaContent constructor can construct a To compose SMIL-based multimedia content, follow these steps:
...
Slide slide = Factory.getInstance().newSlide();
if( textFile != null ) {
slide.setText( new Text( new File( textFile ), null ) );
}
if( imageFile != null ) {
slide.setImage( new Image( new File( imageFile ) ) );
}
if( audioFile != null ) {
slide.setAudio( new Audio( new File( audioFile ) ) );
}
if( duration > 0 ) {
slide.setDuration( duration );
}
...
Once the slide (or slides) are built, sending them is pretty straight forward:
...
SubmitRequest request = createSubmitRequest( slides, mmFiles, userName, recipients );
Response response = null;
try {
response = conn.sendRequest( request );
SubmitResponse submitResponse = ( SubmitResponse ) response;
printResponse( submitResponse );
} catch( ClassCastException cce ) {
...
So, we've taken a very quick look at the MultiMedia APIs that are part of the Openwave MMS SDk 2.1. If you've not done so already, besure to take a look at the MMS Quickstart Guide , and Chapter 10 of the MMS Developer Guide. See you next time! |