Search code examples
androidgesturegesture-recognition

How to extract coordinates information from gesture library?


I am making a gesture recognition application.

I want to get the coordinates of the points that are contained in the gesture library. (This is loaded as a raw gesture file, which is created with the help of "Gesture Builder" application). Also, if the directional information of the gesture strokes are determined, it would be very helpful for me.

Please tell me if it is feasible in android to get the above information.

I am using gesture libraries in the android 2.3.3 SDK.


Solution

  • Although I have not used it checking the API and the source I see that you can get the gestures from the library by getGestures then the gesture strokes by getGestureStrokes. Checking the source of the constructor of GestureStroke you can see that coordinates of GesturePoints are stored in the public points float array so you can access them.