标签:
音频焦点分为两种
1永久占用((AudioManager) getSystemService(AUDIO_SERVICE)) .requestAudioFocus(null, AudioManager.STREAM_MUSIC,
AudioManager.AUDIOFOCUS_GAIN);
2临时占用((AudioManager) getSystemService(AUDIO_SERVICE)) .requestAudioFocus(null, AudioManager.STREAM_MUSIC,
AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);
释放音频焦点((AudioManager) getSystemService(AUDIO_SERVICE)).abandonAudioFocus(null);
标签:
原文地址:http://www.cnblogs.com/dabaobeier/p/4204153.html