Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change notification sound by code in android?

Anyone knows how to change notification sound by code in android. I have managed to set the default ringtone, but cant find a way to set the notification tone...

I would be thankful for any response, as code example, psudo code or just name of a which part of the sdk i need to use...

like image 716
Vidar Vestnes Avatar asked Nov 20 '09 14:11

Vidar Vestnes


1 Answers

here it is

RingtoneManager.setActualDefaultRingtoneUri(this, RingtoneManager.TYPE_NOTIFICATION,      uriObjectofYourAudioFile);
like image 155
user1068968 Avatar answered Nov 09 '22 13:11

user1068968