语言

Menu
Sites
Language
How can I use the few sensor data? (gyro 센서와 음성인식)

Dear developers

I need to use gyro sensor and Voice recognition in gear2.

First of all the gyro sensor was found Tizen::Uix::Sensor::GyroSensorData in API reference.
But could not find how to use it using the Gear SDK for gear2.

Please let me know usable API for gear2.

Secondly Voice recognition API could not found.
Can i use S-voice?

Problem seems to be solved knowing how to use the Tizen native API in gear2(Tizen SDK for Wearable).
Let me know how to use it.


기어2의 자이로 센서와 음성인식 센서를 사용해야 하는데 
해당되는 API를 Help -> Help Contents 에서는 찾지 못했습니다.

Tizen native API를 gear2(Tizen SDK for Wearable)에서 사용할 수 있으면 될 것 같은데 
사용할 수 있는 방법을 찾을 수 없습니다.
어떻게 native API를 gear2에서 사용할 수 있는지 알려주세요

响应

5 回复
AVSukhov

Hello,

Tizen Wearable SDK supported only Web API.

Minseob Shin

Hi~

I found some api.

Tizen Wearable sdk - tizen.power.turnScreenOff() - I need to API like this one.
Tizen Native sdk - Tizen::System::PowerManager TurnScreenOff (void)

I think that there is more api like that.

But like tizen.power.turnScreenOff() api is no document guide.

Thijs Mergaert

For more information on how to access Gyroscope data, see here: https://developer.mozilla.org/en-US/docs/WebAPI/Detecting_device_orientation#Processing_motion_events. There's no Tizen-specific API for it.

bon jae koo

As you recommanded, I used the api as follows: 

Finally, I got the data of gyrosensors but it's too slow to use. I mean the sampling rate is about one time per sec.

 

How can I improve it or acccess rotationRate?  

Dominik Koleda

All right. First of all - go to your app configuration (XML file) and add requested features, like gyroscope.

In my application I've used handler like this:

window.addEventListener('devicemotion', myFunction, false);

As Thijs Mergaert mentioned, it is HTML5/webkit option, not Tizen on its own, so the documentation is not included in the SDK. I remember that http://www.html5rocks.com/en/tutorials/device/orientation/ was really useful.

Dominik