How to stop sound/music in J2ME for S60

252 Views Asked by At

I am trying to stop sound when user exits the application by pressing Hang up key in Series 60. But the application goes to background and the sound still plays.

I want to stop the sound when user clicks the Hang up key of the device. I called the stop() method of Player. I also called the stop() method at hidNotify();

{
    Player p;

    p.start();
    p.stop();
}
1

There are 1 best solutions below

0
mr_lou On

The AMS calls (or should call) the destroyApp() method of the MIDlet when the user exits.

Try putting your p.stop() command in there. (And other clean-up code too).