How To Check If Play Service Is Installed With Firebase?
I know how to check it with GoogleApiAvailability (by GCM). But this function is not supported be FireBase core library. my dependencies are: compile 'com.android.support:appcompat
Solution 1:
I believe what you're looking for is this:
compile'com.google.android.gms:play-services-auth:9.6.1'
Solution 2:
Maybe it's a bit late :) but I can suggest to use the following function to check the Google Play Services availability:
privatebooleancheckPlayServices() {
GoogleApiAvailabilityapiAvailability= GoogleApiAvailability.getInstance();
intresultCode= apiAvailability.isGooglePlayServicesAvailable(this);
if (resultCode != ConnectionResult.SUCCESS) {
if (apiAvailability.isUserResolvableError(resultCode)) {
apiAvailability.getErrorDialog(this, resultCode,
PLAY_SERVICES_RESOLUTION_REQUEST).show();
} else {
Log.i(LOG_TAG, "This device is not supported.");
finish();
}
returnfalse;
}
returntrue;
}
Post a Comment for "How To Check If Play Service Is Installed With Firebase?"