How to recognize “WRIST_UP” gesture?

How to recognize “WRIST_UP” gesture?

BY 17 Nov 2015 Web Application Development

Hi All,

I am trying to catch “WRIST_UP” on GEAR S2, but it could not enter Success callback or Error callback.

I am not sure if I missed some codes, but I have got “pedometer” and “heart rate” data successfully using the same way.

In Tizen developer, it is suggested that add “<feature name=”http://tizen.org/feature/sensor.wrist_up”/>” into config.xml, and it has no effect for me.

Anyone knows how to deal with it? Thanks in advance.

 

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://yourdomain/Smart" version="2.3.1" viewmodes="maximized">
    <tizen:application id="1RFUTfsPl5.Smart" package="1RFUTfsPl5" required_version="2.3.1"/>
    <content src="index.html"/>
    <feature name="http://tizen.org/feature/screen.size.all"/>  
    <feature name="http://tizen.org/feature/sensor.wrist_up"/>
    <feature name="http://tizen.org/feature/sensor.heart_rate_monitor"/>
    <icon src="icon.png"/>
    <name>Smart</name>
    <tizen:privilege name="http://tizen.org/privilege/alarm"/>
    <tizen:privilege name="http://tizen.org/privilege/bluetooth.admin"/>
    <tizen:privilege name="http://tizen.org/privilege/bluetooth.gap"/>
    <tizen:privilege name="http://tizen.org/privilege/bluetooth.spp"/>
    <tizen:privilege name="http://tizen.org/privilege/bluetooth.health"/>
    <tizen:privilege name="http://tizen.org/privilege/mediacapture"/>
    <tizen:privilege name="http://tizen.org/privilege/healthinfo"/>
    <tizen:setting background-support="enable" />   
    <tizen:profile name="wearable"/>
</widget>

/*Wrist up*/
function onchangedWristCB()
{   
   wristUPCnt++;
   console.log(“You are looking at your smartwatch:”+ wristUPCnt);
}

function onErrorWristCB()  
{   

   console.log(“Error occurs. name:”);
}

tizen.humanactivitymonitor.start(“WRIST_UP”, onchangedWristCB, onErrorWristCB );

 

Written by