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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With