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

Getting a an error on imageAnalysis.analyze=qrCodeAnalyzer #5

Open
guitarcrazy86 opened this issue Nov 12, 2019 · 1 comment
Open
Assignees
Labels
question Further information is requested

Comments

@guitarcrazy86
Copy link

Android Studio is saying that "Val cannot be reassigned", I'm assuming because imageAnalysis is assigned to "ImageAnalysis(imageAnalysisConfig" already.

Any way to fix this?

@guitarcrazy86 guitarcrazy86 added the question Further information is requested label Nov 12, 2019
@mortenholmgaard
Copy link

mortenholmgaard commented Nov 27, 2019

I figured out how to solve this a long with the upgrade to alpha06:

imageAnalysis.setAnalyzer(Executors.newFixedThreadPool(5), qrCodeAnalyzer)

And change this

preview.setOnPreviewOutputUpdateListener { previewOutput ->
    val parent = textureView.parent as ViewGroup
    parent.removeView(textureView)
    textureView.surfaceTexture = previewOutput.surfaceTexture
    parent.addView(textureView, 0)
}

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

No branches or pull requests

3 participants