点击go google service对话框中的更新按钮

时间:2014-02-27 12:41:49

标签: android

我使用此代码检查google服务的版本:

if (resultCode == ConnectionResult.SUCCESS) {
    startActivity(new Intent(this, MapActivity.class));
}else if (resultCode == ConnectionResult.SERVICE_MISSING ||
    resultCode == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED ||
    resultCode == ConnectionResult.SERVICE_DISABLED) {
    Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 1);
    dialog.show();
    setMapFlag(true);
}

如何检查用户是否点击更新按钮?

1 个答案:

答案 0 :(得分:0)

我不明白为什么你需要检查用户是否点击了更新按钮。您真正关心的是检测谷歌播放服务的版本。用户可以点击更新按钮,但不会从Google Play更新,因此您应该将检查机制设置为onResume()方法。