I am implementing text recognition into a react native app which uses firebase (ie: it uses the Firebase ML Kit / google vision API). I am using version 0.61.5 of react-native and version 6.3.* of react-native-firebase (ie: the latest versions at time of writing).
When performing text recognition on a physical phone:
- Using
cloudTextRecognizerProcessImage()works correctly - Using
textRecognizerProcessImage()works correctly
When performing text recognition in the android studio emulator:
- Using
cloudTextRecognizerProcessImage()works correctly - Using
textRecognizerProcessImage()fails with the following message
com.google.firebase.ml.common.FirebaseMLException: Waiting for the text recognition model to be downloaded. Please wait.
The model never gets downloaded after repeated attempts. As per the documentation here I have added implementation 'com.google.firebase:firebase-ml-vision:24.0.1' to app/build.gradle and added the following to AndroidManifest.xml:
<meta-data
android:name="com.google.firebase.ml.vision.DEPENDENCIES"
android:value="ocr" />
Is there something else I need to do in order to get on device text recognition working in the emulator?
EDIT:
This happens with all types of on device image recognition including barcode scannning etc.