0

Currently I have some problem with the google play services. According to this message, the Services are not availabe. An other message is:

Google Play services out of date.  Requires 11400000 but found 11302470

The question is now how I could update the google play services (I use play-services-places:11.4.2)

10-08 15:03:55.711 3680-3680/com.mypackage E/GooglePlayServicesUtil:     
GooglePlayServices not available due to error 2
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err: com.google.android.gms.common.GooglePlayServicesRepairableException: Google Play Services not available
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err:     at 
com.google.android.gms.common.zzo.zzbj(Unknown Source)
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err:     at 
com.google.android.gms.common.zze.zzbu(Unknown Source)
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err:     at 
com.google.android.gms.location.places.ui.zzb.build(Unknown Source)
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err:     at  com.google.android.gms.location.places.ui.PlaceAutocomplete$IntentBuilder.build(Unknown Source)

According to this I have no change to setup the (needed) map. Could anyone help me?

Tobias Lukoschek
  • 355
  • 1
  • 3
  • 20

1 Answers1

1

You need to check for the version of google play service and show the error message based on the return type.

Here is a little method I use.

private void checkGooglePlayServices(){
        switch (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this)){
            case ConnectionResult.SERVICE_MISSING:
                GoogleApiAvailability.getInstance().getErrorDialog(this,ConnectionResult.SERVICE_MISSING,0).show();
                break;
            case ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED:
                GoogleApiAvailability.getInstance().getErrorDialog(this,ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED,0).show();
                break;
            case ConnectionResult.SERVICE_DISABLED:
                GoogleApiAvailability.getInstance().getErrorDialog(this,ConnectionResult.SERVICE_DISABLED,0).show();
                break;
        }
    }

Error 2 is ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED

tyczj
  • 71,600
  • 54
  • 194
  • 296