I'm using react-native-firebase/messaging
and I'm working with the expo.
I tried using messaging().getToken();
but this error occurred
`
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.`
I followed the expo docs steps to use the firebase sdk but I keep getting this error. This is the configuration in app.json
:
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.siriusnet.tiwsal",
"buildNumber": "1.0.0"
},
"android": {
"package": "com.siriusnet.tiwsal",
"googleServicesFile": "./google-services.json",
"versionCode": 1,
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},