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();
}
}开发者_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.
精彩评论