android-vision icon indicating copy to clipboard operation
android-vision copied to clipboard

libocr.so not downloading

Open 11mbica opened this issue 7 years ago • 2 comments
trafficstars

We're using Mobile Vision'OCR reader in our app and we've came across a problem: in some cases, the libocr.so library is not downloaded or downloaded after a couple of seconds to a couple of hours. For example, if we try installing our application on a Huawei Nexus 6P, the library is downloaded after 2 hours. The logs that we get:

I/Vision: Loading library libocr.so I/Vision: libocr.so library load status: false I/Vision: Request download for engine ocr W/TextNativeHandle: Native handle not yet available. Reverting to no-op handle. W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite not found. I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite:0 and remote module com.google.android.gms.vision.dynamite:1402 I/DynamiteModule: Selected remote version of com.google.android.gms.vision.dynamite, version >= 1402

We've tried adding the meta-data tags in the AndroidManifest.xml:

<meta-data android:name="com.google.android.gms.version" android:value="@ integer/google_play_services_version"/> <meta-data android:name="com.google.android.gms.vision.DEPENDENCIES" android:value="ocr" />

and adding the dependencies in the module-level build.gradle:

implementation 'com.android.support:support-v4:27.0.2' implementation 'com.android.support:design:27.0.2'

but there was not success with these. We've also tried clearing the application's data and the Google Play Service app's data.

After researching for hours, we've came across someone's response that was saying to disable the camera permission from the Google Play Services app before trying to install the application. This is the only solution that we've found, but not a solution we can use, as we can't ask the user to do that so the OCR feature would work. Does anyone know a better solution to handle this?

11mbica avatar Feb 14 '18 15:02 11mbica

Same issue here, we were planning to use the vision library in an offline environment and this is a big problem for us. Did you find a solution to this? Thanks.

ant100984 avatar Oct 14 '18 08:10 ant100984

The online connection is only need for first start. The app works furtherhin offline

AppWerft avatar Jan 24 '20 12:01 AppWerft