cordova create C:\Kapsel_Projects\WebViewDemo com.mycompany.webview WebViewDemo
cd C:\Kapsel_Projects\WebViewDemo
or
cordova create ~/Documents/Kapsel_Projects/WebViewDemo com.mycompany.webview WebViewDemo
cd ~/Documents/Kapsel_Projects/WebViewDemo
cordova platform add android
cordova plugin add cordova-plugin-device
<html>
<head>
<title>WebView Demo</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script>
document.addEventListener("deviceready", init, false);
var calendar = null;
function init() {
log("Cordova version: " + device.cordova);
log("Device version: " + device.version);
log("User agent: " + navigator.userAgent);
}
function log(line) {
var results = document.getElementById("log_lines");
results.innerHTML+= "<br>" + line;
}
</script>
</head>
<body>
<h1>WebView Demo</h1>
<button onclick="window.open('http://html5test.com/', '_self')">HTML5 Test</button>
<button onclick="window.open('http://css3test.com/', '_self')">CSS3 Test</button>
<div id="log_lines"></div>
</body>
</html>
<allow-navigation href="http://html5test.com/*" />
<allow-navigation href="http://css3test.com/*" />
cordova run android
cordova create C:\Kapsel_Projects\CrosswalkDemo com.mycompany.crosswalk CrosswalkDemo
cd C:\Kapsel_Projects\CrosswalkDemo
or
cordova create ~/Documents/Kapsel_Projects/CrosswalkDemo com.mycompany.crosswalk CrosswalkDemo
cd ~/Documents/Kapsel_Projects/CrosswalkDemo
cordova platform add android
cordova plugin add cordova-plugin-device
cordova plugin add cordova-plugin-crosswalk-webview
<allow-navigation href="http://html5test.com/*" />
<allow-navigation href="http://css3test.com/*" />
cordova run android
Use Host GPU
[FATAL:gl_surface_android.cc(58)] Check failed: kGLImplementationNone != GetGLImplementation() (0 vs. 0)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
22 | |
11 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 |