I'm trying to use the Google ML kit barcode detection feature. For this, I have installed this example app provided by google. I have also connected my app to one of my firebase projects. When I open the app and go to LivePreviewActivity in that Barcode detection. The camera starts but no barcode is detected!. As per the quick start guide I've also added
<meta-data
android:name="com.google.firebase.ml.vision.DEPENDENCIES"
android:value="barcode" />
in my manifest file. Also I have included this
FirebaseVisionBarcodeDetectorOptions options =
new FirebaseVisionBarcodeDetectorOptions.Builder()
.setBarcodeFormats(
FirebaseVisionBarcode.FORMAT_CODE_128)
.build();
in BarcodeScanningProcessor.java file.
The errors I'm getting is:
Barcode detection failed com.google.firebase.ml.common.FirebaseMLException: Waiting for the barcode detection model to be downloaded. Please wait.
E/BarcodeNativeHandle: Error Loading module
java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.chimera.DynamiteModuleInitializer"
I've installed this app on two phones Huawei Mate 8 and Samsung Galaxy S7 Edge. The app is not able to detect barcodes from both the phones.
My aim is to detect/scan barcodes from live camera preview. Thanks.