我在我的应用程序中使用了Google Play服务,但没有必要运行。但是,当设备没有Google Play服务时,会显示一个对话框,其中显示:没有Google Play服务,该应用将无法运行。

问题是,我可以更改此文本吗?我找不到

我的代码:

private boolean checkPlayServices() {
    GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();
    int resultCode = apiAvailability.isGooglePlayServicesAvailable(this);
    if (resultCode != ConnectionResult.SUCCESS) {
        if (apiAvailability.isUserResolvableError(resultCode)) {
            apiAvailability.getErrorDialog(this, resultCode,
                PLAY_SERVICES_RESOLUTION_REQUEST).show();
        } else {
            Log.i(TAG, "This device is not supported.");
            finish();
        }
        return false;
    }
    return true;
}

最佳答案

我猜你可能只显示一个自定义对话框而不是apiAvailability.getErrorDialog(this, resultCode, PLAY_SERVICES_RESOLUTION_REQUEST).show();

08-03 21:45