0

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?

megamind11
  • 97
  • 6
  • 1
    Hi. Have you seen this [answer](http://stackoverflow.com/a/18755642/4625829)? :) AFAIK, you'll get the prompt for updating the Google Play services depending on what your app needs to function properly, not just on what the FCM service needs. – AL. Apr 10 '17 at 09:21
  • @AL. hi,I am using minsdk 17,It there need to check for google play services? – megamind11 Apr 10 '17 at 09:34

0 Answers0