Plays a random sound from a specified directory when activated. Useful for a home screen widget.
The "Choose Directory" flow lets the user choose a directory containing the desired sounds.
The "Play Random Sound" flow chooses a random file from the specified directory (prompting the user for one if it hasn't been specified yet) and plays it. A notification with the sound filename is shown and stops the sound when tapped.
The specified directory mustn't be empty and may only contain sound files. Otherwise the flow may fail.
Contents of the directory are read anew every time the flow is activated, so changes are reflected immediately.