使用有线耳机时,如何在平板电脑上禁用HDMI音频输出。我会尝试
mgr = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
mgr.setWiredHeadsetOn(true);
和
mgr = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
mgr.setParameters("audio_devices_out_active=AUDIO_CODEC");
它没有用:'(
尝试在清单中使用此权限。
android.permission.MODIFY_AUDIO_SETTINGS。