Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

97
Visualizações
How do I Launch Android/iOS App on Webpage Load

I am trying to figure out how to launch an app upon loading a website. The idea is, a user clicks a link in an email or text, and it brings them to a webpage, witch will redirect them to either the app if they have it installed, or the webpage if they dont have the app, or are using a computer. I have this script here

launchApp = function () {
    window.location = "<app launch url>";
    setTimeout(launchWebpage, 25);
}
 
launchWebpage = function () {
    window.location = "<Webpage Url>";
}

$( window ).on( "load",launchApp); 

This loads the web page, but does not launch the app. If I get rid of the bottom window on load section, and instead call my launchApp function directly from a button, like

<button id="test" onclick="launchApp()">Button</button> 

everything works. It launches the app if installed, and if not, the webpage loads. How can I get this to work automatically instead of having to press the button?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda