title: Does Face Detection require a SurfaceView to work?
body: <p>Using API 14 I have created an Activity which uses face detection successfully (I'm a bit of a newb at this Face Detection stuff).</p>
  
  <p>I don't want to show the preview of the Camera however; I just want to know when the user's face is in front of the camera.  I added a few buttons to make the SurfaceView Visible/Invisible and I found that the face detection stops working when it is INVISIBLE or GONE.</p>
  
  <p>Is there a way to enable the face detection without requiring the SurfaceView in the layout?</p>
  
  <p>Here is how I have coded it:</p>
  
  <pre><code>            mCamera.setPreviewDisplay(mSurfaceHolder);
              mCamera.startPreview();
  
              if(mCamera.getParameters().getMaxNumDetectedFaces() &gt;0) {
                  mCamera.setFaceDetectionListener(new Camera.FaceDetectionListener() {
                      @Override public void onFaceDetection(Face[] faces, Camera camera) {
  
                          if(faces.length &gt; 0) {
                              System.out.println("Found someone");
                          }
  
                      }
                  });
                  mCamera.startFaceDetection();
              }
  </code></pre>
  
  <p>To hide the surfaceview I have added a black View. :-)</p>
  
  <pre><code>&lt;View android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="#000"/&gt;
  </code></pre>
  
  <p>I've had a reasonable look around and I haven't found much code using startFaceDetection() yet.</p>
  
  <p>Thanks for any ideas / help.</p>