Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. // Get the AudioManager service
  2. AudioManager audio = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
  3.  
  4. // Check for mute using isStreamMute(int)
  5. if (audio.isStreamMute(AudioManager.STREAM_MUSIC)) {
  6. Toast.makeText(this, "Music is muted (isStreamMute)", Toast.LENGTH_SHORT).show();
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement