【发布时间】:2020-09-01 00:09:11
【问题描述】:
当我没有安装 Google Play 服务时,我总是收到此消息。
通常这完全没问题,但现在华为不使用 google playstore 我真的想删除那个弹出窗口。我的用户每次打开应用时都会收到此消息,这会非常烦人。
如何使弹出窗口不向用户显示?有大佬知道这个消息是从哪里来的吗?是 firebase 做的吗?
【问题讨论】:
标签: android google-play google-play-services
当我没有安装 Google Play 服务时,我总是收到此消息。
通常这完全没问题,但现在华为不使用 google playstore 我真的想删除那个弹出窗口。我的用户每次打开应用时都会收到此消息,这会非常烦人。
如何使弹出窗口不向用户显示?有大佬知道这个消息是从哪里来的吗?是 firebase 做的吗?
【问题讨论】:
标签: android google-play google-play-services
您可以显示一个自定义对话框而不是这个。
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;
}
【讨论】: