tags:

views:

491

answers:

2

A Checkbox found in the Ringer Volume settings that allows you to set a separate Notification volume and incoming call volume

Is there a way to Check/Uncheck the Check box for Notification volume programatically.

A: 

I don't recall seeing an API to do this, but you could try altering the notification (or ringer) volume programmatically to see whether that lets it "break free" of the ringer volume.

See AudioManager.adjustStreamVolume(STREAM_NOTIFICATION, ADJUST_RAISE, 0).

Christopher
Hi Christopher,This will raise the notification volume only when the check box is uncheked in the ringer volume settings, Otherwise it will simply raise the ringer volume because both ringer volume and the notification volumes are tied together.
Vinayak.B
+1  A: 

There is a hidden but editable preference in the Settings.System class that determines whether the notification volume is tied to the ringer volume.

It's called NOTIFICATIONS_USE_RING_VOLUME and is marked in the source code as hidden, with the well-commented reason that it will be removed from the platform at some point in the future.

The setting has an integer value of 0 if ringer and notification volumes are independent; 1 otherwise.

Christopher
Thanks I Got it.
Vinayak.B