获取音频服务,设置音源类型:电话类型和获取最大电话音量,响铃模式
private AudioManager mAudioManager;
mAudioManager = (AudioManager) getSystemService(AUDIO_SERVICE);
mAudioManager.setStreamVolume(AudioManager.STREAM_VOICE_CALL,
mAudioManager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL),
AudioManager.FLAG_ALLOW_RINGER_MODES);
发送广播:打开紧急电话,拨打112
startActivity(new Intent(Intent.ACTION_CALL_EMERGENCY)
.setData(Uri.fromParts(PhoneAccount.SCHEME_TEL, "112", null))
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));