FCM with token registration in Firebase database

Asked

Viewed 274 times

0

Hi, I’m having second thoughts about using the FCM. I’m storing the token generated in the app by fcm in the fire database itself, in order to send the messages of a webservice also connected to the fire, but in order to send these messages it is necessary to have a token reference saved in the user’s account, my doubt is: how to reference the app token with the user ID that is your main key in the BD, how to know that the email or user name that I am putting in the BD is referring to a certain ID. For example, on the site I would have the listing of all users' emails, selecting one I would forward a notification to that user’s device.

  • Then you have to store the token along with the email.

  • i am registering the two together, within a user node, but at the time of doing that "Select" on the web I would have to pass the user uid that is generated by the fire itself... Then take the email and know the correct id ???

  • I’m not sure, but I could return the token via uid or email. What is your difficulty?

  • I’m not able to understand how to build this structure, when pulling on the Site, how I would reference to the user the email with the specific token.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.