how to finish activity after picture taken by camera
<p>I am using an activity to capture image
i want to start a finish my activity on picture taken
on capture button i write following code</p>

<pre><code>btnCapture.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                preview.camera.takePicture(shutterCallback, rawCallback,
                        jpegCallback);
                CameraActivity.this.finish();
            }
        });
</code></pre>

<p>but my activity is not responding after adding </p>

<p>CameraActivity.this.finish()</p>

<p>Help will be appreciated</p>
