How to take a picture wihout using surface area in Android Ice Cream Sandwich
<p>I have developed an Android app for Gingerbread OS version.
Now I am trying to customize it to ICS version but I have one problem.
The app using the camera class to capture a picture without display a surface area. </p>

<pre><code>public boolean TakePicture()
{
    if (mCamera == null)
    {
        Log.e(mLogTag, "Camera wasn't loaded.");
        return false;
    }


    // this doesn't really show the frames on the screen without define a SurfaceHolder.
    mCamera.startPreview();

    // actually take the picture.
    mCamera.takePicture(null, null, this);

    return true;
}
</code></pre>

<p>When it calls the TakePicture method a Run-Time Exception is being throw with this message:
"takePicture Failed".
In Gingerbread version it works.</p>
