Viewing and Editing Project Properties
Running Projects in the Emulator
Searching the WURFL Device Database
Finding Files in the Multiple User Environment
JSR 82: Bluetooth and OBEX Support
JSR 135: Mobile Media API Support
Running the MMAPI Sample Project
JSR 177: Smart Card Security (SATSA)
JSR 205: Wireless Messaging API (WMA) Support
JSR 211: Content Handler API (CHAPI)
JSR 226: Scalable 2D Vector Graphics
JSR 238: Mobile Internationalization API (MIA)
JSR 256: Mobile Sensor API Support
The MMAPIDemos application contains four MIDlets that showcase the SDK’s multimedia capabilities:
Simple Tones demonstrates how to use interactive synthetic tones. Select a sample, then click Play on the lower right.
Short Single Tone and Long Single Tone use Manager.playTone() to play tones with different pitch.
Short MIDI event plays a chord on the interactive MIDI device (locator "device://midi"). The shortMidiEvent() method of MIDIControl is used to trigger the notes of the chord.
To run the MMAPI Drummer demo, click or type number keys (0-9). Each number plays a different sound.
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:
Bong plays a short WAV file. You can adjust certain playback features, as described later in this document. The display shows the duration of the sound in minutes:seconds:tenths of a second, for example 00:17:5. This audio sample is a resource file in the MIDlet suite JAR file.
MIDI Scale plays a sample musical scale. The display shows the title of the selected music file, the duration of the song, the elapsed time during playback, and the current tempo in beats per minute (bpm). This MIDI file is stored in the MIDlet suite JAR file.
Simple Ring Tone plays a short sequence of Beethoven's Fifth Symphony. The display shows the title of the selected music file, the duration of the song, the elapsed time in seconds and tenths of a second during playback, and the current tempo in beats per minute (bpm). This ringtone file (.jts format) is stored in the MIDlet suite JAR file.
WAV Music plays a brief audio file. The display shows the title of the audio file, the duration of the audio the elapsed time during playback, and the playback rate in percent. This WAV file is retrieved from an HTTP server.
MIDI Scale plays a MIDI file that is retrieved from an HTTP server.
The Animated GIF example shows an animated GIF that counts from 1 to 5. The file is stored in the MIDlet suite JAR file.
Audio Capture from a default device lets you capture audio from a microphone or connected device. The sound is captured and played back on the speaker. To avoid feedback, use a headset.
Video Capture Simulation simulates viewing input video such as might be possible on a device equipped with a camera.
MPEG1 Video [http]. Plays an MPEG video found at http://java.sun.com/products/java-media/mma/media/test-mpeg.mpg.
[enter URL] allows you to play back media files from arbitrary HTTP servers. Type a valid URL (for example, http://java.sun.com/products/java-media/mma/media/test-wav.mpg) at the insertion point and click OK to play a file. If you want to open an HTTP directory from which to select media, be sure to add a slash to the end of the URL.
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.
The commands may or may not be available depending on the media type that Simple Player is playing. In addition, some commands can be invoked using the keypad buttons. The following table describes the availability of commands and their keypad equivalents.
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.
|
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.
Animated GIF - Canvas [jar] shows an animated GIF in a Canvas. A simple indicator shows the progress through the animation. Choose Snapshot to get a still image of the current appearance. The snapshot is shown briefly, then the display goes back to the animation.
Video Capture - Form simulates capturing video from a camera or other source and showing it as an Item in a Form. Choose the Snapshot command to take a snapshot of the captured video. The snapshot will be placed in the form following the video capture.
Video Capture - Canvas simulates capturing video from a camera or other source and showing it in a Canvas. Choose Snapshot to get a still image of the current appearance. The snapshot is shown briefly, then the display goes back to the video capture.
MPEG1 Video - Form, MPEG1 Video - Canvas
The MPEG1 applications obtain MPEGs from the web, so if you are behind a firewall, you must configure the emulator’s proxy server settings, as described in Configuring the Web Browser and Proxy Settings.
When you play the demo, expect to wait a few seconds while the demo obtains the data. The MPEG1 demos have the same behavior as Video Capture - Form and Video Capture - Canvas, respectively.
The MobileMediaAPI applications have the following editable attributes. Right-click on the project and select Properties. Select Application Descriptor and view the Attributes tab.
|