title: Android AudioManager Event Listener?
body: <pre><code>AudioManager am = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
  
  switch (am.getRingerMode()) {
  case AudioManager.RINGER_MODE_SILENT:
      Log.i("MyApp","Silent mode");
      break;
  case AudioManager.RINGER_MODE_VIBRATE:
      Log.i("MyApp","Vibrate mode");
      break;
  case AudioManager.RINGER_MODE_NORMAL:
      Log.i("MyApp","Normal mode");
      break;
  }
  </code></pre>
  
  <p>Using the above code, I can successfully find the various AudioManager RINGER_MODE* types, however I can't seem to find an EventListener that catches when the state has changed. The application I am writing runs in the background, so I'd like to know the the most timely fashion of checking the state of the AudioManager.RINGER_MODE.</p>