This question has been asked severally and only suggestions are made. Ill comprehend every suggestion hopefully.
the dependency is defined in the manifest
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="ocr" />
and added on the app level
compile 'com.google.android.gms:play-services-vision:9.8.0'
The test device has sufficient storage which is greater than 10% of the internal and also has a very good internet connection. Permissions are also clearly defined
We start the TextRecognizer to detect text and we get our null response:
TextRecognizer textRecognizer = new TextRecognizer.Builder(getContext()).build();
if (!textRecognizer.isOperational()) {
Log.w("Main Activity", "Dependencies are not yet available");
Toast.makeText(getContext(), "Cannot Detect", Toast.LENGTH_LONG).show();
if(((MainActivity) getActivity()).hasLowStorage()) {
Toast.makeText(getContext(), "Low Storage", Toast.LENGTH_LONG).show();
Log.w("Custom_Storage", "Low Storage");
}
}
Most suggestions are to use a lower dependency compile 'com.google.android.gms:play-services:7.8+'
but it doesn't work for everyone. After publishing the app, some users cant use the app.
The suggestions are not solving the problem.
Similar questions: TextRecognizer isOperational API always returns false and detector.isOperational() always false on android