打开Google Glass相机的代码
public void surfaceCreated(SurfaceHolder holder) {
if (camera == null){
//I added the line and thought it may take time to get camera ready
SystemClock.sleep(7000);
Log.e(LOGTAG, "Number of cameras: " + Camera.getNumberOfCameras());
camera = Camera.open();
}
}
以下是我得到的错误:
06-11 16:34:22.555: E/DS(29531): Number of cameras: 1
06-11 16:34:23.063: E/CameraService(253): Waited 501 ms but hardware teardown is still not finished!
06-11 16:34:23.063: E/CameraService(253): CameraService::connect X (pid 29531) not ready to acquire camera 0.