I have a countdown timer in my activity and when it reaches zero I send a notification to the status bar which also plays a custom wav file to alert the user. I only want t
In 'Adding a sound' section in http://developer.android.com/guide/topics/ui/notifiers/notifications.html there is this note :
Note: If the defaults field includes DEFAULT_SOUND, then the default sound overrides any sound defined by the sound field.
So, if you want to customize only sound, you may use -
notification.sound = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.notifysnd);
notification.defaults = Notification.DEFAULT_LIGHTS | Notification.DEFAULT_VIBRATE;