react-native-google-signin/google-signin

Customize error message for GoogleSignin.hasPlayServices when Play Services are not available

clemwo opened this issue · 1 comments

clemwo commented

Hi there,

Currently if Google Play Services aren't available I'm getting the error message: <app_name> won't run without Google Play services, which are not supported by your device

Is there a feature planned for customizing the error message in case Google Play Services aren't available?
Or maybe a boolean flag for disabling the error message?

The reason for this is that my app works perfectly fine without Play Services and the only functionality that needs it is the Google Sign In.

So I would like to show a custom error message telling the user to use another login method if he doesn't have Play Services as the current error message might be confusing.

Hello and thanks for asking,
You cannot modify the error message at this point, and I don't believe there is a native api that would allow this, so it may be impossible.

What you can do though, is not display that dialog - see https://github.com/react-native-google-signin/google-signin#hasplayservicesoptions - set showPlayServicesUpdateDialog to false. You can show your own error dialog or ignore the message.

Thank you 🙂