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

203
Visualizações
How do I close an Ionic app that utilizes an iFrame to display a website on Android

I am making an ionic app that uses an iframe to open a website on Android 11. To navigate utilizing the back button on the phone, I'm using the following code (this is executed when the app's homepage is launched):

constructor(private platform : Platform ) {
  this.platform.backButton.subscribeWithPriority(10, () => {
    window.history.go(-1);
  });
}

Here is the homepage code:

<ion-content> <iframe id="mainIframeBrowser" src="http://192.168.1.19:8000" width="100%" height="100%" frameborder="0" allow="camera; microphone" style="padding:0;margin:0;"> </iframe> </ion-content>

What I want to do: when I click the back button on the first page of the history index, it exits the app.

ex: if(window history index == 0) navigator['app'].exitApp(); Can I do this using the Window Object, with either history or location? If so or if not, then how?

Thank you in advance.

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