I'm developing a simple camera app which is based on the android developers tutorial but my I'm having some issues getting it running.
Here is my LogCat printout.

Now I have traced the NullPointerException to be at line 30 in CameraPreview as you have probably figured out to so the code for CameraPreview is below. I can code in Java and know that a NullPointer is when something is there which hasn't been created yet but as far as I can tell it has been.
public class CameraPreview extends SurfaceView implements SurfaceHolder.Callback{
private SurfaceHolder mHolder;
private Camera mCamera;
private static final String TAG = "Preview";
@SuppressWarnings("deprecation")
public CameraPreview(Context context, Camera camera){
super(context);
mCamera = camera;
//Install callback to get notifications from the app
mHolder = getHolder();
mHolder.addCallback(this);
mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); //deprecated but required for Android Version 3.0 and under
}
public void surfaceCreated(SurfaceHolder holder) {
//Surface been created now need to tell app where to draw PREVIEW
try{
mCamera.setPreviewDisplay(holder);
mCamera.startPreview();
}
catch(IOException e){
Log.d(TAG, "Camera preview error: " + e.getMessage());
}
}
Line 30 is the code snippet here - mCamera.setPreviewDisplay(holder);
From what I can tell is that there is an instance of mCamera in the 'global' variable private Camera mCamera.
Anyone got any ideas? Sorry its a long question formatted as best I could.
Thanks, Dan
P.S. I know there are other methods required in this class this is merely the 'problem snippet'.