From: Joonghun Park Date: Thu, 13 Jun 2013 02:27:02 +0000 (+0900) Subject: [DeviceMotionCapture] add eventHandler for tizen hardware backKey X-Git-Tag: 2.2_release~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=5158ba134981c01418036aafb7fb1b2af8e641ef;p=samples%2Fweb%2FDeviceMotionCapture.git [DeviceMotionCapture] add eventHandler for tizen hardware backKey Change-Id: Ib09a340bb6a2544b1f080c87478b5feccc38e3d5 --- diff --git a/js/main.js b/js/main.js index 777655e..dd21627 100755 --- a/js/main.js +++ b/js/main.js @@ -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(); +};