codelab-mlkit-android icon indicating copy to clipboard operation
codelab-mlkit-android copied to clipboard

Text recognition doesn't work on Xiaomi

Open beersheba opened this issue 4 years ago • 5 comments

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)

beersheba avatar Jun 23 '20 15:06 beersheba

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?

calren avatar Jun 23 '20 19:06 calren

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.

beersheba avatar Jun 24 '20 11:06 beersheba

@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

gaobq avatar Jul 30 '20 09:07 gaobq

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

zeeshan5422 avatar Aug 27 '20 19:08 zeeshan5422

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.

rahul-developer avatar Jan 26 '21 16:01 rahul-developer