35
Views
3
Comments
[InAppBrowser Plugin] App refresh after opening url in external browser on android
Question
inappbrowser-plugin
Mobile icon
Forge asset by OutSystems
Application Type
Mobile

I'm using the InAppBrowser plugin for both Android and iOS apps. I have multiple URLs that I want to open outside the app in the device's external browser. This works as expected on both platforms in terms of opening the links.

However, there's a behavioral difference between iOS and Android when handling the app's state:

  • On iOS: When a link is opened in the external browser and the user minimizes the browser to return to the app, the app resumes as expected on the same screen without reloading. This is the desired behavior.

  • On Android: When a link is opened using the OpenInExternalBrowser function and the user returns to the app (after minimizing the browser), the app fully reloads. This only happens in this specific scenario. If I manually minimize the app and open the browser separately, the app resumes correctly when reopened — no reload occurs.

It seems that invoking the external browser via OpenInExternalBrowser on Android causes the app to be destroyed or backgrounded in a way that triggers a full reload when resumed.

Has anyone experienced this? Any ideas or workarounds to prevent the app from reloading on Android after returning from the external browser?

2025-04-10 12-15-03
Ankit Sheshkumar Shukla

Hi @Danny Prager


Can you please check this link click here.  Some JS for it.

cordova.plugins.backgroundMode.enable();

window.open(url, '_system');

Thanks

2023-10-16 05-50-48
Shingo Lam

Hi

Idk if the JavaScript workaround will work or not. What I have in mind is that the ios auto suspends background apps to save battery and memory (its default behavior), resuming them upon reopening. I think you can try the Settings > General > Background App Refresh to modify it 

2025-07-22 10-30-27
Mandar Deshpande

Hi @Danny Prager 

This behavior could be because of how Android handles activity backgrounding when an app launches, like opening a browser.

When opening external browser using InAppBrowser → OpenInExternalBrowser (Android), it launches a new activity, OS kills your app’s activity to free memory, this destroys the WebView resulting in full restart on resume. 

So, instead of opening in Chrome (external browser), use OpenInAppBrowser. InAppBrowser keeps everything in one activity, so Android does not background/kill the app.

But this is ideal if you don’t require the system Chrome UI. 

Hope this helps.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.