I am trying to use Google Play Service in my Android app. As Google document says, we need to check if the Google API is available before using it. I have searched some way
You will have to use GoogleApiAvailability instead:
GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance(); int errorCode = googleApiAvailability.isGooglePlayServicesAvailable(this);
this represents the context.
this
context