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:
Install and launch the MIDlet on the device.
Create a player for one media type by selecting Options > Create [player].
Figure: Creating a player
Start the media playback by selecting Options > Start playback.
Figure: Starting playback
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
Retrieve the currently used audio output mode by selecting Options > Get active mode. The MIDlet displays the name of the current audio output mode.
Close the player by selecting Options > Close player.
Repeat steps 2 through 6 for another media type.
Exit the MIDlet.
For instructions on how to implement the MIDlet, see section Implementation.