Commit ccc2ad34 by Sebastián Katzer

Update index.html

parent 112c3d93
......@@ -42,86 +42,86 @@
<!-- permission -->
<h2 class="section" style="padding-top:180px;">Permission (iOS8)</h2>
<div class="container">
<div onclick="hasPermission()">Granted?<br/><span>hasPermission()</span></div>
<div onclick="registerPermission()">Register<br/><span>registerPermission()</span></div>
<div onclick="hasPermission()">Granted?<br /><span>hasPermission()</span></div>
<div onclick="registerPermission()">Register<br /><span>registerPermission()</span></div>
</div>
<!-- schedule -->
<h2 class="section">Schedule</h2>
<div class="container">
<div onclick="schedule()">Single<br/><span>schedule(1)</span></div>
<div onclick="scheduleMultiple()">Multiple<br/><span>schedule(1, 2, 3)</span></div>
<div onclick="schedule()">Single<br /><span>schedule(1)</span></div>
<div onclick="scheduleMultiple()">Multiple<br /><span>schedule(1, 2, 3)</span></div>
</div>
<div class="container">
<div onclick="scheduleDelayed()">In 5 sec<br/><span>schedule(1, firstAt:later)</span></div>
<div onclick="scheduleMinutely()">Every min<br/><span>schedule(1, every:minute)</span></div>
<div onclick="scheduleDelayed()">In 5 sec<br /><span>schedule(1, firstAt:later)</span></div>
<div onclick="scheduleMinutely()">Every min<br /><span>schedule(1, every:minute)</span></div>
</div>
<!-- update -->
<h2 class="section">Update</h2>
<div class="container">
<div onclick="update()">Title<br/><span>update(1)</span></div>
<div onclick="updateInterval()">Interval<br/><span>update(1, every:minute)</span></div>
<div onclick="update()">Title<br /><span>update(1)</span></div>
<div onclick="updateInterval()">Interval<br /><span>update(1, every:minute)</span></div>
</div>
<!-- clear -->
<h2 class="section">Clear</h2>
<div class="container">
<div onclick="clearSingle()">Single<br/><span>clear(1)</span></div>
<div onclick="clearMultiple()">Multiple<br/><span>clear(2, 3)</span></div>
<div onclick="clearSingle()">Single<br /><span>clear(1)</span></div>
<div onclick="clearMultiple()">Multiple<br /><span>clear(2, 3)</span></div>
</div>
<div class="container">
<div onclick="clearAll()">All<br/><span>clearAll()</span></div>
<div onclick="clearAll()">All<br /><span>clearAll()</span></div>
</div>
<!-- cancel -->
<h2 class="section">Cancel</h2>
<div class="container">
<div onclick="cancel()">Single<br/><span>cancel(1)</span></div>
<div onclick="cancelMultiple()">Multiple<br/><span>cancel(2, 3)</span></div>
<div onclick="cancel()">Single<br /><span>cancel(1)</span></div>
<div onclick="cancelMultiple()">Multiple<br /><span>cancel(2, 3)</span></div>
</div>
<div class="container">
<div onclick="cancelAll()">All<br/><span>cancelAll()</span></div>
<div onclick="cancelAll()">All<br /><span>cancelAll()</span></div>
</div>
<!-- presence -->
<h2 class="section">Presence</h2>
<div class="container">
<div onclick="isScheduled()">Scheduled?<br/><span>isScheduled(1)</span></div>
<div onclick="isTriggered()">Triggered?<br/><span>isTrigered(1)</span></div>
<div onclick="isScheduled()">Scheduled?<br /><span>isScheduled(1)</span></div>
<div onclick="isTriggered()">Triggered?<br /><span>isTrigered(1)</span></div>
</div>
<div class="container">
<div onclick="isPresent()">Present?<br/><span>present(1)</span></div>
<div onclick="isPresent()">Present?<br /><span>present(1)</span></div>
</div>
<!-- id's -->
<h2 class="section">ID's</h2>
<div class="container">
<div onclick="getScheduledIds()">Scheduled<br/><span>getScheduledIds()</span></div>
<div onclick="getTriggeredIds()">Triggered<br/><span>getTriggeredIds()</span></div>
<div onclick="getScheduledIds()">Scheduled<br /><span>getScheduledIds()</span></div>
<div onclick="getTriggeredIds()">Triggered<br /><span>getTriggeredIds()</span></div>
</div>
<div class="container">
<div onclick="getIds()">All<br/><span>getIds()</span></div>
<div onclick="getIds()">All<br /><span>getIds()</span></div>
</div>
<!-- notifications -->
<h2 class="section">Notifications</h2>
<div class="container">
<div onclick="getScheduled()">Scheduled<br/><span>getScheduled()</span></div>
<div onclick="getTriggered()">Triggered<br/><span>getTrigered()</span></div>
<div onclick="getScheduled()">Scheduled<br /><span>getScheduled()</span></div>
<div onclick="getTriggered()">Triggered<br /><span>getTrigered()</span></div>
</div>
<div class="container">
<div onclick="get()">Single<br/><span>get(1)</span></div>
<div onclick="getMultiple()">Multiple<br/><span>get(1, 2)</span></div>
<div onclick="get()">Single<br /><span>get(1)</span></div>
<div onclick="getMultiple()">Multiple<br /><span>get(1, 2)</span></div>
</div>
<div class="container">
<div onclick="getAll()">All<br/><span>getAll()</span></div>
<div onclick="getAll()">All<br /><span>getAll()</span></div>
</div>
<!-- defaults -->
<h2 class="section">Defaults</h2>
<div class="container">
<div onclick="setDefaultTitle()">Change title<br/><span>setDefaults(title:"...")</span></div>
<div onclick="setDefaultTitle()">Change title<br /><span>setDefaults(title:"...")</span></div>
</div>
<!-- copyright -->
......@@ -134,7 +134,7 @@
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
var id = 1;
var id = 1, dialog;
callback = function () {
cordova.plugins.notification.local.getIds(function (ids) {
......@@ -144,23 +144,40 @@
showToast = function (text) {
setTimeout(function () {
window.plugins.toast.showShortBottom(text);
if (device.platform != 'windows') {
window.plugins.toast.showShortBottom(text);
} else {
showDialog(text);
}
}, 100);
};
</script>
showDialog = function (text) {
if (dialog) {
dialog.content = text;
return;
}
dialog = new Windows.UI.Popups.MessageDialog(text);
dialog.showAsync().done(function () {
dialog = null;
});
};
</script>
<!-- permission -->
<script type="text/javascript">
hasPermission = function () {
cordova.plugins.notification.local.hasPermission(function (granted) {
alert(granted);
showToast(granted ? 'Yes' : 'No');
});
};
registerPermission = function () {
cordova.plugins.notification.local.registerPermission(function (granted) {
alert(granted);
showToast(granted ? 'Yes' : 'No');
});
};
</script>
......@@ -169,38 +186,38 @@
<script type="text/javascript">
schedule = function () {
cordova.plugins.notification.local.schedule({
id: 1,
id: 1,
text: 'Test Message 1',
icon: 'http://www.optimizeordie.de/wp-content/plugins/social-media-widget/images/default/64/googleplus.png',
sound: null,
data: { test:id }
data: { test: id }
});
};
scheduleMultiple = function () {
cordova.plugins.notification.local.schedule([{
id: 1,
id: 1,
text: 'Multi Message 1'
},{
id: 2,
}, {
id: 2,
text: 'Multi Message 2'
},{
id: 3,
}, {
id: 3,
text: 'Multi Message 3'
}]);
};
scheduleDelayed = function () {
var now = new Date().getTime(),
_5_sec_from_now = new Date(now + 5*1000);
var now = new Date().getTime(),
_5_sec_from_now = new Date(now + 5 * 1000);
var sound = device.platform == 'Android' ? 'file://sound.mp3' : 'file://beep.caf';
cordova.plugins.notification.local.schedule({
id: 1,
id: 1,
title: 'Scheduled with delay',
text: 'Test Message 1',
at: _5_sec_from_now,
text: 'Test Message 1',
at: _5_sec_from_now,
sound: sound
});
};
......@@ -209,8 +226,8 @@
var sound = device.platform == 'Android' ? 'file://sound.mp3' : 'file://beep.caf';
cordova.plugins.notification.local.schedule({
id: 1,
text: 'Scheduled every minute',
id: 1,
text: 'Scheduled every minute',
every: 'minute',
sound: sound
});
......@@ -221,16 +238,16 @@
<script type="text/javascript">
update = function () {
cordova.plugins.notification.local.update({
id: 1,
text: 'Updated Message 1',
json: { updated:true }
id: 1,
text: 'Updated Message 1',
json: { updated: true }
});
};
updateInterval = function () {
cordova.plugins.notification.local.update({
id: 1,
text: 'Updated Message 1',
id: 1,
text: 'Updated Message 1',
every: 'minute'
});
};
......@@ -239,11 +256,11 @@
<!-- clear -->
<script type="text/javascript">
clearSingle = function () {
cordova.plugins.notification.local.clear(1,callback);
cordova.plugins.notification.local.clear(1, callback);
};
clearMultiple = function () {
cordova.plugins.notification.local.clear([2, 3],callback);
cordova.plugins.notification.local.clear([2, 3], callback);
};
clearAll = function () {
......@@ -254,11 +271,11 @@
<!-- cancel -->
<script type="text/javascript">
cancel = function () {
cordova.plugins.notification.local.cancel(1,callback);
cordova.plugins.notification.local.cancel(1, callback);
};
cancelMultiple = function () {
cordova.plugins.notification.local.cancel([2, 3],callback);
cordova.plugins.notification.local.cancel([2, 3], callback);
};
cancelAll = function () {
......@@ -290,8 +307,8 @@
<!-- IDs -->
<script type="text/javascript">
var callbackIds = function (ids) {
showToast(ids.length === 0 ? '- none -' : ids.join(' ,'));
};
showToast(ids.length === 0 ? '- none -' : ids.join(' ,'));
};
getIds = function () {
cordova.plugins.notification.local.getIds(callbackIds);
......@@ -309,9 +326,9 @@
<!-- notifications -->
<script type="text/javascript">
var callbackOpts = function (notifications) {
console.log(notifications);
showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,'));
};
console.log(notifications);
showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,'));
};
get = function () {
cordova.plugins.notification.local.get(1, callbackOpts);
......
......@@ -42,86 +42,86 @@
<!-- permission -->
<h2 class="section" style="padding-top:180px;">Permission (iOS8)</h2>
<div class="container">
<div onclick="hasPermission()">Granted?<br/><span>hasPermission()</span></div>
<div onclick="registerPermission()">Register<br/><span>registerPermission()</span></div>
<div onclick="hasPermission()">Granted?<br /><span>hasPermission()</span></div>
<div onclick="registerPermission()">Register<br /><span>registerPermission()</span></div>
</div>
<!-- schedule -->
<h2 class="section">Schedule</h2>
<div class="container">
<div onclick="schedule()">Single<br/><span>schedule(1)</span></div>
<div onclick="scheduleMultiple()">Multiple<br/><span>schedule(1, 2, 3)</span></div>
<div onclick="schedule()">Single<br /><span>schedule(1)</span></div>
<div onclick="scheduleMultiple()">Multiple<br /><span>schedule(1, 2, 3)</span></div>
</div>
<div class="container">
<div onclick="scheduleDelayed()">In 5 sec<br/><span>schedule(1, firstAt:later)</span></div>
<div onclick="scheduleMinutely()">Every min<br/><span>schedule(1, every:minute)</span></div>
<div onclick="scheduleDelayed()">In 5 sec<br /><span>schedule(1, firstAt:later)</span></div>
<div onclick="scheduleMinutely()">Every min<br /><span>schedule(1, every:minute)</span></div>
</div>
<!-- update -->
<h2 class="section">Update</h2>
<div class="container">
<div onclick="update()">Title<br/><span>update(1)</span></div>
<div onclick="updateInterval()">Interval<br/><span>update(1, every:minute)</span></div>
<div onclick="update()">Title<br /><span>update(1)</span></div>
<div onclick="updateInterval()">Interval<br /><span>update(1, every:minute)</span></div>
</div>
<!-- clear -->
<h2 class="section">Clear</h2>
<div class="container">
<div onclick="clearSingle()">Single<br/><span>clear(1)</span></div>
<div onclick="clearMultiple()">Multiple<br/><span>clear(2, 3)</span></div>
<div onclick="clearSingle()">Single<br /><span>clear(1)</span></div>
<div onclick="clearMultiple()">Multiple<br /><span>clear(2, 3)</span></div>
</div>
<div class="container">
<div onclick="clearAll()">All<br/><span>clearAll()</span></div>
<div onclick="clearAll()">All<br /><span>clearAll()</span></div>
</div>
<!-- cancel -->
<h2 class="section">Cancel</h2>
<div class="container">
<div onclick="cancel()">Single<br/><span>cancel(1)</span></div>
<div onclick="cancelMultiple()">Multiple<br/><span>cancel(2, 3)</span></div>
<div onclick="cancel()">Single<br /><span>cancel(1)</span></div>
<div onclick="cancelMultiple()">Multiple<br /><span>cancel(2, 3)</span></div>
</div>
<div class="container">
<div onclick="cancelAll()">All<br/><span>cancelAll()</span></div>
<div onclick="cancelAll()">All<br /><span>cancelAll()</span></div>
</div>
<!-- presence -->
<h2 class="section">Presence</h2>
<div class="container">
<div onclick="isScheduled()">Scheduled?<br/><span>isScheduled(1)</span></div>
<div onclick="isTriggered()">Triggered?<br/><span>isTrigered(1)</span></div>
<div onclick="isScheduled()">Scheduled?<br /><span>isScheduled(1)</span></div>
<div onclick="isTriggered()">Triggered?<br /><span>isTrigered(1)</span></div>
</div>
<div class="container">
<div onclick="isPresent()">Present?<br/><span>present(1)</span></div>
<div onclick="isPresent()">Present?<br /><span>present(1)</span></div>
</div>
<!-- id's -->
<h2 class="section">ID's</h2>
<div class="container">
<div onclick="getScheduledIds()">Scheduled<br/><span>getScheduledIds()</span></div>
<div onclick="getTriggeredIds()">Triggered<br/><span>getTriggeredIds()</span></div>
<div onclick="getScheduledIds()">Scheduled<br /><span>getScheduledIds()</span></div>
<div onclick="getTriggeredIds()">Triggered<br /><span>getTriggeredIds()</span></div>
</div>
<div class="container">
<div onclick="getIds()">All<br/><span>getIds()</span></div>
<div onclick="getIds()">All<br /><span>getIds()</span></div>
</div>
<!-- notifications -->
<h2 class="section">Notifications</h2>
<div class="container">
<div onclick="getScheduled()">Scheduled<br/><span>getScheduled()</span></div>
<div onclick="getTriggered()">Triggered<br/><span>getTrigered()</span></div>
<div onclick="getScheduled()">Scheduled<br /><span>getScheduled()</span></div>
<div onclick="getTriggered()">Triggered<br /><span>getTrigered()</span></div>
</div>
<div class="container">
<div onclick="get()">Single<br/><span>get(1)</span></div>
<div onclick="getMultiple()">Multiple<br/><span>get(1, 2)</span></div>
<div onclick="get()">Single<br /><span>get(1)</span></div>
<div onclick="getMultiple()">Multiple<br /><span>get(1, 2)</span></div>
</div>
<div class="container">
<div onclick="getAll()">All<br/><span>getAll()</span></div>
<div onclick="getAll()">All<br /><span>getAll()</span></div>
</div>
<!-- defaults -->
<h2 class="section">Defaults</h2>
<div class="container">
<div onclick="setDefaultTitle()">Change title<br/><span>setDefaults(title:"...")</span></div>
<div onclick="setDefaultTitle()">Change title<br /><span>setDefaults(title:"...")</span></div>
</div>
<!-- copyright -->
......@@ -134,7 +134,7 @@
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
var id = 1;
var id = 1, dialog;
callback = function () {
cordova.plugins.notification.local.getIds(function (ids) {
......@@ -144,23 +144,40 @@
showToast = function (text) {
setTimeout(function () {
window.plugins.toast.showShortBottom(text);
if (device.platform != 'windows') {
window.plugins.toast.showShortBottom(text);
} else {
showDialog(text);
}
}, 100);
};
</script>
showDialog = function (text) {
if (dialog) {
dialog.content = text;
return;
}
dialog = new Windows.UI.Popups.MessageDialog(text);
dialog.showAsync().done(function () {
dialog = null;
});
};
</script>
<!-- permission -->
<script type="text/javascript">
hasPermission = function () {
cordova.plugins.notification.local.hasPermission(function (granted) {
alert(granted);
showToast(granted ? 'Yes' : 'No');
});
};
registerPermission = function () {
cordova.plugins.notification.local.registerPermission(function (granted) {
alert(granted);
showToast(granted ? 'Yes' : 'No');
});
};
</script>
......@@ -169,38 +186,38 @@
<script type="text/javascript">
schedule = function () {
cordova.plugins.notification.local.schedule({
id: 1,
id: 1,
text: 'Test Message 1',
icon: 'http://www.optimizeordie.de/wp-content/plugins/social-media-widget/images/default/64/googleplus.png',
sound: null,
data: { test:id }
data: { test: id }
});
};
scheduleMultiple = function () {
cordova.plugins.notification.local.schedule([{
id: 1,
id: 1,
text: 'Multi Message 1'
},{
id: 2,
}, {
id: 2,
text: 'Multi Message 2'
},{
id: 3,
}, {
id: 3,
text: 'Multi Message 3'
}]);
};
scheduleDelayed = function () {
var now = new Date().getTime(),
_5_sec_from_now = new Date(now + 5*1000);
var now = new Date().getTime(),
_5_sec_from_now = new Date(now + 5 * 1000);
var sound = device.platform == 'Android' ? 'file://sound.mp3' : 'file://beep.caf';
cordova.plugins.notification.local.schedule({
id: 1,
id: 1,
title: 'Scheduled with delay',
text: 'Test Message 1',
at: _5_sec_from_now,
text: 'Test Message 1',
at: _5_sec_from_now,
sound: sound
});
};
......@@ -209,8 +226,8 @@
var sound = device.platform == 'Android' ? 'file://sound.mp3' : 'file://beep.caf';
cordova.plugins.notification.local.schedule({
id: 1,
text: 'Scheduled every minute',
id: 1,
text: 'Scheduled every minute',
every: 'minute',
sound: sound
});
......@@ -221,16 +238,16 @@
<script type="text/javascript">
update = function () {
cordova.plugins.notification.local.update({
id: 1,
text: 'Updated Message 1',
json: { updated:true }
id: 1,
text: 'Updated Message 1',
json: { updated: true }
});
};
updateInterval = function () {
cordova.plugins.notification.local.update({
id: 1,
text: 'Updated Message 1',
id: 1,
text: 'Updated Message 1',
every: 'minute'
});
};
......@@ -239,11 +256,11 @@
<!-- clear -->
<script type="text/javascript">
clearSingle = function () {
cordova.plugins.notification.local.clear(1,callback);
cordova.plugins.notification.local.clear(1, callback);
};
clearMultiple = function () {
cordova.plugins.notification.local.clear([2, 3],callback);
cordova.plugins.notification.local.clear([2, 3], callback);
};
clearAll = function () {
......@@ -254,11 +271,11 @@
<!-- cancel -->
<script type="text/javascript">
cancel = function () {
cordova.plugins.notification.local.cancel(1,callback);
cordova.plugins.notification.local.cancel(1, callback);
};
cancelMultiple = function () {
cordova.plugins.notification.local.cancel([2, 3],callback);
cordova.plugins.notification.local.cancel([2, 3], callback);
};
cancelAll = function () {
......@@ -290,8 +307,8 @@
<!-- IDs -->
<script type="text/javascript">
var callbackIds = function (ids) {
showToast(ids.length === 0 ? '- none -' : ids.join(' ,'));
};
showToast(ids.length === 0 ? '- none -' : ids.join(' ,'));
};
getIds = function () {
cordova.plugins.notification.local.getIds(callbackIds);
......@@ -309,9 +326,9 @@
<!-- notifications -->
<script type="text/javascript">
var callbackOpts = function (notifications) {
console.log(notifications);
showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,'));
};
console.log(notifications);
showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,'));
};
get = function () {
cordova.plugins.notification.local.get(1, callbackOpts);
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<PropertyGroup>
<ReferenceCachePath>C:\Users\sebastian\AppData\Local\Temp\yxmokjnx_CordovaApp.Phone_refcache</ReferenceCachePath>
</PropertyGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<PropertyGroup>
<ReferenceCachePath>C:\Users\sebastian\AppData\Local\Temp\anloqo42_CordovaApp.Windows_refcache</ReferenceCachePath>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -20,395 +20,395 @@
under the License.
-->
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<title>Notification Example</title>
</head>
<body>
<div>
<div class="app">
<h1>Local-Notification Example</h1>
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<title>Notification Example</title>
</head>
<body>
<div>
<div class="app">
<h1>Local-Notification Example</h1>
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
</div>
</div>
<!-- permission -->
<h2 class="section" style="padding-top:180px;">Permission (iOS8)</h2>
<div class="container">
<div onclick="hasPermission()">Granted?<br /><span>hasPermission()</span></div>
<div onclick="registerPermission()">Register<br /><span>registerPermission()</span></div>
</div>
<!-- schedule -->
<h2 class="section">Schedule</h2>
<div class="container">
<div onclick="schedule()">Single<br /><span>schedule(1)</span></div>
<div onclick="scheduleMultiple()">Multiple<br /><span>schedule(1, 2, 3)</span></div>
</div>
<div class="container">
<div onclick="scheduleDelayed()">In 5 sec<br /><span>schedule(1, firstAt:later)</span></div>
<div onclick="scheduleMinutely()">Every min<br /><span>schedule(1, every:minute)</span></div>
</div>
<!-- update -->
<h2 class="section">Update</h2>
<div class="container">
<div onclick="update()">Title<br /><span>update(1)</span></div>
<div onclick="updateInterval()">Interval<br /><span>update(1, every:minute)</span></div>
</div>
<!-- clear -->
<h2 class="section">Clear</h2>
<div class="container">
<div onclick="clearSingle()">Single<br /><span>clear(1)</span></div>
<div onclick="clearMultiple()">Multiple<br /><span>clear(2, 3)</span></div>
</div>
<div class="container">
<div onclick="clearAll()">All<br /><span>clearAll()</span></div>
</div>
<!-- cancel -->
<h2 class="section">Cancel</h2>
<div class="container">
<div onclick="cancel()">Single<br /><span>cancel(1)</span></div>
<div onclick="cancelMultiple()">Multiple<br /><span>cancel(2, 3)</span></div>
</div>
<div class="container">
<div onclick="cancelAll()">All<br /><span>cancelAll()</span></div>
</div>
<!-- presence -->
<h2 class="section">Presence</h2>
<div class="container">
<div onclick="isScheduled()">Scheduled?<br /><span>isScheduled(1)</span></div>
<div onclick="isTriggered()">Triggered?<br /><span>isTrigered(1)</span></div>
</div>
<div class="container">
<div onclick="isPresent()">Present?<br /><span>present(1)</span></div>
</div>
<!-- id's -->
<h2 class="section">ID's</h2>
<div class="container">
<div onclick="getScheduledIds()">Scheduled<br /><span>getScheduledIds()</span></div>
<div onclick="getTriggeredIds()">Triggered<br /><span>getTriggeredIds()</span></div>
</div>
<div class="container">
<div onclick="getIds()">All<br /><span>getIds()</span></div>
</div>
<!-- notifications -->
<h2 class="section">Notifications</h2>
<div class="container">
<div onclick="getScheduled()">Scheduled<br /><span>getScheduled()</span></div>
<div onclick="getTriggered()">Triggered<br /><span>getTrigered()</span></div>
</div>
<div class="container">
<div onclick="get()">Single<br /><span>get(1)</span></div>
<div onclick="getMultiple()">Multiple<br /><span>get(1, 2)</span></div>
</div>
<div class="container">
<div onclick="getAll()">All<br /><span>getAll()</span></div>
</div>
<!-- defaults -->
<h2 class="section">Defaults</h2>
<div class="container">
<div onclick="setDefaultTitle()">Change title<br /><span>setDefaults(title:"...")</span></div>
</div>
<!-- copyright -->
<div class="copyright">
© 2013-2015 appPlant
</div>
</div>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
var id = 1, dialog;
callback = function () {
cordova.plugins.notification.local.getIds(function (ids) {
showToast('IDs: ' + ids.join(' ,'));
});
};
showToast = function (text) {
setTimeout(function () {
if (device.platform != 'windows') {
window.plugins.toast.showShortBottom(text);
} else {
showDialog(text);
}
}, 100);
};
showDialog = function (text) {
if (dialog) {
dialog.content = text;
return;
}
dialog = new Windows.UI.Popups.MessageDialog(text);
dialog.showAsync().done(function () {
dialog = null;
});
};
</script>
<!-- permission -->
<h2 class="section" style="padding-top:180px;">Permission (iOS8)</h2>
<div class="container">
<div onclick="hasPermission()">Granted?<br /><span>hasPermission()</span></div>
<div onclick="registerPermission()">Register<br /><span>registerPermission()</span></div>
</div>
<script type="text/javascript">
hasPermission = function () {
cordova.plugins.notification.local.hasPermission(function (granted) {
showToast(granted ? 'Yes' : 'No');
});
};
registerPermission = function () {
cordova.plugins.notification.local.registerPermission(function (granted) {
showToast(granted ? 'Yes' : 'No');
});
};
</script>
<!-- schedule -->
<h2 class="section">Schedule</h2>
<div class="container">
<div onclick="schedule()">Single<br /><span>schedule(1)</span></div>
<div onclick="scheduleMultiple()">Multiple<br /><span>schedule(1, 2, 3)</span></div>
</div>
<div class="container">
<div onclick="scheduleDelayed()">In 5 sec<br /><span>schedule(1, firstAt:later)</span></div>
<div onclick="scheduleMinutely()">Every min<br /><span>schedule(1, every:minute)</span></div>
</div>
<script type="text/javascript">
schedule = function () {
cordova.plugins.notification.local.schedule({
id: 1,
text: 'Test Message 1',
icon: 'http://www.optimizeordie.de/wp-content/plugins/social-media-widget/images/default/64/googleplus.png',
sound: null,
data: { test: id }
});
};
scheduleMultiple = function () {
cordova.plugins.notification.local.schedule([{
id: 1,
text: 'Multi Message 1'
}, {
id: 2,
text: 'Multi Message 2'
}, {
id: 3,
text: 'Multi Message 3'
}]);
};
scheduleDelayed = function () {
var now = new Date().getTime(),
_5_sec_from_now = new Date(now + 5 * 1000);
var sound = device.platform == 'Android' ? 'file://sound.mp3' : 'file://beep.caf';
cordova.plugins.notification.local.schedule({
id: 1,
title: 'Scheduled with delay',
text: 'Test Message 1',
at: _5_sec_from_now,
sound: sound
});
};
scheduleMinutely = function () {
var sound = device.platform == 'Android' ? 'file://sound.mp3' : 'file://beep.caf';
cordova.plugins.notification.local.schedule({
id: 1,
text: 'Scheduled every minute',
every: 'minute',
sound: sound
});
};
</script>
<!-- update -->
<h2 class="section">Update</h2>
<div class="container">
<div onclick="update()">Title<br /><span>update(1)</span></div>
<div onclick="updateInterval()">Interval<br /><span>update(1, every:minute)</span></div>
</div>
<script type="text/javascript">
update = function () {
cordova.plugins.notification.local.update({
id: 1,
text: 'Updated Message 1',
json: { updated: true }
});
};
updateInterval = function () {
cordova.plugins.notification.local.update({
id: 1,
text: 'Updated Message 1',
every: 'minute'
});
};
</script>
<!-- clear -->
<h2 class="section">Clear</h2>
<div class="container">
<div onclick="clearSingle()">Single<br /><span>clear(1)</span></div>
<div onclick="clearMultiple()">Multiple<br /><span>clear(2, 3)</span></div>
</div>
<div class="container">
<div onclick="clearAll()">All<br /><span>clearAll()</span></div>
</div>
<script type="text/javascript">
clearSingle = function () {
cordova.plugins.notification.local.clear(1, callback);
};
clearMultiple = function () {
cordova.plugins.notification.local.clear([2, 3], callback);
};
clearAll = function () {
cordova.plugins.notification.local.clearAll(callback);
};
</script>
<!-- cancel -->
<h2 class="section">Cancel</h2>
<div class="container">
<div onclick="cancel()">Single<br /><span>cancel(1)</span></div>
<div onclick="cancelMultiple()">Multiple<br /><span>cancel(2, 3)</span></div>
</div>
<div class="container">
<div onclick="cancelAll()">All<br /><span>cancelAll()</span></div>
</div>
<script type="text/javascript">
cancel = function () {
cordova.plugins.notification.local.cancel(1, callback);
};
<!-- presence -->
<h2 class="section">Presence</h2>
<div class="container">
<div onclick="isScheduled()">Scheduled?<br /><span>isScheduled(1)</span></div>
<div onclick="isTriggered()">Triggered?<br /><span>isTrigered(1)</span></div>
</div>
<div class="container">
<div onclick="isPresent()">Present?<br /><span>present(1)</span></div>
</div>
cancelMultiple = function () {
cordova.plugins.notification.local.cancel([2, 3], callback);
};
<!-- id's -->
<h2 class="section">ID's</h2>
<div class="container">
<div onclick="getScheduledIds()">Scheduled<br /><span>getScheduledIds()</span></div>
<div onclick="getTriggeredIds()">Triggered<br /><span>getTriggeredIds()</span></div>
</div>
<div class="container">
<div onclick="getIds()">All<br /><span>getIds()</span></div>
</div>
cancelAll = function () {
cordova.plugins.notification.local.cancelAll(callback);
};
</script>
<!-- presence -->
<script type="text/javascript">
isPresent = function () {
cordova.plugins.notification.local.isPresent(id, function (present) {
showToast(present ? 'Yes' : 'No');
});
};
isScheduled = function () {
cordova.plugins.notification.local.isScheduled(id, function (scheduled) {
showToast(scheduled ? 'Yes' : 'No');
});
};
isTriggered = function () {
cordova.plugins.notification.local.isTriggered(id, function (triggered) {
showToast(triggered ? 'Yes' : 'No');
});
};
</script>
<!-- IDs -->
<script type="text/javascript">
var callbackIds = function (ids) {
showToast(ids.length === 0 ? '- none -' : ids.join(' ,'));
};
getIds = function () {
cordova.plugins.notification.local.getIds(callbackIds);
};
getScheduledIds = function () {
cordova.plugins.notification.local.getScheduledIds(callbackIds);
};
getTriggeredIds = function () {
cordova.plugins.notification.local.getTriggeredIds(callbackIds);
};
</script>
<!-- notifications -->
<h2 class="section">Notifications</h2>
<div class="container">
<div onclick="getScheduled()">Scheduled<br /><span>getScheduled()</span></div>
<div onclick="getTriggered()">Triggered<br /><span>getTrigered()</span></div>
</div>
<div class="container">
<div onclick="get()">Single<br /><span>get(1)</span></div>
<div onclick="getMultiple()">Multiple<br /><span>get(1, 2)</span></div>
</div>
<div class="container">
<div onclick="getAll()">All<br /><span>getAll()</span></div>
</div>
<script type="text/javascript">
var callbackOpts = function (notifications) {
console.log(notifications);
showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,'));
};
<!-- defaults -->
<h2 class="section">Defaults</h2>
<div class="container">
<div onclick="setDefaultTitle()">Change title<br /><span>setDefaults(title:"...")</span></div>
</div>
get = function () {
cordova.plugins.notification.local.get(1, callbackOpts);
};
<!-- copyright -->
<div class="copyright">
© 2013-2015 appPlant
</div>
</div>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
var id = 1, dialog;
callback = function () {
cordova.plugins.notification.local.getIds(function (ids) {
showToast('IDs: ' + ids.join(' ,'));
});
};
showToast = function (text) {
setTimeout(function () {
if (device.platform != 'windows') {
window.plugins.toast.showShortBottom(text);
} else {
showDialog(text);
}
}, 100);
};
showDialog = function (text) {
if (dialog) {
dialog.content = text;
return;
}
dialog = new Windows.UI.Popups.MessageDialog(text);
dialog.showAsync().done(function () {
dialog = null;
});
};
</script>
<!-- permission -->
<script type="text/javascript">
hasPermission = function () {
cordova.plugins.notification.local.hasPermission(function (granted) {
showToast(granted ? 'Yes' : 'No');
});
};
registerPermission = function () {
cordova.plugins.notification.local.registerPermission(function (granted) {
showToast(granted ? 'Yes' : 'No');
});
};
</script>
<!-- schedule -->
<script type="text/javascript">
schedule = function () {
cordova.plugins.notification.local.schedule({
id: 1,
text: 'Test Message 1',
icon: 'http://www.optimizeordie.de/wp-content/plugins/social-media-widget/images/default/64/googleplus.png',
sound: null,
data: { test: id }
});
};
scheduleMultiple = function () {
cordova.plugins.notification.local.schedule([{
id: 1,
text: 'Multi Message 1'
}, {
id: 2,
text: 'Multi Message 2'
}, {
id: 3,
text: 'Multi Message 3'
}]);
};
scheduleDelayed = function () {
var now = new Date().getTime(),
_5_sec_from_now = new Date(now + 5 * 1000);
var sound = device.platform == 'Android' ? 'file://sound.mp3' : 'file://beep.caf';
cordova.plugins.notification.local.schedule({
id: 1,
title: 'Scheduled with delay',
text: 'Test Message 1',
at: _5_sec_from_now,
sound: sound
});
};
scheduleMinutely = function () {
var sound = device.platform == 'Android' ? 'file://sound.mp3' : 'file://beep.caf';
cordova.plugins.notification.local.schedule({
id: 1,
text: 'Scheduled every minute',
every: 'minute',
sound: sound
});
};
</script>
<!-- update -->
<script type="text/javascript">
update = function () {
cordova.plugins.notification.local.update({
id: 1,
text: 'Updated Message 1',
json: { updated: true }
});
};
updateInterval = function () {
cordova.plugins.notification.local.update({
id: 1,
text: 'Updated Message 1',
every: 'minute'
});
};
</script>
<!-- clear -->
<script type="text/javascript">
clearSingle = function () {
cordova.plugins.notification.local.clear(1, callback);
};
clearMultiple = function () {
cordova.plugins.notification.local.clear([2, 3], callback);
};
clearAll = function () {
cordova.plugins.notification.local.clearAll(callback);
};
</script>
<!-- cancel -->
<script type="text/javascript">
cancel = function () {
cordova.plugins.notification.local.cancel(1, callback);
};
cancelMultiple = function () {
cordova.plugins.notification.local.cancel([2, 3], callback);
};
cancelAll = function () {
cordova.plugins.notification.local.cancelAll(callback);
};
</script>
<!-- presence -->
<script type="text/javascript">
isPresent = function () {
cordova.plugins.notification.local.isPresent(id, function (present) {
showToast(present ? 'Yes' : 'No');
});
};
isScheduled = function () {
cordova.plugins.notification.local.isScheduled(id, function (scheduled) {
showToast(scheduled ? 'Yes' : 'No');
});
};
isTriggered = function () {
cordova.plugins.notification.local.isTriggered(id, function (triggered) {
showToast(triggered ? 'Yes' : 'No');
});
};
</script>
<!-- IDs -->
<script type="text/javascript">
var callbackIds = function (ids) {
showToast(ids.length === 0 ? '- none -' : ids.join(' ,'));
};
getIds = function () {
cordova.plugins.notification.local.getIds(callbackIds);
};
getScheduledIds = function () {
cordova.plugins.notification.local.getScheduledIds(callbackIds);
};
getTriggeredIds = function () {
cordova.plugins.notification.local.getTriggeredIds(callbackIds);
};
</script>
<!-- notifications -->
<script type="text/javascript">
var callbackOpts = function (notifications) {
console.log(notifications);
showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,'));
};
get = function () {
cordova.plugins.notification.local.get(1, callbackOpts);
};
getMultiple = function () {
cordova.plugins.notification.local.get([1, 2], callbackOpts);
};
getAll = function () {
cordova.plugins.notification.local.getAll(callbackOpts);
};
getScheduled = function () {
cordova.plugins.notification.local.getScheduled(callbackOpts);
};
getTriggered = function () {
cordova.plugins.notification.local.getTriggered(callbackOpts);
};
</script>
<!-- defaults -->
<script type="text/javascript">
setDefaultTitle = function () {
cordova.plugins.notification.local.setDefaults({
title: 'New Default Title'
});
};
</script>
<!-- callbacks -->
<script type="text/javascript">
document.addEventListener('deviceready', function () {
cordova.plugins.notification.local.on('schedule', function (notification) {
console.log('onschedule', arguments);
// showToast('scheduled: ' + notification.id);
});
cordova.plugins.notification.local.on('update', function (notification) {
console.log('onupdate', arguments);
// showToast('updated: ' + notification.id);
});
cordova.plugins.notification.local.on('trigger', function (notification) {
console.log('ontrigger', arguments);
showToast('triggered: ' + notification.id);
});
cordova.plugins.notification.local.on('click', function (notification) {
console.log('onclick', arguments);
showToast('clicked: ' + notification.id);
});
cordova.plugins.notification.local.on('cancel', function (notification) {
console.log('oncancel', arguments);
// showToast('canceled: ' + notification.id);
});
cordova.plugins.notification.local.on('clear', function (notification) {
console.log('onclear', arguments);
showToast('cleared: ' + notification.id);
});
cordova.plugins.notification.local.on('cancelall', function () {
console.log('oncancelall', arguments);
// showToast('canceled all');
});
cordova.plugins.notification.local.on('clearall', function () {
console.log('onclearall', arguments);
// showToast('cleared all');
});
}, false);
</script>
<!-- initialize -->
<script type="text/javascript">
app.initialize();
</script>
</body>
getMultiple = function () {
cordova.plugins.notification.local.get([1, 2], callbackOpts);
};
getAll = function () {
cordova.plugins.notification.local.getAll(callbackOpts);
};
getScheduled = function () {
cordova.plugins.notification.local.getScheduled(callbackOpts);
};
getTriggered = function () {
cordova.plugins.notification.local.getTriggered(callbackOpts);
};
</script>
<!-- defaults -->
<script type="text/javascript">
setDefaultTitle = function () {
cordova.plugins.notification.local.setDefaults({
title: 'New Default Title'
});
};
</script>
<!-- callbacks -->
<script type="text/javascript">
document.addEventListener('deviceready', function () {
cordova.plugins.notification.local.on('schedule', function (notification) {
console.log('onschedule', arguments);
// showToast('scheduled: ' + notification.id);
});
cordova.plugins.notification.local.on('update', function (notification) {
console.log('onupdate', arguments);
// showToast('updated: ' + notification.id);
});
cordova.plugins.notification.local.on('trigger', function (notification) {
console.log('ontrigger', arguments);
showToast('triggered: ' + notification.id);
});
cordova.plugins.notification.local.on('click', function (notification) {
console.log('onclick', arguments);
showToast('clicked: ' + notification.id);
});
cordova.plugins.notification.local.on('cancel', function (notification) {
console.log('oncancel', arguments);
// showToast('canceled: ' + notification.id);
});
cordova.plugins.notification.local.on('clear', function (notification) {
console.log('onclear', arguments);
showToast('cleared: ' + notification.id);
});
cordova.plugins.notification.local.on('cancelall', function () {
console.log('oncancelall', arguments);
// showToast('canceled all');
});
cordova.plugins.notification.local.on('clearall', function () {
console.log('onclearall', arguments);
// showToast('cleared all');
});
}, false);
</script>
<!-- initialize -->
<script type="text/javascript">
app.initialize();
</script>
</body>
</html>
......@@ -42,86 +42,86 @@
<!-- permission -->
<h2 class="section" style="padding-top:180px;">Permission (iOS8)</h2>
<div class="container">
<div onclick="hasPermission()">Granted?<br/><span>hasPermission()</span></div>
<div onclick="registerPermission()">Register<br/><span>registerPermission()</span></div>
<div onclick="hasPermission()">Granted?<br /><span>hasPermission()</span></div>
<div onclick="registerPermission()">Register<br /><span>registerPermission()</span></div>
</div>
<!-- schedule -->
<h2 class="section">Schedule</h2>
<div class="container">
<div onclick="schedule()">Single<br/><span>schedule(1)</span></div>
<div onclick="scheduleMultiple()">Multiple<br/><span>schedule(1, 2, 3)</span></div>
<div onclick="schedule()">Single<br /><span>schedule(1)</span></div>
<div onclick="scheduleMultiple()">Multiple<br /><span>schedule(1, 2, 3)</span></div>
</div>
<div class="container">
<div onclick="scheduleDelayed()">In 5 sec<br/><span>schedule(1, firstAt:later)</span></div>
<div onclick="scheduleMinutely()">Every min<br/><span>schedule(1, every:minute)</span></div>
<div onclick="scheduleDelayed()">In 5 sec<br /><span>schedule(1, firstAt:later)</span></div>
<div onclick="scheduleMinutely()">Every min<br /><span>schedule(1, every:minute)</span></div>
</div>
<!-- update -->
<h2 class="section">Update</h2>
<div class="container">
<div onclick="update()">Title<br/><span>update(1)</span></div>
<div onclick="updateInterval()">Interval<br/><span>update(1, every:minute)</span></div>
<div onclick="update()">Title<br /><span>update(1)</span></div>
<div onclick="updateInterval()">Interval<br /><span>update(1, every:minute)</span></div>
</div>
<!-- clear -->
<h2 class="section">Clear</h2>
<div class="container">
<div onclick="clearSingle()">Single<br/><span>clear(1)</span></div>
<div onclick="clearMultiple()">Multiple<br/><span>clear(2, 3)</span></div>
<div onclick="clearSingle()">Single<br /><span>clear(1)</span></div>
<div onclick="clearMultiple()">Multiple<br /><span>clear(2, 3)</span></div>
</div>
<div class="container">
<div onclick="clearAll()">All<br/><span>clearAll()</span></div>
<div onclick="clearAll()">All<br /><span>clearAll()</span></div>
</div>
<!-- cancel -->
<h2 class="section">Cancel</h2>
<div class="container">
<div onclick="cancel()">Single<br/><span>cancel(1)</span></div>
<div onclick="cancelMultiple()">Multiple<br/><span>cancel(2, 3)</span></div>
<div onclick="cancel()">Single<br /><span>cancel(1)</span></div>
<div onclick="cancelMultiple()">Multiple<br /><span>cancel(2, 3)</span></div>
</div>
<div class="container">
<div onclick="cancelAll()">All<br/><span>cancelAll()</span></div>
<div onclick="cancelAll()">All<br /><span>cancelAll()</span></div>
</div>
<!-- presence -->
<h2 class="section">Presence</h2>
<div class="container">
<div onclick="isScheduled()">Scheduled?<br/><span>isScheduled(1)</span></div>
<div onclick="isTriggered()">Triggered?<br/><span>isTrigered(1)</span></div>
<div onclick="isScheduled()">Scheduled?<br /><span>isScheduled(1)</span></div>
<div onclick="isTriggered()">Triggered?<br /><span>isTrigered(1)</span></div>
</div>
<div class="container">
<div onclick="isPresent()">Present?<br/><span>present(1)</span></div>
<div onclick="isPresent()">Present?<br /><span>present(1)</span></div>
</div>
<!-- id's -->
<h2 class="section">ID's</h2>
<div class="container">
<div onclick="getScheduledIds()">Scheduled<br/><span>getScheduledIds()</span></div>
<div onclick="getTriggeredIds()">Triggered<br/><span>getTriggeredIds()</span></div>
<div onclick="getScheduledIds()">Scheduled<br /><span>getScheduledIds()</span></div>
<div onclick="getTriggeredIds()">Triggered<br /><span>getTriggeredIds()</span></div>
</div>
<div class="container">
<div onclick="getIds()">All<br/><span>getIds()</span></div>
<div onclick="getIds()">All<br /><span>getIds()</span></div>
</div>
<!-- notifications -->
<h2 class="section">Notifications</h2>
<div class="container">
<div onclick="getScheduled()">Scheduled<br/><span>getScheduled()</span></div>
<div onclick="getTriggered()">Triggered<br/><span>getTrigered()</span></div>
<div onclick="getScheduled()">Scheduled<br /><span>getScheduled()</span></div>
<div onclick="getTriggered()">Triggered<br /><span>getTrigered()</span></div>
</div>
<div class="container">
<div onclick="get()">Single<br/><span>get(1)</span></div>
<div onclick="getMultiple()">Multiple<br/><span>get(1, 2)</span></div>
<div onclick="get()">Single<br /><span>get(1)</span></div>
<div onclick="getMultiple()">Multiple<br /><span>get(1, 2)</span></div>
</div>
<div class="container">
<div onclick="getAll()">All<br/><span>getAll()</span></div>
<div onclick="getAll()">All<br /><span>getAll()</span></div>
</div>
<!-- defaults -->
<h2 class="section">Defaults</h2>
<div class="container">
<div onclick="setDefaultTitle()">Change title<br/><span>setDefaults(title:"...")</span></div>
<div onclick="setDefaultTitle()">Change title<br /><span>setDefaults(title:"...")</span></div>
</div>
<!-- copyright -->
......@@ -165,7 +165,7 @@
});
};
</script>
</script>
<!-- permission -->
<script type="text/javascript">
......@@ -186,38 +186,38 @@
<script type="text/javascript">
schedule = function () {
cordova.plugins.notification.local.schedule({
id: 1,
id: 1,
text: 'Test Message 1',
icon: 'http://www.optimizeordie.de/wp-content/plugins/social-media-widget/images/default/64/googleplus.png',
sound: null,
data: { test:id }
data: { test: id }
});
};
scheduleMultiple = function () {
cordova.plugins.notification.local.schedule([{
id: 1,
id: 1,
text: 'Multi Message 1'
},{
id: 2,
}, {
id: 2,
text: 'Multi Message 2'
},{
id: 3,
}, {
id: 3,
text: 'Multi Message 3'
}]);
};
scheduleDelayed = function () {
var now = new Date().getTime(),
_5_sec_from_now = new Date(now + 5*1000);
var now = new Date().getTime(),
_5_sec_from_now = new Date(now + 5 * 1000);
var sound = device.platform == 'Android' ? 'file://sound.mp3' : 'file://beep.caf';
cordova.plugins.notification.local.schedule({
id: 1,
id: 1,
title: 'Scheduled with delay',
text: 'Test Message 1',
at: _5_sec_from_now,
text: 'Test Message 1',
at: _5_sec_from_now,
sound: sound
});
};
......@@ -226,8 +226,8 @@
var sound = device.platform == 'Android' ? 'file://sound.mp3' : 'file://beep.caf';
cordova.plugins.notification.local.schedule({
id: 1,
text: 'Scheduled every minute',
id: 1,
text: 'Scheduled every minute',
every: 'minute',
sound: sound
});
......@@ -238,16 +238,16 @@
<script type="text/javascript">
update = function () {
cordova.plugins.notification.local.update({
id: 1,
text: 'Updated Message 1',
json: { updated:true }
id: 1,
text: 'Updated Message 1',
json: { updated: true }
});
};
updateInterval = function () {
cordova.plugins.notification.local.update({
id: 1,
text: 'Updated Message 1',
id: 1,
text: 'Updated Message 1',
every: 'minute'
});
};
......@@ -256,11 +256,11 @@
<!-- clear -->
<script type="text/javascript">
clearSingle = function () {
cordova.plugins.notification.local.clear(1,callback);
cordova.plugins.notification.local.clear(1, callback);
};
clearMultiple = function () {
cordova.plugins.notification.local.clear([2, 3],callback);
cordova.plugins.notification.local.clear([2, 3], callback);
};
clearAll = function () {
......@@ -271,11 +271,11 @@
<!-- cancel -->
<script type="text/javascript">
cancel = function () {
cordova.plugins.notification.local.cancel(1,callback);
cordova.plugins.notification.local.cancel(1, callback);
};
cancelMultiple = function () {
cordova.plugins.notification.local.cancel([2, 3],callback);
cordova.plugins.notification.local.cancel([2, 3], callback);
};
cancelAll = function () {
......@@ -307,8 +307,8 @@
<!-- IDs -->
<script type="text/javascript">
var callbackIds = function (ids) {
showToast(ids.length === 0 ? '- none -' : ids.join(' ,'));
};
showToast(ids.length === 0 ? '- none -' : ids.join(' ,'));
};
getIds = function () {
cordova.plugins.notification.local.getIds(callbackIds);
......@@ -326,9 +326,9 @@
<!-- notifications -->
<script type="text/javascript">
var callbackOpts = function (notifications) {
console.log(notifications);
showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,'));
};
console.log(notifications);
showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,'));
};
get = function () {
cordova.plugins.notification.local.get(1, callbackOpts);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment