My simulator now opens up the web page in a different tab (as in the screenshot). I haven't tested it on real device yet. I want it be launched automatically when the user opens the app. My js file looks like this:
document.addEventListener("deviceready", onDeviceReady, false);
//Activate :active state
document.addEventListener("touchstart", function() {
}, false);
function onDeviceReady() {
var app;
navigator.splashscreen.hide();
app = new Application();
app.run();
}
function Application() {
}
Application.prototype = {
run: function() {
var that = this,
openExternalInAppBrowser = document.getElementById("openExternalInAppBrowser");
openExternalInAppBrowser.addEventListener("click", that.openExternalInAppBrowser);
},
openExternalInAppBrowser: function () {
window.open("https://www.khanacademy.org", "_blank");
},
}
KhanAcademy is just an example. Now I want to remove that "Click me" button and open automatically. I couldn't find any suitable event from the events list. So, can you explain to me how auto-launch that page as a welcome page in the app and not in different tab but in the app?