title: How to check if phone is mute, vibrate or loud in android
body: <p>This is my code to mute/unmute phone. But I would like to check if phone is alreay on mute and if is not then i will mute it. If is in vibrate then i will make it normal.</p>
  
  <p>Can i check this states somehow?</p>
  
  <pre><code>public void changeRingerMode(Context context){
  
  AudioManager audio = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
  
      /**
      * To Enable silent mode.....
      */
      audio.setRingerMode(AudioManager.RINGER_MODE_SILENT);
  
      /**
      * To Enable Ringer mode.....
      */
      audio.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
  
  }
  </code></pre>