Design

The AudioOutputControl MIDlet shows you how to:

  • Retrieve a list of all the audio output modes supported by the device

  • Set the audio output mode to the device loudspeaker (PUBLIC) or headset (PRIVATE)

  • Retrieve the current audio output mode

  • Retrieve the previous audio output mode set by the setOutputMode method

  • Receive notifications when the audio output mode changes

The MIDlet is also configured to ignore automatic audio muting. If you want the example MIDlet to follow the default audio muting behavior, remove the Nokia-UI-Enhancement JAD attribute from the AudioOutputControlMidlet.jad file and install the MIDlet using the modified file.

To use the MIDlet on your Symbian device:

  1. Install and launch the MIDlet on the device.

  2. Create a player for one media type by selecting Options > Create [player].

    Figure: Creating a player

  3. Start the media playback by selecting Options > Start playback.

    Figure: Starting playback

  4. Set the audio output mode by selecting Options > Set mode [mode]. The MIDlet displays a notification when the audio output mode becomes active.

    Figure: Setting the audio output mode

  5. Retrieve the currently used audio output mode by selecting Options > Get active mode. The MIDlet displays the name of the current audio output mode.

  6. Close the player by selecting Options > Close player.

  7. Repeat steps 2 through 6 for another media type.

  8. Exit the MIDlet.

For instructions on how to implement the MIDlet, see section Implementation.