RedApparat / FaceDetector

Face detection for your Android app
Apache License 2.0
1.17k stars 197 forks source link

how to use V2Provider? #37

Open Willwillbewell opened 5 years ago

Willwillbewell commented 5 years ago

I'm trying to use the V2Provider in some devices which api level is higher than 21, but the lib can not detect the face; when I switched to V1Provider, it's work properly, could you please show me how to use the V2Provider? my code:

        Fotoapparat
                .with(this)
                .cameraProvider(CameraProviders.v2(this))
                .into(cameraView)
                .lensPosition(lensPosition(position))
                .frameProcessor(faceProcessor)
                .logger(loggers(
                        logcat(),
                        fileLogger(this)
                ))
                .build();