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?
try using RingtoneManager to get Default Notification Uri as:
Uri uri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); builder.setSound(uri);
builder.setSound(Settings.System.DEFAULT_NOTIFICATION_URI)
works as well
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With