解决方案 »
- [高分求助]自定义webview控件如何实现非等比缩放
- 如何查看Minimum Required SDK, Target SDK, Compile With这些设置?
- 哪位能告诉一下,在ubuntu安装gitolite时,在最后一步骤gl-setup为什么失败?
- android屏幕录像原理
- sqlite数据库,是否可以在java层和c层同时访问
- android 语音识别对话框
- 关于listview的一些问题
- ListView添加项与删除项
- 关于menu的问题
- 高手请帮忙:关于动态生成编辑框的问题?
- 将网络访问放到另一个线程之后还是出现android.os.NetworkOnMainThreadException异常
- android中ListView动态加载更多checkbox的问题
/** A safe way to get an instance of the Camera object. */
public static Camera getCameraInstance(){
Camera c = null;
try {
c = Camera.open(); // attempt to get a Camera instance
}
catch (Exception e){
// Camera is not available (in use or does not exist)
}
return c; // returns null if camera is unavailable
}
catch里做失败处理http://www.android-doc.com/guide/topics/media/camera.html