Android系统音量

来源:互联网 发布:阶层的算法 编辑:程序博客网 时间:2024/05/17 01:36
                    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);
原创粉丝点击