boolean checkAvailablePush ( Context context ) { int connectionStatus = GoogleApiAvailability . getInstance ( ) . isGooglePlayServicesAvailable ( context ) ; if ( connectionStatus == ConnectionResult . SUCCESS ) { log . i ( "Google Play Services are available on this device." ) ; return true ; } else { if ( GoogleApiAvailability . getInstance ( ) . isUserResolvableError ( connectionStatus ) ) { log . e ( "Google Play Services is probably not up to date. User recoverable Error Code is " + connectionStatus ) ; } else { log . e ( "This device is not supported by Google Play Services." ) ; } return false ; } }
Checks if Google Play Services is available on the device .