0
如何將網站加載到Phonegap應用程序中?我創建了一個index.html文件是這樣的:使用PhoneGap將網站加載到應用程序
<html>
<head>
</head>
<body onload="myFunction()">
</body>
<script src="phonegap.js"></script>
<script type="text/javascript">
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
window.open = cordova.InAppBrowser.open('https://secured.knowsley.gov.uk', '_blank', 'location=yes');
}
</script>
和config.xml文件是這樣的:
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.phonegap.example"
versionCode = "10"
version = "1.0.0" >
<!-- versionCode is optional and Android only -->
<name>PhoneGap Example</name>
<description>
An example for phonegap build docs.
</description>
<author href="https://build.phonegap.com" email="[email protected]">
Hardeep Shoker
</author>
<allow-navigation href="https://secured.knowsley.gov.uk/*" />
但是當我部署.apk文件到Android設備並打開應用程序什麼都沒有發生 - 空白頁。我究竟做錯了什麼?
是否安裝inAppBrowser插件的工作? – jcesarmobile
怎麼樣?請發佈代碼示例。 – markp3rry
所以答案是否定的,對吧?去inAppBrowser文檔,並閱讀如何安裝它 – jcesarmobile