In my application I have in the settings an option for the user to select the sound that will be executed when receiving notification.
ThenIopenAlertDialog
andlistthedefaulttouchofthedeviceitself:
UridefaultRingtoneUri=RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);RingtonedefaultRingtone=RingtoneManager.getRingtone(context,defaultRingtoneUri);
Igetthetitleandlocationwith:
//TitulodefaultRingtone.getTitle(context)//PathdefaultRingtoneUri.getPath()
Andtheothernotifications,likethis:
RingtoneManagermanager=newRingtoneManager(context);manager.setType(RingtoneManager.TYPE_NOTIFICATION);Cursorcursor=manager.getCursor();
Thetitleandlocation,afterdoingtheloop,Igetwith:
//Títulocursor.getString(RingtoneManager.TITLE_COLUMN_INDEX)//Pathcursor.getString(RingtoneManager.URI_COLUMN_INDEX)+"/" + cursor.getString(RingtoneManager.ID_COLUMN_INDEX)
Problem
What happens is that the first name of the notification (which I get by the first code), on my device the title shows Default ring (Tejat) , which is true, however when I go playing the sound is a different and not the Tejat .
And when I play Tejat obtained by RigntoneManager
, it's the correct sound.
Standard Tejat : / system / notification_sound
Tejat : content: // media / internal / audio / media / 7
Question
What happens so that the default ring tone is not really the correct one? How do I resolve this?