I want to try one of google vision api on android. I added this line in gradle file
compile 'com.google.android.gms:play-services-vision:11.0.4'
also in manifest file I added this
<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="ocr" />
And here's the code snippet
TextRecognizer textRecognizer = new TextRecognizer.Builder(this).build();
try {
if (!textRecognizer.isOperational()) {
new AlertDialog.
Builder(this).
setMessage("Text recognizer could not be set up on your device").show();
return;
}
}
So here textRecognizer.isOperational()
always returns false. I looked to other questions and found nothing that helped me. (Device storage left 4 gb, so it's not storage issue). What I'm missing? UPDATE: I'm using LG G Flex 2 And tested same code on Samsung J7 (2017) and it works perfectly. So why G FLex2 fails?