In my app, I\'d like to use the camera, if the device has one. Are there any devices running android that do not have a camera? By including the following into my m
Try this :
/** Check if this device has a camera */
private boolean checkCameraHardware(Context context) {
if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){
// this device has a camera
return true;
} else {
// no camera on this device
return false;
}
}
from : http://developer.android.com/guide/topics/media/camera.html