3 messages in com.googlegroups.android-beginnersNot able to play Notification audio f...
FromSent OnAttachments
Prashant Kalkar25 Feb 2008 16:27 
Prashant Kalkar25 Feb 2008 23:02 
Prashant Kalkar27 Feb 2008 02:38 
Subject:Not able to play Notification audio file (sound) (SDK m3-rc37a)
From:Prashant Kalkar (kalk@gmail.com)
Date:02/25/2008 04:27:30 PM
List:com.googlegroups.android-beginners

Hi,

I am trying to play a audio file (ring tone) for an notification, for that I set Notification.sound property to an content URI of a file. Like this

ContentURI fileURI = ContentURI.Create(audioFile); // audioFile is of type File. notification.sound = fileURI;

NotificationManager.notify(ID, notification);

But I am getting following error in the logcat:

W/NotificationMgr( 472): error loading sound for /system/media/audio/ringtones/em_ringtone1.mp3

Am I doing anything wrong? Please help.

I am using SDK m3-rc37a.

Regards, Prashant