I've tried to use GooglePlayServices Vision package in my app. I've tried in 4 devices and 3 give me that "dependencies are not yet available" on
BarcodeDetector barcodeDetector = new BarcodeDetector.Builder(context).build();
if(!barcodeDetector.isOperational()){
//show dependencies are not yet available
}
The problem is that even if I close and reopen my app, when I go in the ScanQRCodeActivity i obtain always this error.
So I've seen for the PlayServices availability though
GoogleApiAvailability googleAPI = GoogleApiAvailability.getInstance();
if(googleAPI.isGooglePlayServicesAvailable(this) != ConnectionResult.SUCCESS) {
//show dialog
}
but it returns always SUCCESS.
My manifest have meta-data
<meta-data android:name="com.google.android.gms.vision.DEPENDENCIES" android:value="barcode" />
And my gradle have the
implementation 'com.google.android.gms:play-services-vision:15.0.2'
Anyway, the only thing that works for me is Clear data of Google Play Services, but people that use my app don't know this. Have you any idea?
Thanks.