1

Ringtone plays over and over again (looping infinitely)

view story
linux-howto

http://stackoverflow.com – I have an Android app that plays a notification ringtone (RingtoneManager.TYPE_NOTIFICATION) when certain events are sent to a BroadcastReceiver. The code that plays the ringtone basically does: onReceive(Context context, Intent intent) { ... Uri ringtoneUri = someFunctionToLookupAValidNotificationRingtoneUri(); ... Ringtone tone = RingtoneManager.getRingtone(context, uri); Log.v(TAG, "About to play ringtone"); tone.play(); } Every so often when this code is run, the ringtone starts playing over and over again infinitely. Sometime (HowTos)