I\'m trying to make a custom sound play on a status bar notification. The .mp3 file is in res/raw/. But when I notify the user the sound is not played. I\'ve t
From the documentation for ContentResolver:
The Uri should be one of the following formats: android.resource://package_name/id_number
You are passing the String "R.raw.notificationsound" which means nothing. Instead try this:
notification.sound = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.notificationsound );