Sunil Pandey
Sunil Pandey

Reputation: 7102

how to finish activity after picture taken by camera

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

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

but my activity is not responding after adding

CameraActivity.this.finish()

Help will be appreciated

Upvotes: 0

Views: 1584

Answers (1)

Farhan
Farhan

Reputation: 13390

release any camera object and save a variable with datatype activity in the class.. call finish from that variable.

Upvotes: 1

Related Questions