最終更新:2017-09-07 (木) 18:35:17 (19d)  

AudioManager.setStreamMute はてなブックマークを見る
Top / AudioManager.setStreamMute

deprecated in Android/APIレベル23. use AudioManager.adjustStreamVolume with ADJUST_MUTE? or ADJUST_UNMUTE? instead.

メモ

  • if ( Build.VERSION.SDK_INT >= 23 ) {
    	am.adjustStreamVolume(AudioManager.STREAM_MUSIC, AudioManager.ADJUST_UNMUTE, 0);
    }else {
    	am.setStreamMute(AudioManager.STREAM_MUSIC, true);
    }