An Android application requires updating the Google Play service - the "Open" button instead of the "Update"

To use GCM (Google Cloud Messaging), I need to implement the Google Play Services library in my application. Everything works on my Galaxy S2 (Android 4.1.2), but on my HTC (Android 2.2.2) I can’t update the Google Play service.

When the application creates (onCreate), I check if the Google Play service is installed or if it needs to be updated:

public static boolean isGooglePlayServiceEnabled(Context context) { return GooglePlayServicesUtil.isGooglePlayServicesAvailable(context) == ConnectionResult.SUCCESS ? true : false; } 

In my activity:

 onCreate(Bundle savedInstance) { // Some code.... if (!isGooglePlayInstalled(this)) { int errorCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(instance) if (errorCode == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED) { // Alert Dialog and prompt user to update App startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.google.android.gms"))); } } } 

The user is redirected to the Market to update the Google Play service. But when it arrives, there is no “Refresh” button! These are just two buttons: “Open” and “Delete”!

What should I do?

UPDATE

I just found out that Google is refusing support for Android <= 8 (2.2.2).

With over 97% of devices running Android 2.3 (Gingerbread) or newer versions of the platform, Froyo refused to support this release of the Google Play SDK services to make it possible to offer more powerful APIs in the future. This means that you will not be able to use these new APIs on devices running Android 2.2 (Froyo).

+8
source share
1 answer

Your device does not have the current version of Google Play Services. If there is no update, PlayStore will offer you to open the application.

0
source

Source: https://habr.com/ru/post/958368/


All Articles