First of all, this is behaviour that is started partly in the browser on your device. Cordova (where ionic is built upon) is in it’s most simple description “a native wrapper about the default webbrowser”. Modern devices on android usually have some version of chromium installed.
If you check how desktop-chrome behaves when you call window.open (which is really similair to opening the inappbrowser), you will see that popups will only open when they are fired from a “trusted context”, usually meaning “user-performed click event”. When you open a popup at random for example after a timeout for 2 seconds, the context is no longer trusted (since it’s not responding directly to user interaction) and the browser will block the popup and show the user a question if they will allow popups from this site (if it is in a trusted context, it will open immediately).
Similair behaviour could be expected from an inappbrowser. We would only give a “popup” => inappbrowser <= if the user performs some action. Therefore, this is somewhat expected behaviour. Cordova itself is already an “inappbrowser”, so if you only want to display some website (assuming you don’t actually want to create a “google app”), you would be better of telling just cordova to load the external website as an index file. Then it won’t load a page in your app, and it will directly open the website you wanted to display.
But, I’ve got some background information from you story on the ionic-worldwide slack. So let’s dive a bit deeper. Since your goal is to create an app in the future, and for now, since you lack an app, just want to display your website. Why not just be transparent to the user? Create 1 simple ionic page, make it look good, and make it say:
“Thanks for downloading! We will be updating the app in the future to support all the features we are currently offering on our website. For now, nothing has been implemented yet, this is a work in progress! Having this application will make sure you will the updates directly when they are published. For now, we provide you with our website that you can open by clicking on the button below.”
The simply create a button that says “Open the website”, and handle your InAppBrowser logic in the click handler. The click handler has the “trusted context” I spoke about earlier, so it will work fine. You will also have your ionic based app to start off with, completing your goal. Also, you are being honest to your users, that will probably not receive a native or near-native experience on your website, which probably is your goal with the eventual app. Telling them that you are actually showing the website is probably going to make them more understanding about the not-so-native look and feel. If you are actually working on the project, they will enjoy the updates to come
Then there is one more thing I want to say, I don’t think it’s really related for this particulair case, but it can’t hurt to mention. You could read up on the Content Security Policy (CSP) that is being handled by browser. It basically means that if you are trying to reach anything outside of your domain (on cordova that will be your app files) it will either block the content (usually in desktop browsers, with nice console errors about CSP violations, and also for included files like css and js) or open it outside of your app (so it’s clear for the user that it’s not trusted content, that’s why it’s not opened in your app). If this is the problem you are having now (I don’t think it is, but can’t hurt to try) or if you are encountering this in the future, think about looking into the CSP definition.