Exit Print View

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

Get PDF Book Print View
 

Document Information

Getting Started

Features

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

Logs

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

Index


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 
Command
Menu Item
Description
Mute/Unmute
1
Turns off sound but the file continues to play. This command toggles to Unmute.
Play
2
Volume
3
Increases or decreases loudness.
META Data
4
Displays information provided by the media file such as copyright information, title, and track list.
Stop in 5 seconds
5
Pauses the audio play in five seconds when set during playback.
Loopmode
6
Rate
7
Alters the rate of speed of playback.
Tempo
8
Increases or decreases the tempo of the tone sequence or MIDI file.
Pitch
9
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.
Rewind
Returns to the start time of the audio playback.
Quick Help
Displays a list of commands and keypad buttons.
Video

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
Attribute
Description
PlayerTitle-n
Name of the nth media title to be played back by the Simple Player MIDlet.
PlayerURL-n
Location of the nth media title, PlayerTitle-n, to be played back by the Simple Player MIDlet.
VideoTest-n
The name of the nth media title to be played back by the Video application.
VideoTest-URLn
Location of the nth media title, VideoTest-n, to be played back by the Video application.