Reputation: 1086
I have followed https://firebase.google.com/docs/ml-kit/android/read-barcodes and done integration in my application. But scan doesn't work in Samsung J5 device. However It works fine in Samsung A5, Moto G4 and Moto G5. While checking with logcat I can see below exception.
Exception: com.google.firebase.ml.common.FirebaseMLException: Waiting for the barcode detection model to be downloaded. Please wait.
can anyone help in this?
Upvotes: 3
Views: 1624
Reputation: 1402
This can happen if the storage on the device is not sufficient or say the internet is not available at all (which seems unlikely given the question). Try the following and see if it works:
Settings->Apps->Google Play Services->Storage->Manage Space->Clear All Data
This is a one-time issue faced during development (unless the app data is cleared again).
When you deploy your app, you can avoid this problem in production by pre-downloading the recognition model upon app installation from Play Store:
<meta-data
android:name="com.google.firebase.ml.vision.DEPENDENCIES"
android:value="text" />
Upvotes: 3