Reputation: 53
I use Google Play Services in my app, but it isn't necessary to run. However, when a device don't have Google Play Services, it shows a dialog which shows: This app won't run without google play services.
Question is, can I change this text? I couldn't find.
My Code:
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;
}
Upvotes: 3
Views: 1362
Reputation: 856
I guess you could just show a custom dialog instead of apiAvailability.getErrorDialog(this, resultCode, PLAY_SERVICES_RESOLUTION_REQUEST).show();
Upvotes: 3