Uri to default sound notification?

StefMa picture StefMa · Jun 30, 2012 · Viewed 82.7k times · Source

I use the Notification.Builder to build a notification. Now I want to use the default sound notification with:

builder.setSound(Uri sound)

But where is the Uri to the default notification?

Answer

ρяσѕρєя K picture ρяσѕρєя K · Jun 30, 2012

try using RingtoneManager to get Default Notification Uri as:

Uri uri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);

builder.setSound(uri);