I see examples where you have to extract device tokens and store them in a db to be able to send notifications to that device.
I wondered if I could use Firebase user ids to send a select list of users notifications skipping the need for tokens?
I see examples where you have to extract device tokens and store them in a db to be able to send notifications to that device.
I wondered if I could use Firebase user ids to send a select list of users notifications skipping the need for tokens?
No firebase is not support to send notification using userID.
You have to integrate FCM package for getting token if firebase using below link : https://pub.dev/packages/firebase_messaging
After getting token then only you can use this token and send the notification.
Other way of sending notification is the topic. For topic i am giving you below link : https://www.filledstacks.com/post/push-notifications-in-flutter-using-firebase/
No, you can't. You need to implement a custom notification sender from the firebase cloud function to send by user IDs. But you can't ignore the FCM tokens. You must register a valid FCM token of the user's device to trigger per device notification. Check the following guideline: