Exit Print View

Java Platform Micro Edition Software Development Kit Version 3.0, Mac OS

Get PDF Book Print View

Document Information

Getting Started


Using Sample Projects

Creating and Editing Projects

Viewing and Editing Project Properties

Running Projects in the Emulator

Searching the WURFL Device Database

Finding Files in the Multiple User Environment

Profiling Applications

Network Monitoring

Lightweight UI Toolkit

Security and MIDlet Signing

CLDC Emulation on a Windows Mobile Device

Installing CLDC Emulation on a Windows Mobile Emulator (Windows Only)

On-device Debugging

Command Line Reference


JSR Support

JSR 75: PDA Optional Packages

JSR 82: Bluetooth and OBEX Support

JSR 135: Mobile Media API Support

Media Types

MMAPI MIDlet Behavior

Ring Tones

Running AudioDemo

Running MMAPIDemos

JSR 172: Web Services Support

JSR 177: Smart Card Security (SATSA)

JSR 179: Location API Support

JSR 180: SIP Communications

JSR 184: Mobile 3D Graphics

JSR 205: Wireless Messaging API (WMA) Support

JSR 211: Content Handler API (CHAPI)

JSR 226: Scalable 2D Vector Graphics

JSR 229: Payment API Support

JSR 238: Mobile Internationalization API (MIA)

JSR 256: Mobile Sensor API Support


Running MMAPIDemos

The MMAPIDemos application contains four MIDlets that showcase the SDK’s multimedia capabilities:

Simple Tones

Simple Tones demonstrates how to use interactive synthetic tones. Select a sample, then click Play on the lower right.

Simple Player

The Simple Player application demonstrates the range of audio and video capabilities of the emulator. It includes sample files in a variety of formats and can play files from the emulator's persistent storage or from HTTP URLs.

The player portion uses a generic javax.microedition.media.Player interface. The player displays duration, media time, and controls for running the media file. If metadata is available in a file, the player enables you to view the information, such as author and title. In the case of MIDI files, if karaoke text is present in the file, it displays on the screen during play. Graphical user interface controls can be viewed on the display screen if applicable. You can access these controls by selecting one of the media samples in Simple Player, then pressing the Menu button to view and select the desired command.

Select Simple Player then click Launch. The demo includes the following media samples:

In addition, Simple Player parses ring tones in Ringing Tones text transfer language (RTTTL). See http://www.convertyourtone.com/rtttl.html for information on RTTTL.

The Simple Player includes a common set of commands that control media playback. The commands are available from the Simple Player menu, and some have associated keypad buttons. Simple Player Commands  describes these commands, their availability, and their keypad equivalents. The commands may or may not be available depending on the media type that Simple Player is playing.

Note that a short list of commands and the corresponding keypad buttons is available in the Simple Player application itself. Just choose the Quick Help command from the menu.

Simple Player Commands 
Menu Item
Turns off sound but the file continues to play. This command toggles to Unmute.
Increases or decreases loudness.
Displays information provided by the media file such as copyright information, title, and track list.
Stop in 5 seconds
Pauses the audio play in five seconds when set during playback.
Alters the rate of speed of playback.
Increases or decreases the tempo of the tone sequence or MIDI file.
Lowers or raises the notes in a MIDI file.
Skip Forward
Skips forward five percent of the duration of the media file. The sound track syncs to the video
Skip Backward
Skips backward five percent of the duration of the media file. The sound track syncs to the video.
Returns to the start time of the audio playback.
Quick Help
Displays a list of commands and keypad buttons.

The Video application illustrates how the emulator is capable of playing animated GIF files and capturing video. On a real device with a camera, video capture can be used to show the user what the camera sees.

Animated GIFs and video capture can be implemented using either a Form Item or a Canvas. The Video demonstration includes all the possibilities. Animated GIF - Form [jar] shows an animated GIF as a Form Item. The form also includes some information about the playback, including the current time. Choose the Snapshot command to take a snapshot of the running animation. The snapshot will be placed in the form following the animated GIF.

Attributes for MobileMediaAPI

The MobileMediaAPI applications have the following editable attributes. Right-click on the project and select Properties. Select Application Descriptor and view the Attributes tab.

Descriptions of MMAPI-specific MIDlet attributes
Name of the nth media title to be played back by the Simple Player MIDlet.
Location of the nth media title, PlayerTitle-n, to be played back by the Simple Player MIDlet.
The name of the nth media title to be played back by the Video application.
Location of the nth media title, VideoTest-n, to be played back by the Video application.