I have an app that is open for hours and uses a background service with foreground notification attached to it. Every once in a while a sound is played using:
try {
Ringtone r = RingtoneManager.getRingtone(context, uri);
r.play();
} catch (Exception e) {
e.printStackTrace();
}
The sounds are working, but after a while the sounds don't play anymore.
No errors, no warnings, no crashes. Just no sound.
My users are complaining as well, so it doesn't look like a device specific issue.
Android Docs don't mention anything about this. Anyone knows why this is?