private boolean hasBackCamera() { int n = FrameworksClassFactory.getNumberOfCameras(); CameraInfo info = new CameraInfo(); for (int i = 0; i < n; i++) { FrameworksClassFactory.getCameraInfo(i, info); if (info.facing == CameraInfo.CAMERA_FACING_BACK) { Log.i(TAG, "back camera found: " + i); return true; } } Log.i(TAG, "no back camera"); return false; }
private boolean hasCamera() { int n = FrameworksClassFactory.getNumberOfCameras(); Log.i(TAG, "number of camera: " + n); return (n > 0); }