Skip to content

Implementing MLKit API (say, for scanning QR codes / barcodes) #2018

Open

Description

@Iey4iej3

Several issues are opened due to lack of MLKit API: #2003 #1966 #1881 #1753

This is also related to #395

I guess that the full implementation is hard, but implementing QR code / barcode scanner should be easier.

Activity

  1. Wojtaz0w commented on Aug 28, 2023

    @Wojtaz0w

    I just wanted to mention that it is PARTIALY working, for example in DeepL translator app you can take a picture and highlight text, it gets recognised, no bugs there

  2. Iey4iej3 commented on Aug 30, 2023

    @Iey4iej3
    Author

    It might be better to document what (API) is working and what is yet to implement.

  3. added
    📸 Vision
    on Dec 24, 2023
  4. Rua commented on Jan 10, 2024

    @Rua

    I currently am unable to scan QR codes with the Dutch national identification app DigID because of this problem, which locks me out of some government services. Is there any progress on this?

  5. ltguillaume commented on Jan 10, 2024

    @ltguillaume

    I currently am unable to scan QR codes with the Dutch national identification app DigID because of this problem, which locks me out of some government services. Is there any progress on this?

    That doesn't make any sense. DigiD recently made changes to include a library to scan QR codes, making it independent of MLKit. See https://tweakers.net/nieuws/215204/inloggen-op-digid-app-kan-voortaan-ook-op-telefoons-zonder-googles-qr-scanner.html

    @Rua Are you sure you're running the latest version?

  6. Rua commented on Jan 10, 2024

    @Rua

    I just reinstalled the latest version (6.9.3) from the Play Store today (via Aurora).

  7. ale5000-git commented on Jan 10, 2024

    @ale5000-git
    Member

    There is a probable fix here: c104211
    But there isn't any microG release yet.

  8. Iey4iej3 commented on Jan 10, 2024

    @Iey4iej3
    Author

    There is a probable fix here: c104211

    It might be better to link the commit to this issue.

  9. ale5000-git commented on Jan 10, 2024

    @ale5000-git
    Member

    There are a lot of issues regarding this API and I'm not sure the commit fix everything, so it is better to wait the new version of microG and let the users test it before say anything else.
    I will provide my custom build of microG when I get my main PC working again.

  10. konradmoesch commented on Feb 3, 2024

    @konradmoesch

    I am testing (gmscore master branch) with the mlkit quickstart app (https://github.com/googlesamples/mlkit/tree/master/android/vision-quickstart), which can use bundled and unbundled libraries (changeable in the gradle dependencies). It seems that the bundled dependency (com.google.mlkit:barcode-scanning) works fine, but if I change to the unbundled version, I get dynamite errors
    Whats the current status of this? Is somebody working on improving dynamite/mlkit support at the moment?

  11. ale5000-git commented on Feb 7, 2024

    @ale5000-git
    Member

    For those that want to test here there is my custom build of microG with all fixes included: https://github.com/micro5k/microg-unofficial-installer/raw/main/zip-content/origin/priv-app/GmsCore-ale5000.apk
    Since it is signed by me you can't just update but you have to remove the version that you have installed before installing the new one.

  12. licaon-kter commented on May 20, 2024

    @licaon-kter

    How far is this from being usable as a replacement for a random app that depends on Google's MLKit?

  13. Iey4iej3 commented on May 20, 2024

    @Iey4iej3
    Author

    This patch is already merged, and there are releases after the merge now. You can test yourself, I guess.

  14. axodentally commented on May 27, 2024

    @axodentally

    At least https://play.google.com/store/apps/details?id=com.goodsnooze.soosee still crasges atm. I get the following crash log:

    FATAL EXCEPTION: ImageAnalysis
    Process: com.goodsnooze.soosee, PID: 22776
    java.util.concurrent.ExecutionException: X3.a: Waiting for the text optional module to be downloaded. Please wait.
    	at m3.Q2.B(Unknown Source:29)
    	at s2.b.a(Unknown Source:653)
    	at x.C.a(Unknown Source:2)
    	at x.K.run(Unknown Source:65)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    	at java.lang.Thread.run(Thread.java:1012)
    Caused by: X3.a: Waiting for the text optional module to be downloaded. Please wait.
    	at v.e.a(Unknown Source:382)
    	at E1.h0.run(Unknown Source:52)
    	at k.h.run(Unknown Source:97)
    	at K2.p.run(Unknown Source:28)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    	at K2.p.run(Unknown Source:53)
    	... 1 more
    
  15. Iey4iej3 commented on May 27, 2024

    @Iey4iej3
    Author

    At least https://play.google.com/store/apps/details?id=com.goodsnooze.soosee still crasges atm. I get the following crash log:

    The crash log does not seem to be closely related to MLKit. Maybe #309 is relevant?

  16. Iey4iej3 commented on Oct 9, 2024

    @Iey4iej3
    Author

    face recognition is not supported yet.

    Local module descriptor class for com.google.mlkit.dynamite.face not found.

    Error preloading model resource
    com.google.mlkit.common.MlKitException: Waiting for the face module to be downloaded. Please wait.
    at com.google.mlkit.vision.face.internal.zza.zzd(Unknown Source:111)
    at com.google.mlkit.vision.face.internal.zzh.load(Unknown Source:3)
    at com.google.mlkit.common.sdkinternal.ModelResource.zza(Unknown Source:18)
    at com.google.mlkit.common.sdkinternal.zzn.run(Unknown Source:10)
    at com.google.mlkit.common.sdkinternal.zzt.run(Unknown Source:12)
    at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zze(Unknown Source:13)
    at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzc(Unknown Source:8)
    at com.google.mlkit.common.sdkinternal.zzk.run(Unknown Source:2)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzd(Unknown Source:10)
    at com.google.mlkit.common.sdkinternal.zzi.run(Unknown Source:2)
    at java.lang.Thread.run(Thread.java:1012)
    Caused by: com.google.android.gms.dynamite.DynamiteModule$LoadingException: No acceptable module com.google.android.gms.vision.face found. Local version is 0 and remote version is 0.
    at com.google.android.gms.dynamite.DynamiteModule.load(Unknown Source:693)
    at com.google.mlkit.vision.face.internal.zza.zze(Unknown Source:2)
    at com.google.mlkit.vision.face.internal.zza.zzg(Unknown Source:21)
    at com.google.mlkit.vision.face.internal.zza.zzf(Unknown Source:154)
    at com.google.mlkit.vision.face.internal.zza.zzd(Unknown Source:49)
    ... 12 more

  17. lecram89 commented on Mar 21, 2026

    @lecram89

    I get an error related to ML Kit Document Scanner API in PaperNext as well:
    Error: PlatformException(SCANNER_ERROR, Feature not available in the current version of the Google Play services, null, null)
    After some research I can confirm, that the app uses the API for scanning documents.
    Is there any progress regarding this API?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    📸 Vision

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions