MIDlet device availability events are sent through the javax.microedition.media.PlayerListener
interface. The
device sends the DEVICE_UNAVAILABLE
state event
to the registered PlayerListeners
when a player
becomes unavailable, and DEVICE_AVAILABLE
state
event when the device is again available. The player will be in the
realized state when it becomes available, so the MIDlet will not need
to call the realize
method before restarting
the sound.
Note: When a voice call interrupts the MMAPI MIDlet use, Series
40 devices send the DEVICE_UNAVAILABLE
event.