olexale / flutter_mrz_scanner

Scans MRZ (Machine Readable Zone) from identity documents.
MIT License
51 stars 44 forks source link

Stuck on white screen and overlay #15

Open BunlaiKek opened 3 years ago

BunlaiKek commented 3 years ago

Camera Preview stop working and show only white screen and overlay when:

DrFornax commented 2 years ago

I have the same problem. Reproducible in the emulator with hot reload. The same problem occurs on Xiaomi Mi devices. Here it looks like the camera stream does not even start.

A hot reload gives me the following messages:

D/skia (16530): onFlyCompress I/Tesseract(native)(16530): Initialized Tesseract API with language=ocrb E/BufferQueueProducer(16530): [SurfaceTexture-0-16530-27](id:40920000001b,api:4,p:424,c:16530) queueBuffer: BufferQueue has been abandoned E/BufferQueueProducer(16530): [SurfaceTexture-0-16530-27](id:40920000001b,api:4,p:424,c:16530) dequeueBuffer: BufferQueue has been abandoned I/BpBinder(16530): onLastStrongRef automatically unlinking death recipients: <uncached descriptor> Reloaded 0 libraries in 409ms. E/BufferQueueProducer(16530): [SurfaceTexture-0-16530-27](id:40920000001b,api:4,p:424,c:16530) queueBuffer: BufferQueue has been abandoned E/BufferQueueProducer(16530): [SurfaceTexture-0-16530-27](id:40920000001b,api:4,p:424,c:16530) queueBuffer: BufferQueue has been abandoned

buyka98 commented 1 year ago

Hi! I am having the same problem? Anyone find any solution? Please help me

WardenCommander commented 1 year ago

@BunlaiKek, @DrFornax, @buyka98 you are all missing camera permissions.

  1. add <uses-permission android:name="android.permission.CAMERA" /> in AndroidManifest.xml
  2. in app/build.gradle you will probably need to add: minSdkVersion 21 instead of minSdkVersion flutter.minSdkVersion
  3. copy files from here if you just want to see it work: https://github.com/olexale/flutter_mrz_scanner/tree/master/example/lib