Android Stop Counter and Destroy Media Player

Posted by dweebsonduty on Stack Overflow See other posts from Stack Overflow or by dweebsonduty
Published on 2010-06-12T23:30:21Z Indexed on 2010/06/12 23:32 UTC
Read the original article Hit count: 204

Filed under:
|
|

I am working on an app that beeps every second. When I hit the home button I want it to close the program and stop beeping. Right now it closes the program but continues to beep.

What am I doing wrong?

        if ((keyCode == KeyEvent.KEYCODE_HOME)) {
        isdone = true;
        mp.release();
        counter.cancel();
        finish();
    }

© Stack Overflow or respective owner

Related posts about android

Related posts about timer