Not able to play Notification audio file (sound) (SDK m3-rc3

Put your problem here if it does not fit any of the other categories.

Not able to play Notification audio file (sound) (SDK m3-rc3

Postby kalkar.prashant » Tue Feb 26, 2008 12:03 pm

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 file:///system/media/audio/ringtones/em_ringtone1.mp3


Am I doing anything wrong? Please help.

I am using SDK m3-rc37a.

Regards,
Prashant
kalkar.prashant
Freshman
Freshman
 
Posts: 4
Joined: Tue Feb 26, 2008 12:00 pm

Top

Postby kalkar.prashant » Wed Feb 27, 2008 11:44 am

can anyone help in this issue?
kalkar.prashant
Freshman
Freshman
 
Posts: 4
Joined: Tue Feb 26, 2008 12:00 pm

Postby WauloK » Fri Feb 29, 2008 3:46 am

Is the mp3 smaller than 1Mb?
AndroidChi - Applications for the Google Android platform.
User avatar
WauloK
Developer
Developer
 
Posts: 32
Joined: Wed Dec 19, 2007 4:32 am
Location: Sydney, Australia

Postby kalkar.prashant » Fri Feb 29, 2008 10:40 am

Yes the file is less than 1MB in size. Is that a problem?
kalkar.prashant
Freshman
Freshman
 
Posts: 4
Joined: Tue Feb 26, 2008 12:00 pm

Postby WauloK » Fri Feb 29, 2008 11:39 am

No. There have been issues with audio files BIGGER than 1mb
AndroidChi - Applications for the Google Android platform.
User avatar
WauloK
Developer
Developer
 
Posts: 32
Joined: Wed Dec 19, 2007 4:32 am
Location: Sydney, Australia

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google Feedfetcher and 18 guests