https://kotlinlang.org logo
#android
Title
# android
j

Jrichards1408

01/08/2021, 12:25 PM
Hi i am trying to attach a ImageAnalyzer to a camera providers lifecycle like this:
Copy code
var camera = cameraProvider.bindToLifecycle(
            this as LifecycleOwner,
            cameraSelector,
            myImageAnalyzer,
            preview
        )
followed this guide wher e you can simpl add the image analyser in the bindToLifeCycle method but it doesnt take this type of argument? https://developer.android.com/training/camerax/analyze It only takes this from what i see from the lib class:
Copy code
public Camera bindToLifecycle(
            @NonNull LifecycleOwner lifecycleOwner,
            @NonNull CameraSelector cameraSelector,
            @Nullable ViewPort viewPort,
            @NonNull UseCase... useCases) {
stackoverflow 2