android设置音量(话音)
来源:互联网 发布:mac imovie怎么保存 编辑:程序博客网 时间:2024/06/12 01:08
设置音量(am.setStreamVolume(AudioManager.STREAM_VOICE_CALL, 0, AudioManager.FLAG_SHOW_UI);):
发送广播通知:
Intent intent = new Intent(AudioManager.VOLUME_CHANGED_ACTION);
intent.putExtra(AudioManager.EXTRA_VOLUME_STREAM_TYPE, streamType);
intent.putExtra(AudioManager.EXTRA_VOLUME_STREAM_VALUE, index);
intent.putExtra(AudioManager.EXTRA_PREV_VOLUME_STREAM_VALUE, oldIndex);
mContext.sendBroadcast(intent);
UI:
即使音量设为0,通话也有声音:VolumePanel.java:
case AudioManager.STREAM_VOICE_CALL: {
/*
* For in-call voice call volume, there is no inaudible volume.
* Rescale the UI control so the progress bar doesn't go all
* the way to zero and don't show the mute icon.
*/
index++; // 音量由0变为1了
max++;
message = INCALL_VOLUME_TEXT;
setSmallIcon(index);
break;
}
(end)
发送广播通知:
Intent intent = new Intent(AudioManager.VOLUME_CHANGED_ACTION);
intent.putExtra(AudioManager.EXTRA_VOLUME_STREAM_TYPE, streamType);
intent.putExtra(AudioManager.EXTRA_VOLUME_STREAM_VALUE, index);
intent.putExtra(AudioManager.EXTRA_PREV_VOLUME_STREAM_VALUE, oldIndex);
mContext.sendBroadcast(intent);
UI:
即使音量设为0,通话也有声音:VolumePanel.java:
case AudioManager.STREAM_VOICE_CALL: {
/*
* For in-call voice call volume, there is no inaudible volume.
* Rescale the UI control so the progress bar doesn't go all
* the way to zero and don't show the mute icon.
*/
index++; // 音量由0变为1了
max++;
message = INCALL_VOLUME_TEXT;
setSmallIcon(index);
break;
}
(end)
- android设置音量(话音)
- android设置音量
- android 音量设置条
- android 系统音量设置
- Android设置手机音量
- android 设置最大音量
- android 系统音量设置
- android audio 音量设置分析
- android 音量设置源码分析
- Android Audio音量设置流程
- android audio 音量设置分析
- android 音量设置工具类
- android设置中拖动音量条调节音量流程(android5.1)
- Android 程序获取、设置铃声和音量
- Android 各种音量的获取和设置
- Android 各种音量的获取和设置
- Android 各种音量的获取和设置
- Android 各种音量的获取和设置
- make snod (make system no dependencies)
- 快速插入数据
- vm 快照快速分析堆类型漏洞
- 断句啊
- [WebKit]为JavaScript Binding添加新DOM对象的三种方式及实作
- android设置音量(话音)
- 探索 Pexpect----第 2 部分:Pexpect 的实例分析
- 强制刷新窗口并能立即生效的办法
- 获取所有的android源码
- 反编译apk
- LINUX下的SOCKET编程
- eclipse同时调试android的多个进程
- http://www.cgbolo.com/viewthread.php?tid=13334
- Oracle 9i 性能调优系列培训