audioManager = context.getSystemService("audio");
// 获取指定音量类型的音量值并返回
function getVolumeInfo(context, streamType) {
     volume = android.os.ServiceManager.getService("audio").getStreamVolume(streamType);
    return volume;
}

getVolumeInfo(context, audioManager.STREAM_RING);
// 获取当前铃声音量
// 获取指定音量类型当前音量

#MVEL表达式 #Javascript
 
 
Back to Top