react-native-google-signin / google-signin

Google Sign-in for your React Native applications
https://react-native-google-signin.github.io/
MIT License
3.12k stars 877 forks source link

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

Closed clemwo closed 7 months ago

clemwo commented 8 months ago

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.

vonovak commented 8 months ago

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 🙂