Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

215
Vistas
how to manage and send notifications to multiple devices a user is logged in?

I'm developing an application having a Mobile App and a Web Panel, on which a user can log in on multiple devices at the same time. I'm using Firebase Cloud Messaging to send notifications.

So currently to send notifications I'm storing the Firebase Cloud Messaging token in an array and sending notifications by looping through that array e.g users can open the same account on 2 browsers/laptops + log in to 3 different mobile devices with the same account, so 5 different tokens will be stored in the database. Every time a user opens a mobile app it gets a new token which is saved in the DB. I'm not removing any token at any time.

So there will be a bulk of tokens collecting in my DB, which will take more and more time in sending notifications to a specific user on all the tokens.

So I want to know how can I manage these tokens? how can I validate? because I'm not removing tokens, notification sending requests always return 200. Should I use topic instead of tokens but how will I unsubscribe a user from the server-side.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You could create multiple attributes (instead of a string array) in the database (tokenFromAndroid, tokenFromIos, tokenFromWeb, etc.. other platforms). Every time you call the Firebase SDK to generate the token you could update the respective attribute in the database so the token is always the newest for that platform. In this case you would not have too many tokens for one user.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda