在Android 中调用选择图片、视频、添加音频、录音、拍摄视频、拍照等其他的功能
来源:互联网 发布:阿帕奇 知乎 编辑:程序博客网 时间:2024/05/18 03:59
//选择图片 requestCode 返回的标识 Intent innerIntent = new Intent(Intent.ACTION_GET_CONTENT); //"android.intent.action.GET_CONTENT" innerIntent.setType(contentType); //查看类型 String IMAGE_UNSPECIFIED = "image/*"; 详细的类型在 com.google.android.mms.ContentType 中 Intent wrapperIntent = Intent.createChooser(innerIntent, null); ((Activity) context).startActivityForResult(wrapperIntent, requestCode); //视频 Intent innerIntent = new Intent(Intent.ACTION_GET_CONTENT); innerIntent.setType(contentType); //String VIDEO_UNSPECIFIED = "video/*"; Intent wrapperIntent = Intent.createChooser(innerIntent, null); ((Activity) context).startActivityForResult(wrapperIntent, requestCode); //添加音频 Intent innerIntent = new Intent(Intent.ACTION_GET_CONTENT); innerIntent.setType(contentType); //String VIDEO_UNSPECIFIED = "video/*"; Intent wrapperIntent = Intent.createChooser(innerIntent, null); ((Activity) context).startActivityForResult(wrapperIntent, requestCode); //录音 Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType(ContentType.AUDIO_AMR); //String AUDIO_AMR = "audio/amr"; intent.setClassName("com.android.soundrecorder", "com.android.soundrecorder.SoundRecorder"); ((Activity) context).startActivityForResult(intent, requestCode); //幻灯片头大 不做详细 //拍摄视频 int durationLimit = getVideoCaptureDurationLimit(); //SystemProperties.getInt("ro.media.enc.lprof.duration", 60); Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0); intent.putExtra(MediaStore.EXTRA_SIZE_LIMIT, sizeLimit); intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, durationLimit); startActivityForResult(intent, REQUEST_CODE_TAKE_VIDEO); //拍照 REQUEST_CODE_TAKE_PICTURE 为返回的标识 Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); //"android.media.action.IMAGE_CAPTURE"; intent.putExtra(MediaStore.EXTRA_OUTPUT, Mms.ScrapSpace.CONTENT_URI); // output,Uri.parse("content://mms/scrapSpace"); startActivityForResult(intent, REQUEST_CODE_TAKE_PICTURE);
- 在Android 中调用选择图片、视频、添加音频、录音、拍摄视频、拍照等其他的功能
- 在Android 中调用选择图片、视频、添加音频、录音、拍摄视频、拍照等其他的功能
- 在Android 中调用选择图片、视频、添加音频、录音、拍摄视频、拍照等其他的功能
- 在Android 中调用选择图片、视频、添加音频、录音、拍摄视频、拍照等其他的功能
- 在Android 中调用选择图片、视频、添加音频、录音、拍摄视频、拍照等其他的功能【转】
- 在Android中调用图片、视频、音频、录音、拍照
- 在Android中调用图片、视频、音频、录音、拍照
- 在Android中调用图片、视频、音频、录音、拍照
- Android中通过Intent 调用图片、视频、音频、录音、拍照
- Android中通过Intent 调用图片、视频、音频、录音、拍照
- Android中通过Intent 调用图片、视频、音频、录音、拍照
- Android中通过Intent 调用图片、视频、音频、录音、拍照
- Android中通过Intent 调用图片、视频、音频、录音、拍照
- Android中通过Intent 调用图片、视频、音频、录音、拍照
- android调用系统的图片,视频,音频,录音,拍照
- Android中拍照、图片、录音、视频和音频功能的方法和代码
- Android中拍照、图片、录音、视频和音频功能的方法和代码
- Android中通过Intent 调用系统的图片、视频、音频、录音、拍照
- VS无法启动调试:“生成下面的模块时,启用了优化或没有调试信息...”
- 命名空间和程序集
- .NET程序员修炼之道
- Const,Const函数,Const变量,函数后面的Const (zz) (转)
- (转)Statement和PreparedStatement之间的区别
- 在Android 中调用选择图片、视频、添加音频、录音、拍摄视频、拍照等其他的功能
- window.external的使用
- solaris上配置DNS客户端
- sql优化
- delphi学习笔记--TAnimate
- 特殊【二类动词】记忆方法
- VC编译错误: libcmt.lib 已经定义
- delphi学习笔记--ADO数据库连接组件TADOConnection
- Vs2005下重复定义的问题解决