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

156
Vistas
How can I play a ringtone on an Android device when receiving push-notification in a PWA?

I have a PWA that is used in a controlled environment (meaning it's only used by a few people, so I have access to all the devices, so I have much room for workarounds). The PWA can be installed, that's how it's used on Android devices. I have a service-worker that caches the files. The PWA receives push-notifications through Firebase Messaging.

I send this to get a push-notification:

notification:
        {
            title:"Video call!",
            body:"Videó call from:"+m,
            click_action: "https://examplesite.app/?x="+m,
            sound: "default",
            vibrate: [200, 100, 200, 100, 200, 100, 200]
        }

My problem is I want the PWA to play a longer ringtone in the background when a push-notification comes in, just like when a normal call comes in on the phone. How can I achieve this? I have read that browsers do not support such things, however I am trying to look for any kind of workaround. If the service-worker could play a ringtone whenever there's an incoming push-notification, it would be great. I only need to achieve this on mobile devices, however at this point I can't rework the PWA into an Android application if that could make a difference. I could write a tiny Android application that's only there to listen for such notifications and play music, if it's even possible.

So is there any way I can make the PWA play a ringtone when there is a push-notification coming in?

about 4 years ago · Juan Pablo Isaza
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