Search code examples
androidsoundpool

Android SoundPool how to load Settings.System.DEFAULT_NOTIFICATION_URI


i'm trying to load the phone default notification sound into my SoundPool.

i've tried

soundPool.load(Settings.System.DEFAULT_NOTIFICATION_URI.getPath(), 1)

and got

11-19 20:57:39.770: E/SoundPool(2948): error loading /system/notification_sound

how can i load it ?


Solution

  • found my answer in this thread.

    RingtoneManager.getRingtone(this, Uri.parse("content://media/internal/audio/media/122")).play();