开发者

how to finish activity after picture taken by camera

开发者 https://www.devze.com 2023-02-12 19:35 出处:网络
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

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();
            }
        }开发者_JS百科);

but my activity is not responding after adding

CameraActivity.this.finish()

Help will be appreciated


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

0

精彩评论

暂无评论...
验证码 换一张
取 消