I am doing an application witch uses the webcam and i want to display some text after the picture is taken so in the method ShutterCallBack i wrote this
ShutterCallback shutterCallback = new ShutterCallback() {
public void onShutter() {
Log.d("DHA", "onShutter'd");
Canvas cnv = mSurfaceHolder.lockCanvas(null);
Log.w("DHA", "Nana");
Paint p = new Paint();
Log.w("DHA", "Nana2");
p.setColor(Color.RED);
Log.w("DHA", "Nana3");
cnv.drawText("Hello", 0, 0, p);
Log.w("DHA", "Nana4");
mSurfaceHolder.unlockCanvasAndPost(cnv);
Log.w("DHA", "Nana5");
}
};
It fails awfuly terminating my application...How can i write text on the surface ?