乌里为默认的声音通知? [英] Uri to default sound notification?
本文介绍了乌里为默认的声音通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用的是<一href="http://developer.android.com/reference/android/app/Notification.Builder.html">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);
这篇关于乌里为默认的声音通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文