title: How to register ContentObserver for media volume change?
body: <p>I encountered a problem when I wanted to implement volume change detection.
  As the change detection has to be detected in the background via Service, I can not intercept volume key presses.</p>
  
  <p>I've tried ContentObserver to listen for volume settings change, but it didn't worked.
  But I've dig a bit more, and found that my ContentObserver detects volume change when I register it like this:</p>
  
  <pre><code>this.getApplicationContext().getContentResolver().registerContentObserver( 
      android.provider.Settings.System.CONTENT_URI, true, 
      mSettingsContentObserver );
  </code></pre>
  
  <p>I've tried to change the first parameter - the URI of setting to listen, if I understand correctly. But I achieved nothing. So, how can this be done? I don't want to update my UI(I'm setting Seekbar to certain positin) on every settings change.</p>
  
  <p>So, how do I register content observer to listen for media volume change?</p>
  
  <p>Here's the code of ContentObserver:</p>
  
  <pre><code>public class SettingsContentObserver extends ContentObserver {
  
   public SettingsContentObserver(Handler handler) {
       super(handler);
   } 
  
   @Override
   public boolean deliverSelfNotifications() {
        return super.deliverSelfNotifications(); 
   }
  
   @Override
   public void onChange(boolean selfChange) {
       super.onChange(selfChange);
       myMethod();
   }
  }
  </code></pre>