个别手机设置模式为听筒模式后通知声音会改变,通知音从听筒发出,声音特别小

AudioManager audiomanage = (AudioManager) CommonUtils.getApp().getSystemService(Context.AUDIO_SERVICE);
audiomanage.setMode(AudioManager.MODE_IN_COMMUNICATION);

解决办法:

AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
// 为true打开喇叭扩音器;为false关闭喇叭扩音器.
audioManager.setSpeakerphoneOn(true);
audioManager.setMode(AudioManager.STREAM_SYSTEM);
// audioManager.setMode(AudioManager.MODE_NORMAL);
// audioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);
// setVolumeControlStream(AudioManager.USE_DEFAULT_STREAM_TYPE);