audio - Why won't my android program close when I close it? -


i made android app plays mario sound when jump. works fine (sort of), when close it, still works. tried using ondestroy method, dosen't seem delete objects created or something...

here code. http://pastebin.com/gckrbkv9

try putting code stop playing inside onpause() instead of ondestroy() so:

@override public void onpause() {         super.onpause();         sp.stop(jump);         sp.release(); } 

it's quite possible activity not yet destroyed , sent background, ondestroy() not yet called if "close" app.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -