cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [1/8] git commit: Add support for Tizen.
Date Mon, 10 Feb 2014 23:23:49 GMT
Updated Branches:
  refs/heads/master 06720d852 -> adad06488


Add support for Tizen.


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/4023ad98
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/tree/4023ad98
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/diff/4023ad98

Branch: refs/heads/master
Commit: 4023ad98030030f2728d8f7552d82ac16637ed52
Parents: b58a2cc
Author: Salvatore Iovene <salvatore@iovene.com>
Authored: Thu Nov 21 11:56:28 2013 +0200
Committer: Salvatore Iovene <salvatore@iovene.com>
Committed: Thu Nov 21 11:56:28 2013 +0200

----------------------------------------------------------------------
 plugin.xml                  | 7 +++++++
 src/tizen/VibrationProxy.js | 9 +++++++++
 2 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/blob/4023ad98/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 730341b..0d8a606 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -88,4 +88,11 @@
             <clobbers target="window.navigator.notification.vibrate" />
         </js-module>
     </platform>
+
+    <!-- tizen -->
+    <platform name="tizen">
+        <js-module src="src/tizen/VibrationProxy.js" name="VibrationProxy">
+            <runs />
+        </js-module>
+    </platform>
 </plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/blob/4023ad98/src/tizen/VibrationProxy.js
----------------------------------------------------------------------
diff --git a/src/tizen/VibrationProxy.js b/src/tizen/VibrationProxy.js
new file mode 100644
index 0000000..a476c21
--- /dev/null
+++ b/src/tizen/VibrationProxy.js
@@ -0,0 +1,9 @@
+module.exports = {
+    vibrate: function(milliseconds) {
+        if (navigator.vibrate) {
+            navigator.vibrate(milliseconds);
+        }
+    }
+};
+
+require("cordova/tizen/commandProxy").add("Vibration", module.exports);


Mime
View raw message