Skip to content

Instantly share code, notes, and snippets.

@Ansh1234
Created September 28, 2016 11:27
Show Gist options
  • Save Ansh1234/6d610569969696b6f7af1ade937e88e5 to your computer and use it in GitHub Desktop.
Save Ansh1234/6d610569969696b6f7af1ade937e88e5 to your computer and use it in GitHub Desktop.
/**
* Method to check whether to check Google Play Services is up to date.
*
* @return
*/
private boolean checkPlayServices() {
GoogleApiAvailability googleAPI = GoogleApiAvailability.getInstance();
int result = googleAPI.isGooglePlayServicesAvailable(this);
if (result != ConnectionResult.SUCCESS) {
//Google Play Services app is not available or version is not up to date. Error the
// error condition here
return false;
}
//Google Play Services is available. Return true.
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment