Hi there! I am fiddling around with a dialog that pops up and displays an alarm information. (I know, it has been documented that in Android it's "better" style to use notifications instead, but just like the alarm clock I want it to display a dialog on top of whatever you do to really get the users immediate attention - as the user expects this behavior I don't think it's bad style!)
Now - the only easy way I found is using the RingtoneManager.getRingtone()
function to get a Ringtone
object for the type "alarm".
Well, I can play that sound now using Ringtone.play()
- but it plays the sound only once and I cannot figure out how to let it play endlessly until the user reacts, e.g. by touching the dialog anywhere or dismissing it using Cancel button provided.
Does anyone know how this can be accomplished easily? Thanks!