Inputting Gestures

How to take in Gestures from the Users ?

What I want to do is :-
Put in like a screen-wide Canvas, and let the user ,say draw or Write a letter ,say "A"...
Input it again to confirm...and store it somewhere...
After inputting Gesture , make the user select a function/file...Say he selects a song "Astronaut"

then when the user again opens the app,in a different activity, again input the same gesture, the app should identify it and play the song "Astronaut"..

(This was just an example, I don't plan on giving away my thunder..just go with this :p)

How to implement this ? Each and everything ?


Thread starter
The problem is , when the user enters the same thing again...It's never going to be exactly the same ...
So some sort of artificial intelligence may be required...idk if there's a library or pre-built component for this in eclipse...