Skip to content

Commit

Permalink
#11 Background issues. bump!
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Sep 14, 2015
1 parent 9da5dbe commit 519c303
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
52 changes: 52 additions & 0 deletions demo/simplified.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<link rel="stylesheet" type="text/css" href="css/index.css">
<title>Hello World</title>
</head>
<body>
<div class="app">
<h1>Apache Cordova</h1>

<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>

<p class="event received">Device is Ready</p>
</div>
</div>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script>
function onGlanceRequestsUpdate() {
applewatch.loadGlance({
'label2': {'value': 'Rendered at ' + new Date(), 'color': '#FFFFFF'}
})
}

function onAppRequestsUpdate() {
var payload = {
'label2': { // optional, max 2 lines
'value': 'UI built @ ' + new Date(),
'color': '#FFFFFF',
'font': {
'size': 8 // default 12
}
}
};
applewatch.loadAppMain(payload);
}

function initAppleWatch() {
applewatch.init(function () {
});
applewatch.callback.onLoadAppMainRequest = onAppRequestsUpdate;
applewatch.callback.onLoadGlanceRequest = onGlanceRequestsUpdate;
}

document.addEventListener('deviceready', initAppleWatch, false);
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<plugin
id="cordova-plugin-applewatch"
version="0.6.0-dev"
version="0.6.0"
xmlns="http://apache.org/cordova/ns/plugins/1.0">

<name>Apple Watch</name>
Expand Down

0 comments on commit 519c303

Please sign in to comment.