1

I have an app that is released and working great. Every now and then few users post me and say that the app requests them to update Google Play Services but Google Play doesn't show the update. This is because their device is no longer supported by the latest version of Google Play Services.

Is there any other way to determine if a device is supported by the version of Google Play Services which you are using, other than checking if the device runs Android 2.3 or higher? (2.3 or higher is quaranteed to have the latest version)

Finnboy11
  • 986
  • 2
  • 15
  • 34
  • if you release an update to your app with a new version of google play services that has not reached their phone yet you could come across with this problem too. If you are using a version of google play services that no longer supports below 2.3 you should drop support for them also – tyczj Jul 07 '14 at 17:22
  • Adding a support for the versions below 2.3 is easier said than done. Much so because I haven't found any documentation about the supported Android versions. I don't know which Google Play Services version to revert to and considering the major changes done to the latest versions, it might require tons of work to revert any of the code, let alone update it with the rest of the app. – Finnboy11 Jul 07 '14 at 17:33
  • you can download the google play services that is compatable with versions below 2.3 right from the SDK Manager – tyczj Jul 07 '14 at 17:36
  • Check the comment history for the answer below. I had totally forgotten about Google Play Services for Froyo. It will have other issues for me, but they are another story. – Finnboy11 Jul 07 '14 at 17:37

1 Answers1

1

You can use PackageManager to get versionCode of Google Play Services installed on the device (if present):

int versionCode = getPackageManager().
                     getPackageInfo("com.google.android.gms", 0).versionCode;

and show Dialog to the user, but I'd personally do nothing about that. If the latest version of platform is 2.3 just set minSdk to 2.3 - that would eliminate users on older versions (which makes no difference as they would not be able to use your app anyway).

EDIT

If you care your pre 2.3 users then you can release separate app that is build against Google Play Services for Froyo.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
  • "they would not be able to use your app anyway" This is actually not true. Google Play Services is required only for the online part. You can still run the app offline without it and that's why setting minSdk to 2.3 is an absolute no for me. Checking for the Google Play Services version does no good either as Google Play Services will check the compatibility automatically at sign in and request the user to download the newest version if needed. The issue is that Google Play Services will request the user to update even though an update is not available! – Finnboy11 Jul 07 '14 at 17:31
  • ***"The issue is that Google Play Services will request the user to update even though an update is not available"*** - which means exactly what I said - they will not be able your app. But see my edited answer – Marcin Orlowski Jul 07 '14 at 17:33
  • Oh yeah, Google Play Services for Froyo. Totally forgot the existence of that weirdo. It will pose some other issues but they fall outside the range of this one. – Finnboy11 Jul 07 '14 at 17:35