1

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.

benjaminbutton
  • 143
  • 1
  • 16
  • From this [SO post](https://stackoverflow.com/questions/37327891/android-vision-face-detector-dependencies-are-not-yet-available), same problem was encountered. You may pick some important points there. Also when you visit the [Google Play Services 9.2 bug fixes](https://developers.google.com/vision/android/release-notes#google_play_services_92), there are some tips that you can follow to resolve some issues. – MαπμQμαπkγVπ.0 Jun 06 '18 at 10:40

1 Answers1

0

From this SO post, same problem was encountered. You may pick some important points there. Also when you visit the Google Play Services 9.2 bug fixes, there are some tips that you can follow to resolve some issues.

MαπμQμαπkγVπ.0
  • 5,887
  • 1
  • 27
  • 65
  • exactly, but isn't true....I use in my phone version 12.6.85, the last one....but I have always the error above...anyway the only thing that I can detect is that barcodeDetector.isOperational() returns always false, and I have to show alert for user to clear data of Google Play Services app? Google this is unacceptable and ridiculous. – benjaminbutton Jun 07 '18 at 11:41