android / codelab-mlkit-android

Other
179 stars 101 forks source link

Text recognition doesn't work on Xiaomi #39

Open beersheba opened 4 years ago

beersheba commented 4 years ago

Device model: Xiaomi MI 8 SE Android version: 10 (MIUI 11.0.3) Play Store version: 20.4.18 Google Play Services 20.21.17

2020-06-23 18:01:02.165 14211-14553/com.google.codelab.mlkit E/Vision: Error loading module com.google.android.gms.vision.ocr optional module true: com.google.android.gms.dynamite.DynamiteModule$LoadingException: No acceptable module found. Local version is 0 and remote version is 0.
2020-06-23 18:01:02.166 14211-14553/com.google.codelab.mlkit W/e.codelab.mlki: Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
2020-06-23 18:01:02.168 14211-14211/com.google.codelab.mlkit W/System.err: com.google.mlkit.common.MlKitException: Waiting for the text recognition model to be downloaded. Please wait.
2020-06-23 18:01:02.168 14211-14211/com.google.codelab.mlkit W/System.err:     at com.google.mlkit.vision.text.internal.zzb.zza(com.google.android.gms:play-services-mlkit-text-recognition@@16.0.0:20)
2020-06-23 18:01:02.168 14211-14211/com.google.codelab.mlkit W/System.err:     at com.google.mlkit.vision.text.internal.zzb.run(com.google.android.gms:play-services-mlkit-text-recognition@@16.0.0:51)
2020-06-23 18:01:02.168 14211-14211/com.google.codelab.mlkit W/System.err:     at com.google.mlkit.vision.common.internal.MobileVisionBase.zza(com.google.mlkit:vision-common@@16.0.0:23)
2020-06-23 18:01:02.168 14211-14211/com.google.codelab.mlkit W/System.err:     at com.google.mlkit.vision.common.internal.zzb.call(Unknown Source:4)
2020-06-23 18:01:02.168 14211-14211/com.google.codelab.mlkit W/System.err:     at com.google.mlkit.common.sdkinternal.ModelResource.zza(com.google.mlkit:common@@16.0.0:26)
2020-06-23 18:01:02.168 14211-14211/com.google.codelab.mlkit W/System.err:     at com.google.mlkit.common.sdkinternal.zzn.call(Unknown Source:6)
2020-06-23 18:01:02.168 14211-14211/com.google.codelab.mlkit W/System.err:     at com.google.mlkit.common.sdkinternal.zzm.run(com.google.mlkit:common@@16.0.0:5)
2020-06-23 18:01:02.168 14211-14211/com.google.codelab.mlkit W/System.err:     at com.google.mlkit.common.sdkinternal.zzq.run(com.google.mlkit:common@@16.0.0:3)
2020-06-23 18:01:02.168 14211-14211/com.google.codelab.mlkit W/System.err:     at android.os.Handler.handleCallback(Handler.java:883)
2020-06-23 18:01:02.168 14211-14211/com.google.codelab.mlkit W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:100)
2020-06-23 18:01:02.169 14211-14211/com.google.codelab.mlkit W/System.err:     at com.google.android.gms.internal.mlkit_common.zzb.dispatchMessage(com.google.mlkit:common@@16.0.0:6)
2020-06-23 18:01:02.169 14211-14211/com.google.codelab.mlkit W/System.err:     at android.os.Looper.loop(Looper.java:224)
2020-06-23 18:01:02.169 14211-14211/com.google.codelab.mlkit W/System.err:     at android.os.HandlerThread.run(HandlerThread.java:67)
calren commented 4 years ago

Hey @beersheba, thanks for flagging this! The error logs seem to indicate that the model wasn't downloaded successfully yet. Were you able to verify that the device itself had a good internet connection when you launched the app?

beersheba commented 4 years ago

Hi @calren, thanks for your reply. Yes, the device has a stable connection. Face contour recognition works as expected. Also, the same error appears in the other projects using the ML kit text recognition feature.

gaobq commented 4 years ago

@beersheba I have a same problem with you ,when I changed to Google Pixel 4 ,it's worked, my xiaomi phone also installed Google Play Service and my xiaomi device can google search

zeeshan5422 commented 4 years ago

@beersheba I am also facing the same issue, My Xiaomi phone is POCO F1.

rahul-developer commented 3 years ago

Hi @calren , I have updated the dependency to 'com.google.android.gms:play-services-mlkit-text-recognition:16.1.2' but text recognition doesn't seem to come through on Google Pixel devices (any version). Do we have any update on this or any work around for the same?

Looking forward to get more on this by the earliest.