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 w
A good example of how to use the notification bar, configure sounds and leds can be found in this tutorial:
http://www.firstdroid.com/2010/05/09/learn-by-example-using-notification-bar/
Hope it helps, Adrian.
here it is
RingtoneManager.setActualDefaultRingtoneUri(this, RingtoneManager.TYPE_NOTIFICATION, uriObjectofYourAudioFile);
You can control this on a per-Notification
basis via the sound field on Notification. Note that I haven't tried this personally, but it's what the docs say.
This might be helpful
notification.sound = Uri.parse("android.resource://com.packagename.org/raw/alert");