kivy/kivy — Issue #396: Android: Sound.on_stop doesn't work
Author: dcower
Created: 2012-02-01 00:29:39+00:00
State: open

On both of the Android phones I've tried it on, Sound.on_stop doesn't get called when the sound stops. I've tried it on a Motorola Droid 1 and a Samsung Galaxy S. It works on Windows 7. Here's an example:

from kivy.app import App
from kivy.uix.widget import Widget
from kivy.core.audio import SoundLoader

class MyApp(App):
def build(self):
sound = SoundLoader.load("some_sound.ogg")
sound.on_stop = sound.play
sound.play()

return Widget()

if __name__ in ('__android__', '__main__'):
MyApp().run()