audioManager = context.getSystemService("audio");
audio =android.os.ServiceManager.getService("audio");
function getVolumeInfo(context, streamType, targetVolume) {
currentVolume = audio.getStreamVolume(streamType);
maxVolume = audio.getStreamMaxVolume(streamType);
return maxVolume;
}
getVolumeInfo(context, audioManager.STREAM_ALARM);
// 获取指定音量类型的上限#MVEL表达式 #Javascript