Hey guys,
I am trying to develop a web application for the Samsung Gear S2 with swipe gestures (left, right, up, down, the hardware backbutton as "BACK" and a single touch as "OK").
But the Gear S2 is recognizing the back button AND the swipe down as "BACK" (event = tizenhwkey). Is there a possibility to disable this behaviour or maybe to differentiate if the tizenhwkey event was thrown by the hardware key or the swipe down? I tried to look for e.keyName for example, but it is both "back". Is it possible?
Here is the code snippet I use at the moment:
document.addEventListener('tizenhwkey', function(e) {
$("#test").html("backButton - " + e.keyName);
e.preventDefault();
e.stopPropagation();
});
document.addEventListener("rotarydetent", function(ev) {
$("#test").html("rotate");
e.preventDefault();
e.stopPropagation();
});
document.addEventListener('touchstart', function(e) {
$("#test").html("touchstart");
e.preventDefault();
e.stopPropagation();
});
document.addEventListener('touchmove', function(e) {
$("#test").html("touchmove");
e.preventDefault();
e.stopPropagation();
});
document.addEventListener('touchend', function(e) {
$("#test").html("touchend");
e.preventDefault();
e.stopPropagation();
});
Thanks in advance!