title: Setting silent mode at a specific date and time
body: <p>I'd like to set the ringer mode to silent for specific events in the future. It should only happen if a checkbox in the preferences is checked. I know that I have to update the manifest for the permissions and also that I can set the ringer mode with something like this:</p>
  
  <pre><code>if (getPreferences(MODE_PRIVATE).getBoolean(PREFS_KEY_SILENTOPTION, false)) {
     AudioManager audioManager = (AudioManager) getSystemService(AUDIO_SERVICE);
     audioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);
  }
  </code></pre>
  
  <p>But how can I set (and reset) it for a space of time in the future?</p>