转:
看官方API发现的一行,记录下来
...
文档说调用相机功能要增加这行到配置文件里,表明用到相机功能。(貌似根据网上例子没加这个也能打开默认相机功能。)
It's then your responsibility to check for the availabilityof the camera at runtime by callinghasSystemFeature(PackageManager.FEATURE_CAMERA).If a camera is not available, you should then disable your camera features.
要通过这个来检查设备是否有照相机功能,没有的话就要根据情况调整,或者是关闭相机功能,避免出错。
有摄像头就有