Android中通过Intent 调用图片、视频、音频、录音、拍照
来源:互联网 发布:structure design软件 编辑:程序博客网 时间:2024/06/01 12:17
<pre name="code" class="java"><p>原文地址:http://www.cnblogs.com/top5/archive/2012/05/04/2482235.html</p><p></p>
//选择图片 requestCode 返回的标识
Intent intent = new Intent(Intent.ACTION_GET_CONTENT); //"android.intent.action.GET_CONTENT"intent.setType(contentType); //查看类型 String IMAGE_UNSPECIFIED = "image/*";Intent wrapperIntent = Intent.createChooser(intent, null);((Activity) context).startActivityForResult(wrapperIntent, requestCode); //添加音频Intent intent = new Intent(Intent.ACTION_GET_CONTENT);intent.setType(contentType); //String VIDEO_UNSPECIFIED = "video/*";Intent wrapperIntent = Intent.createChooser(intent, null);((Activity) context).startActivityForResult(wrapperIntent, 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); //视频Intent intent = new Intent(Intent.ACTION_GET_CONTENT);intent.setType(contentType); //String VIDEO_UNSPECIFIED = "video/*";Intent wrapperIntent = Intent.createChooser(intent, 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); //拍照 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);
0 0
- Android中通过Intent 调用图片、视频、音频、录音、拍照
- Android中通过Intent 调用图片、视频、音频、录音、拍照
- Android中通过Intent 调用图片、视频、音频、录音、拍照
- Android中通过Intent 调用图片、视频、音频、录音、拍照
- Android中通过Intent 调用图片、视频、音频、录音、拍照
- Android中通过Intent 调用图片、视频、音频、录音、拍照
- Android中通过Intent 调用系统的图片、视频、音频、录音、拍照
- Android中通过Intent 调用系统的图片、视频、音频、录音、拍照
- (转)Android中通过Intent 调用图片、视频、音频、录音、拍照
- Android中通过Intent 调用图片、视频、音频、录音、拍照的代码模板
- android通过Intent调用手机图片,音频,视频录音拍照等代码
- android通过Intent调用手机图片,音频,视频录音拍照等代码
- 在Android中调用图片、视频、音频、录音、拍照
- 在Android中调用图片、视频、音频、录音、拍照
- 在Android中调用图片、视频、音频、录音、拍照
- android调用系统的图片,视频,音频,录音,拍照
- 在Android 中调用选择图片、视频、添加音频、录音、拍摄视频、拍照等其他的功能
- 在Android 中调用选择图片、视频、添加音频、录音、拍摄视频、拍照等其他的功能
- 通用Control类 - 基于Thinkphp写的通用资讯管理类
- QtCreator 使用DOM创建和操作(添加,删除,更新)XML
- web架构
- Android面试总结经
- 数据结构初学————栈的基本操作
- Android中通过Intent 调用图片、视频、音频、录音、拍照
- IP地址与MAC地址的区别
- 查看Eclipse版本号及各个版本区别
- 数组和指针——都是“退化”惹的祸
- UVA 10014 Simple calculations
- 1063. Set Similarity (25)
- 采用MQTT协议实现Android消息推送
- MATLAB命令大全(转载)
- eventusermodel模式采用事件模型解析2007excel(解析大文件excel)