最終更新:2021-10-18 (月) 13:43:02 (45d)  

AudioManager.setStreamMute
Top / AudioManager.setStreamMute

deprecated in Android/APIレベル23. use AudioManager.adjustStreamVolume with AudioManager.ADJUST_MUTE or AudioManager.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);
    }