Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!