hotspring hotspring - 4 months ago 14
Android Question

Handling Google Play Service Update Message

I am using googleservices in my application, the version 8.3. However when I downloaded my app on my old device (LG II Optimus), it showed me the following message


This app won't run unless you update Google Play
Services


I accepted and updated google services and then I could able to use my application. However I wonder what if user is not willing to update his current google play services in his device? How should I handle it? What is the recommended approach to handle?

What is the lowest version of google play services recommended or does anybody knows what is the Facebook google play service version or how could I find it?

Answer

How should I handle it?

Your app should simply refuse to start if no required Google Play Services (GPS from now on) is present, as your code may be using stuff not present in currently installed, outdated, version of GPS, which in most cases would result in app crashing.

What causes the upgrade dialog is version mismatch between Google Play Services installed on device and version of GPS you build your app against. This version is stored in your Manifest file:

<meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />

My personal experience tells it's right approach to resist from upgrading GPS as soon as upgrade shows up in SDK Manager, and (unless you sure you want this) it's wise to resist for at least couple of weeks (or perhaps even completely avoid unless you need new features etc).

Major problem you can face with rushed upgrade is bad user experience. If you have your app built with new GPS SDK and released as soon as you see new GPS SDK is released by Google, then your users will be offered upgrade in Play Store (or auto upgraded). But then some of them (sometimes "some" is high percentage) may face problems not being able to launch your updated app because there's still no Google Play Service upgrade available for them (due to distribution, region, whatever). So each start would tell "Hej, upgrade or GTFO". But there's no upgrade. Guess who will be punished by user with one star ratings...

What is the lowest version of google play services recommended or does anybody knows what is the Facebook google play service version or how could I find it?

Same as with your app, you can get this from app's Manifest file if you really need to know.

Comments