Last Updated: February 25, 2016
·
1.683K
· nrike

Checking Google Play services Availability

 @Override
    protected void onResume() {
    checkGooglePlayServicesAvailability();
    super.onResume();
}

public void checkGooglePlayServicesAvailability() {
    int statusCode = GooglePlayServicesUtil
            .isGooglePlayServicesAvailable(this);
    if (statusCode == ConnectionResult.SUCCESS) {
        Log.d("Is Google Play services available?", "" + statusCode);
    } else {

        GooglePlayServicesUtil.getErrorDialog(statusCode, this, 0).show();
    }
}