You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by he...@apache.org on 2013/05/16 23:26:19 UTC
[1/2] git commit: added iOS specific notification apis
Updated Branches:
refs/heads/master e5c6d31b6 -> 2cc6887f6
added iOS specific notification apis
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/commit/c7761cfa
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/tree/c7761cfa
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/diff/c7761cfa
Branch: refs/heads/master
Commit: c7761cfa202a23efcc3d2a245c97d0d89841cb1f
Parents: e5c6d31
Author: hermwong <he...@gmail.com>
Authored: Thu May 16 14:22:42 2013 -0700
Committer: hermwong <he...@gmail.com>
Committed: Thu May 16 14:22:42 2013 -0700
----------------------------------------------------------------------
www/ios/notification.js | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/blob/c7761cfa/www/ios/notification.js
----------------------------------------------------------------------
diff --git a/www/ios/notification.js b/www/ios/notification.js
new file mode 100644
index 0000000..98b317c
--- /dev/null
+++ b/www/ios/notification.js
@@ -0,0 +1,28 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var Media = require('cordova/plugin/Media');
+
+module.exports = {
+ beep:function(count) {
+ (new Media('beep.wav')).play();
+ }
+};
[2/2] git commit: updated config to include ios specific notification
apis & the path to the native android Notification class
Posted by he...@apache.org.
updated config to include ios specific notification apis & the path to the native android Notification class
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/commit/2cc6887f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/tree/2cc6887f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/diff/2cc6887f
Branch: refs/heads/master
Commit: 2cc6887f69e4bb925ba9a7ba721d53942097c1ed
Parents: c7761cf
Author: hermwong <he...@gmail.com>
Authored: Thu May 16 14:26:03 2013 -0700
Committer: hermwong <he...@gmail.com>
Committed: Thu May 16 14:26:03 2013 -0700
----------------------------------------------------------------------
plugin.xml | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/blob/2cc6887f/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index ba583dc..829775a 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -17,6 +17,8 @@ id="org.apache.cordova.core.Notification"
<plugin name="Notification" value="org.apache.cordova.core.Notification"/>
</config-file>
+ <source-file src="Notification.java" target-dir="org/apache/cordova/core" />
+
<!-- android specific notification apis -->
<js-module src="www/android/notification.js" name="notification">
<merges target="navigator.notification" />
@@ -31,5 +33,11 @@ id="org.apache.cordova.core.Notification"
</config-file>
<header-file src="src/ios/CDVNotification.h" />
<source-file src="src/ios/CDVNotification.m" />
+
+ <!-- android specific notification apis -->
+ <js-module src="www/ios/notification.js" name="notification">
+ <merges target="navigator.notification" />
+ </js-module>
+
</platform>
</plugin>