Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notification in Android with Sound?

Tags:

android

I have include the Notification with sound. I have tried both as Default and load particular mp3 from sd card. Now my question i include the Raw data in the Eclipse i.e. in the res->raw->sound.ogg suppose i want to use this sound for my notification then how can i use it? Please help me...

like image 286
senthil Avatar asked Jan 25 '26 07:01

senthil


1 Answers

When you create notification there is Notification.sound field. For filling it with raw resource use Uri:

Uri.parse("android.resource://your.package.name/" + R.raw.sound);
like image 198
Jin35 Avatar answered Jan 27 '26 21:01

Jin35