• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






、Happiness↘.

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2014年5月21日

调用录音界播放音频文件
摘要: /* 播放录音文件 */private void playMusic(File file){Intent intent = new Intent();intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);intent.setAction(android.con... 阅读全文
posted @ 2014-05-21 23:19 、Happiness↘. 阅读(131) 评论(0) 推荐(0)
 
录音机录制声音
摘要: 1、定义/* 录制的音频文件 */ private File mRecAudioFile; private File mRecAudioPath; /* MediaRecorder对象 */ private MediaRecorder mMediaRecorder; /* 录音文件列表 */... 阅读全文
posted @ 2014-05-21 23:18 、Happiness↘. 阅读(171) 评论(0) 推荐(0)
 
用SurfaceView播放视频
摘要: 1、定义private int mVideoWidth; private int mVideoHeight;private MediaPlayer mMediaPlayer; private SurfaceView mPreview; private SurfaceHolder hol... 阅读全文
posted @ 2014-05-21 23:00 、Happiness↘. 阅读(131) 评论(0) 推荐(0)
 
使用VideoView播放视频
摘要: 1、/* 创建VideoView对象 */ final VideoView videoView = (VideoView) findViewById(R.id.VideoView01);2、装载/* 设置路径 */ videoView.setVideoPath("/sdcard/test.m... 阅读全文
posted @ 2014-05-21 22:50 、Happiness↘. 阅读(178) 评论(0) 推荐(0)
 
播放程序的音乐
摘要: 1、将音乐放在应用目录“res\raw\”中2、/* 装载资源中的音乐 */ mMediaPlayer = MediaPlayer.create(Activity01.this, R.raw.test); /* 设置是否循环 */ mMediaPlayer.setLoo... 阅读全文
posted @ 2014-05-21 22:46 、Happiness↘. 阅读(111) 评论(0) 推荐(0)
 
播放音乐
摘要: 1、/* MediaPlayer对象 */ public MediaPlayer mMediaPlayer = null;/* 构建MediaPlayer对象 */mMediaPlayer= new MediaPlayer();/* 播放列表 */ private List mMusicList ... 阅读全文
posted @ 2014-05-21 21:31 、Happiness↘. 阅读(161) 评论(0) 推荐(0)