安卓应用需要更新Google Play服务 - 更新按钮而非打开按钮

8
为了使用GCM (Google Cloud Messaging),我需要在我的应用程序中实现Google Play Service库。在我的Galaxy S2(安卓4.1.2)上一切正常,但是在我的HTC(安卓2.2.2)上无法更新Google Play Service。
当应用程序正在创建(onCreate)时,我会检查是否已安装Google Play Service或者需要更新:
public static boolean isGooglePlayServiceEnabled(Context context)
{
    return GooglePlayServicesUtil.isGooglePlayServicesAvailable(context) == ConnectionResult.SUCCESS ? true : false;
}

在我的活动中:
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")));
        }
    }
}

用户被重定向到市场以更新Google Play服务。但是当他到达时,没有“更新”按钮!只有两个按钮:“打开”和“卸载”!
我该怎么办?
更新:
我刚刚发现谷歌不再支持Android <= 8(2.2.2)。
"由于超过97%的设备现在运行Android 2.3(Gingerbread)或更高版本的平台,我们正在此版本的Google Play服务SDK中放弃对Froyo的支持,以便将来能够提供更强大的API。这意味着您将无法在运行Android 2.2(Froyo)的设备上使用这些新的API。"

1
有适用于Froyo的Google Play服务。如果您使用“适用于Froyo的Google Play服务”,则将无法使用包含在Google Play服务4.0中的新功能。对于地图,4.0功能包括: - Madhur Ahuja
1个回答

0

您的设备目前没有Google Play服务的最新版本。如果没有可用更新,Play商店只会向您提供打开该应用程序的选项。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接