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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -