TABLE 10

Simple

Player commands

 

 

 

Command

Key

Description

 

 

 

Loop Mode

 

Plays back the audio file immediately after completion of play.

 

 

Running Loopmode once plays the audio file once. Pressing a

 

 

second time plays the file three times. Pressing a third time

 

 

plays the file repeatedly. Pressing a fourth time returns to single

 

 

play.

Skip

1 and

Skips forward or backward five percent of the duration of the

 

3

media file. The sound track syncs to the video.

Rewind

 

Returns to the start time of the audio playback.

Stop and

5

Stops plaback and rewinds to the start time.

Rewind

 

 

Quick Help

 

Displays a list of commands and keypad buttons.

 

 

 

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, their keypad equivalents, and the relevant class from MMAPI.

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.

A.6.3 PausingAudioTest

This MIDlet exists to demonstrate how the J2ME Wireless Toolkit will warn you if a paused MIDlet has not stopped its running Players. After you launch the MIDlet, choose the Play command to start playing some audio. The screen displays a status, which is either “Well-behaved” or “Not Well-Behaved.”

Pause the MIDlet by choosing MIDlet > Pause from the emulator window’s menu. As expected, the MIDlet is paused and no message is displayed on the KToolbar console. Restart the MIDlet by choosing MIDlet > Resume from the emulator window’s menu.

Now choose the Misbehave command. Pause the MIDlet again. In the KToolbar console, you will receive a short lecture about how well-behaved MIDlets release resources when they are paused.

A.6.4 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.

90 J2ME Wireless Toolkit User’s Guide • October 2004

Page 102
Image 102
Sun Microsystems J2ME manual PausingAudioTest, Video