title: How to implement SharedPreferences.OnSharedPreferenceChangeListener?
body: <p>What I'm doing is this :</p>
  
  <pre><code>class Act extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener {
  </code></pre>
  
  <p>After that override one method</p>
  
  <pre><code> @Override
  public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {       
  
  }
  </code></pre>
  
  <p>I'm changing my keys in service class using SharedPreferences I want to get notified as soon as preferences in Service class gets changed.
  Thank you.</p>