RECOGNITION
This class is used to subscribe for Gesture Recognition events. You can configure event according to the gesture through this class.
Add the following line for recognition class into a html file your own : <script type="text/javascript" src="$MANAGER_WIDGET/Common/webapi/1.0/deviceapis.js"></script> |
You can declare recognition class like this : ex) var recognition= deviceapis.recognition; |
Contents
Methods
SubscribeEvent | ||
Description | ||
The SubscribeEvent function registers a type to receive callback. You must call UnsubscribeEvent() when you finish using recognition feature. | ||
Parameters | ■type - PL_RECOGNITION_TYPE - Type to register ■name - String - name to subscribe ■callback - Function - callback function to receive a result value | |
Return | ■Void | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
function rCallback(result) { var resultVal = result; } if(deviceapis.recognition.IsRecognitionSupported()) { deviceapis.recognition.SubscribeEvent(deviceapis.recognition.PL_RECOGNITION_TYPE_VOICE, 'testApp', rCallback); } |