Я использовал Google Vision API, чтобы читать текст с любого объекта, такого как газета или текст на стене. Я пробовал тот же образец с веб-сайта разработчика Google, но мой Text Recognizer всегда возвращает false для функции IsOperational
. Я протестирован на Blackberry keyone, а также протестирован на Moto x, игра работает нормально.
Файл Gradle:
compile 'com.google.android.gms:play-services-vision:11.0.4'
Может ли кто-нибудь помочь мне в этом. Заранее спасибо
TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();
textRecognizer.setProcessor(new OcrDetectorProcessor(mGraphicOverlay, OcrCaptureActivity.this));
if(!textRecognizer.isOperational()) {
Log.e("TextRecog","Not Operational"); IntentFilter lowstorageFilter = new
IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW); boolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null;
}