当前位置: 首页 > news >正文

无锡网站建设多少钱/线上销售渠道有哪几种

无锡网站建设多少钱,线上销售渠道有哪几种,城乡建设杂志社官方网站,橙色短信网站模板Android 各种音量的获取和设置 通过程序获取android系统手机的铃声和音量。同样,设置铃声和音量的方法也很简单! AudioManager am (AudioManager) getSystemService(Context.AUDIO_SERVICE); //通话音量int max am.getStreamMaxVolume( AudioManager.S…

Android 各种音量的获取和设置
通过程序获取android系统手机的铃声和音量。同样,设置铃声和音量的方法也很简单!

AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
//通话音量int max = am.getStreamMaxVolume( AudioManager.STREAM_VOICE_CALL );int current = am.getStreamVolume( AudioManager.STREAM_VOICE_CALL );Log.d(”VIOCE_CALL”, “max : ” + max + ” current : ” + current);
//系统音量max = mAudioManager.getStreamMaxVolume( AudioManager.STREAM_SYSTEM ); 
current = mAudioManager.getStreamVolume( AudioManager.STREAM_SYSTEM ); Log.d(”SYSTEM”, “max : ” + max + ” current : ” + current);
//铃声音量max = mAudioManager.getStreamMaxVolume( AudioManager.STREAM_RING );current = mAudioManager.getStreamVolume( AudioManager.STREAM_RING );Log.d(”RING”, “max : ” + max + ” current : ” + current);
//音乐音量max = mAudioManager.getStreamMaxVolume( AudioManager.STREAM_MUSIC );current = mAudioManager.getStreamVolume( AudioManager.STREAM_MUSIC );Log.d(”MUSIC”, “max : ” + max + ” current : ” + current);
//提示声音音量max = am.getStreamMaxVolume( AudioManager.STREAM_ALARM );current = sm.getStreamVolume( AudioManager.STREAM_ALARM );Log.d(”ALARM”, “max : ” + max + ” current : ” + current);


 

设置音量的方法也很简单,AudioManager提供了方法:
public void setStreamVolume(int streamType, int index, int flags)
其中 streamType 有内置的常量,可以在AudioManager里面查到相关的定义。

转载于:https://www.cnblogs.com/wuyida/archive/2011/12/14/6300654.html

相关文章:

  • 住房城乡建设网站/廊坊推广seo霸屏
  • 苏州城乡建设网站/南宁白帽seo技术
  • 石家庄城乡建设部网站首页/seo 优化思路
  • 城乡建设局网站首页/兰州网站开发公司
  • 上海城乡建设学校网站/百度一下百度搜索首页
  • 蚌埠城乡建设 局网站/灰色词秒收录代发
  • 腾冲市住房和城乡建设局网站/曲靖百度推广
  • 四川省住房和城乡建设厅网站下载/广州seo代理计费
  • 北京市住房城乡建设委 房管局 官方网站/最新的军事新闻
  • 做的最好的手机网站/线下推广公司
  • 敖汉旗住房和城乡建设局网站/互联网推广怎么找渠道
  • 丽江市住房与城乡建设局网站/最靠谱的十大教育机构