public static boolean hasGooglePlayServices(final Context context){
  if (context == null) {
    throw new NullPointerException("context cannot be null");
  }
  GoogleApiAvailability googleAPI=GoogleApiAvailability.getInstance();
  int result=googleAPI.isGooglePlayServicesAvailable(context);
  if (result != ConnectionResult.SUCCESS) {
    return false;
  }
  return true;
}

public static boolean hasGooglePlayServices ( final Context context ) { if ( context == null ) { throw new NullPointerException ( "context cannot be null" ) ; } GoogleApiAvailability googleAPI = GoogleApiAvailability . getInstance ( ) ; int result = googleAPI . isGooglePlayServicesAvailable ( context ) ; if ( result != ConnectionResult . SUCCESS ) { return false ; } return true ; }
checks to see if play services are available on device
