如何在 notification 上添加声音?

如何添加声音到一个notification中,这个notification是通过NotificationCompat.Builder创建的。我在res中创建了一个原始文件夹,然后添加了声音。那么现在如何把声音添加到notification中?
有关 Notification 代码:

 int NOTIFY_ID=100;
    Intent notificationIntent = new Intent(this, Notification.class);
    PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT);

    NotificationCompat.Builder mBuilder =
            new NotificationCompat.Builder(this)
            .setContentIntent(pendingIntent)
            .setSmallIcon(R.drawable.notification)
            .setContentTitle("Warning")
            .setContentText("Help!")

    NotificationManager mgr = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
    mgr.notify(NOTIFY_ID, mBuilder.build());

NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(this);
Notification notification = mBuilder.build();
notification.sound = Uri.parse("your path");

源码里一段代码,这个应该也可以,ringtoneStr是音频uri

final Notification.Builder noti = new Notification.Builder(context)
                .setWhen(mostRecentNotification.mTimeMillis);
noti.setSound(TextUtils.isEmpty(ringtoneStr) ? null : Uri.parse(ringtoneStr));

关键是追加声音设置时,注意Uri问题就好了,其实声音提醒可以直接调系统自带的声音就可以了