Android 9 Audio系统笔记:声音焦点AudioFocusRequest说明
前言最近发现很多小伙伴对于申请声音焦点时传入的AUDIOFOCUS_GAIN参数很迷惑,于是乎觉得有必要写一篇来说明一下。申请声音焦点示例//1、创建声音焦点 requestBuilderAudioAttributes.Builder attributesBuilder = new AudioAttributes.Builder();attributesBuilder.setUsage(AudioAttributes.USAGE_ALARM) // 语音识别类型.setContentType(A