Reputation: 67
I have created an application that uses the latest play services (7.8). This app uses the new barcode reader and it is vital to the application's functionality. As I was looking for an answer for this question I've found out that when using the Maps API the application forces the user to have updated play services. Now I am not able to achieve that.
I'm using genymotion as my emulator and installed play services with an outdated version. It runs the app fine but barcode scanner isn't running. Log also says:
Didn't find class "com.google.android.gms.vision.client.DynamiteNativeBarcodeDetectorCreator"
I have already added this in the application tag in AndroidManifest:
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
Hangouts and other google apps also have that block when you open the app that forces the user to install an updated play services first before using the application.
Sorry for my bad English. Thank you for the help!
Upvotes: 1
Views: 549
Reputation: 67
Maybe I didn't search hard enough. There is an instruction in the android developer guide's site
I only added this code in my activity's onResume() method:
Dialog errorDialog = GoogleApiAvailability.getInstance().getErrorDialog(this,
GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(getApplicationContext()),
REQUEST_CODE_RECOVER_PLAY_SERVICES);
if (errorDialog != null)
errorDialog.show();
Upvotes: 1