I am using firebase push notification in my application,the docs states that we should check for google play services.Following is the code.
public boolean isGooglePlayServicesAvailable(Activity activity) {
GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();
int status = googleApiAvailability.isGooglePlayServicesAvailable(activity);
if (status != ConnectionResult.SUCCESS) {
if (googleApiAvailability.isUserResolvableError(status)) {
googleApiAvailability.getErrorDialog(activity, status, 2404).show();
}
return false;
}
return true;
}
But this code is asking for updating google play services even when i am receiving push on my device.How do i check for the minimum version so that i get the update dialog only when its necessary?