Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minimum Google Play Services version for Push Notification

I am using Google Cloud Messaging to receive Push Notifications on Android phones. I have succeed and everything seems to work well. However, Google recommends to check if Google Play Services is updated to the last version (because Push Notifications is a new feature).

Using a Nexus 7 (4.4.4) and enabling version checking at the beginning of the Activity I am required to update my Google Play Services since there is a newer version. However, Push Notifications work perfectly without the update. I do not want to require my users to update Google Play Services if it is not absolutely necessary.

My question: what is the minimum version that I should check for Google Play Services in order to receive Push Notifications from GCM?

This is the code:

    private boolean checkPlayServices() {
        int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
        if (resultCode != ConnectionResult.SUCCESS) {
            if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {
                GooglePlayServicesUtil.getErrorDialog(resultCode, this,
                        PLAY_SERVICES_RESOLUTION_REQUEST).show();
            } else {
                Log.i(TAG, "This device is not supported.");
                finish();
            }
            return false;
        }
        return true;
    }

Remark: I don't need to check for the latest version of Google Play Services but the minimum version supporting Push Notifications

EDIT: I've made some clarification due to comments

like image 438
David Avatar asked Sep 30 '14 17:09

David


1 Answers

I have an application with GCM enabled. As I saw in my database, there exists users with Google Play Sercvices version more than 3.0.27.

But be carefull about using GcmNetworkManager, as it needs at least google play service 7.5.0

like image 95
Ali Avatar answered Sep 26 '22 07:09

Ali