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

196
Vistas
HTML: How can I have a popup only show on a certain os?

I have a web app (Sleepyheads) and have made it into an android app. I want a popup asking to download the app ONLY on android devices. How can I do this?

I'm using html 5 and VS code

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

0

you have to use javascript to find what is your user device.

this code says to you what is user os and device is.

navigator.userAgent
about 4 years ago · Juan Pablo Isaza Denunciar

0

You can use navigator.userAgent to get the browser string.

You will get reply like this.

'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Mobile Safari/537.36'

You can then check for Android word with includes

let browsertype=navigator.userAgent;
if(browsertype.includes("Android")){
    //Navigate to Play store link or other URL
    alert("Please follow the link to download App");
}
about 4 years ago · Juan Pablo Isaza Denunciar

0

You can find this type of info in the window.navigator.userAgent. In order to better work with that info, you can use a parser, something like https://github.com/faisalman/ua-parser-js. Then is just a condition based on the OS.

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