I play with Android to find out the API, and I'm trying to code an action that can listen to changes in audio events. For example, when I press a button, I create a random ringtone. The text โRandom Ringtoneโ is displayed on the button, but when you press the button, it says โStopโ, and pressing it, of course, stops playing the ringtone.
However, the problem is that when the melody stops playing by itself, the button still says โstopโ.
I looked around to try to find an event listener that could listen when the melody stops playing, but I cannot find it. I saw some information about creating your own listeners, but I'm not interested in doing this (a bit advanced for me right now).
Is there an event listener of this type?
source share