📜  将电话静音 kotlin 代码示例

📅  最后修改于: 2022-03-11 14:53:31.850000             🧑  作者: Mango

代码示例1
private fun mutePhone() {
          // permission needed
          // 
        val audiomanager = getSystemService(Context.AUDIO_SERVICE) as AudioManager
        audiomanager.ringerMode = AudioManager.RINGER_MODE_SILENT
    }