I have a react-native application with its backend in NodeJS. I started implementing notifications using expo-notifications and it is working fine in production with iOS but not with Android.
I have followed this documentation to implement everything. I know that for android I have to setup FCM which is what I did using this.
What I did :
- Created my Firebase App
- Added Firebase to my Android App
- My Android package name is the same as the value of android.package in my app.json
- Downloaded google-services.json and placed it in my Expo app's root directory
- Uploaded the server credentials using expo push:android:upload --api-key . This has been well configured because when I do expo push:android:show I see the correct token
However, in production I get this error:
Exception occurred while executing exported method getDevicePushTokenAsync on module ExpoPushTokenManager. Please set your Project ID. A valid firebase project ID is required to communicate with Firebase server APIs: It identifies your project with Goolge.
Did I forget any of the steps ? What is wrong with my project ID? Do I need to completely rebuild my code and send it on Google Play Store or can I do an instant update using expo publish ?
Here is my app.json android in case:
"android": {
"versionCode": 13,
"userInterfaceStyle": "light",
"package": "com.xxx.xx",
"googleServicesFile": "./google-services.json",
"useNextNotificationsApi": true,
"permissions": [
"CAMERA",
"CAMERA_ROLL",
"MEDIA_LIBRARY",
"WRITE_EXTERNAL_STORAGE",
"READ_EXTERNAL_STORAGE",
"NOTIFICATIONS"
]
},
Any help would be appreciated :)
PS : I had a look at this question but still getting same problem.