First use the recording app to record gestures with your mobile. The software converts the continual stream of motion readings into distinct gesture events.
Then include the recognition library in your own app. It runs a pattern matching algorithm to detect when the gesture is repeated, raising an event to trigger an action in your app.
NOTE: This library recognises gestures made by moving the hand-held device in your hand. It does not recognise gestures from video or images.