Stopping playback when a MIDlet is switched to the background

S60 devices are Symbian OS devices and support multitasks. When switching a MIDlet to the background, audio stream playback does not stop. Developers should implement stopping playback at the moment the MIDlet loses foreground. With a low-level UI, such as Canvas and GameCanvas, stopping playback can be implemented in the Canvas.hideNotify() method, which is called just after the MIDlet loses the foreground. Restarting playback can be implemented in the Canvas.showNotify() method, which is called just before the MIDlet returns to the foreground. With a high-level UI, such as List and Form, Displayable.isShown() can be used to check whether the calling Displayable is actually visible on the display. Developers can implement checking isShown() in a proper frequency to stop or restart playback.