乌里为默认的声音通知?声音、通知

由网友(身居梦海°)分享简介:我用的是Notification.Builder建立一个通知。现在我想使用默认的声音通知有:I use the Notification.Builder to build a notification.Now I want to use the default sound notification with:b...

我用的是Notification.Builder建立一个通知。 现在我想使用默认的声音通知有:

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?

推荐答案

请尝试使用 RingtoneManager 获得默认通知的URI:

try using RingtoneManager to get Default Notification Uri as:

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

builder.setSound(uri);
阅读全文

相关推荐

最新文章