添加相机的外部启用MediaStore.ACTION_IMAGE_CAPTURE
2011-06-08 10:10
302 查看
intent的方法实现:
1)程序Dome,通过一个按钮打开一组相机的列表引用
public void onClick(View v) { //按钮的点击事件
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, 1);
}
2)相机LomoLomo向列表引用中加入一个启动项
在Manifest中第一个activity启动项
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
后添加
<intent-filter>
<action android:name="android.media.action.IMAGE_CAPTURE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
保存,完成;
1)程序Dome,通过一个按钮打开一组相机的列表引用
public void onClick(View v) { //按钮的点击事件
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, 1);
}
2)相机LomoLomo向列表引用中加入一个启动项
在Manifest中第一个activity启动项
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
后添加
<intent-filter>
<action android:name="android.media.action.IMAGE_CAPTURE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
保存,完成;
相关文章推荐
- Android相机之MediaStore.ACTION_IMAGE_CAPTURE
- 三星手机setAction(MediaStore.ACTION_IMAGE_CAPTURE)时,data总为null问题与解决
- Android使用MediaStore.ACTION_IMAGE_CAPTURE,拍照到指定目录
- Take Picture in Android with MediaStore.ACTION_IMAGE_CAPTURE
- 使用MediaStore.ACTION_IMAGE_CAPTURE,拍照到指定目录
- android调用相机ACTION_IMAGE_CAPTURE后返回requestCode 在变化
- 【Android】调用MediaStore.Images.Media.insertImage保存图片时生成两张图片的问题
- iOS—使用GPUImage对照片和相机添加滤镜
- 2014.5.7 W3C Media Capture and Stream 草案添加了 “4.3.5 MediaTrackConstraints”
- MediaStore.Images.Media.insertImage 得到保存图片的原始路径
- MediaStore.Images.Media.insertImage 参数解读
- MediaStore.Images.Media.insertImage
- MediaStore.Images.Media.insertImage时发生Failed to insert image原因分析
- android 如何将imageCursor.getColumnIndex(MediaStore.Audio.AlbumColumns.ALBUM_KEY)中的到的专辑封面放入view中显示
- 关于chrome外部协议请求,启动外部程序,itms,macappstore下载相关
- Training--添加动作栏(Action Bar)
- 安装成功的nginx,如何添加未编译安装模块(非覆盖安装http_image_filter_module)
- SDWebImage添加cookie
- 【BLE】CC2541 imageA GATT添加自定义UUID实例
- VS工程中添加c/c++工程中外部头文件及库的基本步骤