react-native-community/discussions-and-proposals

Add "google play services" bool to android platform values

bob27aggiustatutto opened this issue · 5 comments

https://reactnative.dev/docs/platform

Add the option to detect if an android user has google play services or not

We have the same question if an android user has no google play services. :(

You can do this with react-native-firebase: https://rnfirebase.io/app/utils#android---checking-play-services

thanks for your help! We implemented this feature of checking play services using native module, if only we had known earlier that we could use firebase directly......
I wonder if you can use the library on Android without the play services? :)

You can do this with react-native-firebase: https://rnfirebase.io/app/utils#android---checking-play-services

It doesn't work. I get this error

ERROR  [Error: You attempted to use a firebase module that's not installed on your Android project by calling firebase.app().

Ensure you have:

1) imported the 'io.invertase.firebase.app.ReactNativeFirebaseAppPackage' module in your 'MainApplication.java' file.

2) Added the 'new ReactNativeFirebaseAppPackage()' line inside of the RN 'getPackages()' method list.

See http://invertase.link/android for full setup instructions.]

update: we got it work in our project, by this pr PoliNetworkOrg/PoliFemo#189

there are comments in italian