I am writing application which intented to replace standard/stock messenger. So I need to define default ringtone for incoming messages. I mean incoming SMS notification ringtone.
Anyone knows how to get it?
To retrieve the Ringtone
object of the default ringtone, use the RingtoneManager
:
Ringtone ringtone = RingtoneManager.getRingtone(context, Settings.System.DEFAULT_RINGTONE_URI);
If the user has changed the default ringtone to a ringtone provided in a 3rd party messager app, AFAIK you can't access the new ringtone unless the 3rd party app exposes its ringtones via a ContentProvider
.