[DeviceMotionCapture] add eventHandler for tizen hardware backKey
authorJoonghun Park <jh718.park@samsung.com>
Thu, 13 Jun 2013 02:27:02 +0000 (11:27 +0900)
committerJoonghun Park <jh718.park@samsung.com>
Wed, 19 Jun 2013 01:55:11 +0000 (10:55 +0900)
Change-Id: Ib09a340bb6a2544b1f080c87478b5feccc38e3d5

js/main.js

index 777655e..dd21627 100755 (executable)
@@ -75,4 +75,11 @@ function deviceMotionEvents() {
         }
 }
 
-window.onload = function() {deviceMotionEvents();};
+window.onload = function() {
+    //add eventListener for tizenhwkey
+    document.addEventListener('tizenhwkey', function(e){
+        tizen.application.getCurrentApplication().exit();
+    });
+
+    deviceMotionEvents();
+};