Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PreviewView #69

Open
blockjke opened this issue Mar 31, 2022 · 1 comment
Open

PreviewView #69

blockjke opened this issue Mar 31, 2022 · 1 comment

Comments

@blockjke
Copy link

Hello, help me please. I need to screen cameraview, but screenshot saves everything (buttons etc.) besides previewview

    previewView = findViewById(R.id.view_finder);
    
            imageButtonCapture = findViewById(R.id.camera_capture_button);
    imageButtonCapture.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            SimpleDateFormat mDateFormat = new SimpleDateFormat("yyyyMMddHHmmss", Locale.US);
            File photofile = new File(getBatchDirectoryName(), mDateFormat.format(new Date())+ ".jpeg");
            Falcon.takeScreenshot(MainActivity.this, photofile);

        }
    });
    
    Thanks!
@jraska
Copy link
Owner

jraska commented May 2, 2023

Hey, I somehow missed notifications for this, sorry.

I think the answer is very similar to this issue also the one with Google Maps or with Lottie

Looking at the PreviewView docs:

This class manages the preview Surface's lifecycle. It internally uses either a TextureView or SurfaceView to display the camera feed...

Such cases are unfortunately not supported and if the onDraw(Canvas) draws nothing, there is not much Falcon can do about this and I would seek a different way for taking screenshot for PreviewView.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants