I want to make sure to launch inappbrowser only if I am on devices (iOs, Android...), but if I am in browser (local development mode or just a Web App with gulp build), I wa
I have faced the same problem in an Ionic 3 application and found here a nice method of checking if the application runs in a browser vs. real device/emulator:
isApp = !document.URL.startsWith('http');
Basically it relies on the fact that real devices or emulators serve resources using file
protocol rather than http
, as used by the browsers.