Ali Behzadian Nejad Ali Behzadian Nejad - 1 month ago 13x
Android Question

What is the minimum version code of Google Play Services that supports GCM Network Manager?

I want to use

GCM Network Manager
in my application. This library needs
Google Play Service
version 7.5 and above installed on user's device. I want to check that if
Google Play Services
is installed and its version is above 7.5. I did as below:

private boolean isGcmNetworkManagerAvailable(Context context) {
final int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);
if (status != ConnectionResult.SUCCESS) {
return false;

final String gpsPackageName = GooglePlayServicesUtil.GOOGLE_PLAY_SERVICES_PACKAGE;
PackageManager pm = context.getPackageManager();
try {
PackageInfo gpsPackageInfo = pm.getPackageInfo(gpsPackageName,0);
int versionCode = gpsPackageInfo.versionCode;
// What is the version code of Google Play Services version 7.5?
return false;
} catch (PackageManager.NameNotFoundException e) {
return false;

return true;

Problem is that I don't know the exact version code of
Google Play Services
version 7.5 to check in this method.


Based on this answer version code of google Play Services is simply a 7-digit number created from its version code so version 7.5 has 7500000 version code.