Check Google Play service availability

private boolean checkPlayServices() {
        // check google play service availability and make it available
        GoogleApiAvailability googleAPI = GoogleApiAvailability.getInstance();
        int result = googleAPI.isGooglePlayServicesAvailable(this);
        if (result != ConnectionResult.SUCCESS) {
            if (googleAPI.isUserResolvableError(result)) {
                googleAPI.getErrorDialog(this, result,
                        PLAY_SERVICES_RESOLUTION_REQUEST).show();

                //googleAPI.makeGooglePlayServicesAvailable(this);
            }

            return false;
        }

        return true;
    }

References
https://stackoverflow.com/questions/31016722/googleplayservicesutil-vs-googleapiavailability
https://developers.google.com/android/reference/com/google/android/gms/common/GoogleApiAvailability
https://developers.google.com/android/reference/com/google/android/gms/common/ConnectionResult