AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
max = am.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL);
current= am.getStreamVolume(AudioManager.STREAM_VOICE_CALL);
Log.e("service", "通话音量值:" + max + "-" + current);
max = am.getStreamMaxVolume(AudioManager.STREAM_SYSTEM);
current = am.getStreamVolume(AudioManager.STREAM_SYSTEM);
Log.e("service", "系统音量值:" + max + "-" + current);
max = am.getStreamMaxVolume(AudioManager.STREAM_RING);
current = am.getStreamVolume(AudioManager.STREAM_RING);
Log.e("service", "系统铃声值:" + max + "-" + current);
max = am.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
current = am.getStreamVolume(AudioManager.STREAM_MUSIC);
Log.e("service", "音乐音量值:" + max + "-" + current);
max = am.getStreamMaxVolume(AudioManager.STREAM_ALARM);
current = am.getStreamVolume(AudioManager.STREAM_ALARM);
Log.e("service", "闹铃音量值:" + max + "-" + current);
max = am.getStreamMaxVolume(AudioManager.STREAM_NOTIFICATION);
current = am.getStreamVolume(AudioManager.STREAM_NOTIFICATION);
Log.e("service", "提示声音音量值:" + max + "-" + current);
Android系统音量
最新推荐文章于 2024-05-06 17:00:44 发布