8

I'm trying to scan QR code using Firebase ML kit but I cannot start camera on android Pie (Nokia 6.1 Plus). However, same code is working properly on Android Oreo Redmi 6 A

This is my gradle:

implementation "com.google.firebase:firebase-ml-vision:21.0.0"
implementation "androidx.camera:camera-core:1.0.0-alpha05"
implementation "androidx.camera:camera-camera2:1.0.0-alpha05"

I've given all the required permission and feature of camera in Manifest

Here is how I'm using Camera X code :

      val previewConfig = PreviewConfig.Builder()
                .setLensFacing(CameraX.LensFacing.BACK)
                .build()

      val preview = Preview(previewConfig)


 preview.setOnPreviewOutputUpdateListener { previewOutput ->
                    textureView.surfaceTexture = previewOutput.surfaceTexture
                }


val imageAnalysisConfig = ImageAnalysisConfig.Builder()
                    .build()
                val imageAnalysis = ImageAnalysis(imageAnalysisConfig)

LogCat:

   E/libc: Access denied finding property "vendor.camera.aux.packagelist"
    W/com.zup.cash: type=1400 audit(0.0:17168): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=18547 scontext=u:r:untrusted_app:s0:c130,c258,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
E/GLConsumer: [SurfaceTexture-0-7457-1] updateAndRelease: GLConsumer is not attached to an OpenGL ES context
D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=QRScanner, firebase_previous_id(_pi)=-1919220789441294810, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-1919220789441294811}]
Cœur
  • 37,241
  • 25
  • 195
  • 267

0 Answers0