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

194
Vistas
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 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