2

I am working on a requirement in which I need to send push notification to each and every user every morning. But each user will get customized notification message according to their progress.

I have written a cloud function that sends same message to every user as it sends to topic. I have below questions regarding firebase and notifications.

  1. Does firebase stores the FCM token automatically? Right now I am storing the FCM token manually into Firestore once user registers.

  2. If firebase stores the FCM token automatically then how can I retrieve them?

  3. As I am sending customized message to each user I am not able to use topics to send customized notification to each user. What is the other way to send notification to single user at a time?

Thank you

KENdi
  • 7,576
  • 2
  • 16
  • 31
Sam
  • 2,972
  • 6
  • 34
  • 62
  • Possible duplicate (?) of [Best practices for storing ID tokens and sending web push notifications using Firebase](https://stackoverflow.com/q/46091412/4625829) – AL. Jan 22 '19 at 16:24

1 Answers1

2
  1. It doesn't. It's the developer's responsibility to store the tokens as they need them. So what you're currently doing is the right way to go.

  2. See 1.

  3. There is no other way around this one. If each user is to receive a unique message, then you'd have to send a separate request for each.

AL.
  • 36,815
  • 10
  • 142
  • 281
  • With all that said, please *avoid* having multiple questions in a single post. Cheers! – AL. Jan 22 '19 at 16:22