I'm trying to change the volume of notification stream (not ring) on a HTC One with android 4.3. I'm using this code:
int setting = Settings.System.getInt(getContentResolver(), "notifications_use_ring_volume", -20);
boolean b = Settings.System.putInt(getContentResolver(), "notifications_use_ring_volume", 1 - setting);
so everytime b is true(meaning that the change has been made) and everytime I'm putting 0 or 1. Now, after I'm changing the value, when I read it, it displays the value that I've updated in the avove code, but when I'm going to Settings->Sound->Volumes, the
"Use ringtone volume for notifications"
checkbox remains unchanged (when that setting is 0 or 1). Am I missing something here? How to update this setting from code so I can see in the phone's settings this change?