title: What's different between OnPreferenceChangeListener and OnSharedPreferenceChangeListener
body: <p>I want to get value of a checkboxpreference. which method is suitable for listen to preference?</p>
  
  <p>And what's real difference between OnPreferenceChangeListener and OnSharedPreferenceChangeListener ?!</p>
  
  <p><strong>UPDATE</strong>
  Why onSharedPreferenceChanged not called?</p>
  
  <pre><code>public class Setting extends PreferenceActivity implements
          OnSharedPreferenceChangeListener // ,OnPreferenceChangeListener
  {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          addPreferencesFromResource(R.xml.preferences);// deprecated warning
      }
  
      @Override
      public void onSharedPreferenceChanged(
              SharedPreferences sharedPreferences, String key) {// DO Stuff
      }
  
      @Override
      protected void onResume() {
          super.onResume();
          // getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
          // PreferenceManager.getDefaultSharedPreferences(this).registerOnSharedPreferenceChangeListener(this);
          this.getSharedPreferences("myPrefDB", MODE_PRIVATE)
                  .registerOnSharedPreferenceChangeListener(this);
      }
  
      @Override
      protected void onPause() {
          super.onPause();
          // getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
          // PreferenceManager.getDefaultSharedPreferences(this).unregisterOnSharedPreferenceChangeListener(this);
          this.getSharedPreferences("myPrefDB", MODE_PRIVATE)
                  .unregisterOnSharedPreferenceChangeListener(this);
      }
  }
  </code></pre>