From 5158ba134981c01418036aafb7fb1b2af8e641ef Mon Sep 17 00:00:00 2001 From: Joonghun Park Date: Thu, 13 Jun 2013 11:27:02 +0900 Subject: [PATCH] [DeviceMotionCapture] add eventHandler for tizen hardware backKey Change-Id: Ib09a340bb6a2544b1f080c87478b5feccc38e3d5 --- js/main.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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(); +}; -- 2.7.4