Reputation: 2184
I have a backend that send fcm to web app and expo apps. Double checked all the credentials. But still unable to get it work. Both of the credentials are under same project. Backend is using firebase admin, with service account. Front end is using google-services.json. Anyone encountered this?
Upvotes: 1
Views: 2080
Reputation: 2184
Found out that the device token from expo-notification can only be used on standalone build. But not in expo-client during development.
https://forums.expo.io/t/using-fcm-as-push-notification-with-expo-client/42402/2?u=cyee
This is the copy paste comment by expo team.
Hi! If you want to send notifications directly through FCM, and not through the Expo notifications service, you’ll have to test in a standalone app (as in, an app you built with expo build:android). This is because you don’t have the push credentials for the Expo client app, only we do :slight_smile:
If you want to test in the Expo client app, then you can do that with Expo’s notifications, which you can read more about here- https://docs.expo.io/push-notifications/overview/
Upvotes: 2